X-Git-Url: http://cgit.sxemacs.org/?p=pkgusr;a=blobdiff_plain;f=lisp%2Fpkgusr.el;h=01c3c4f11f78b89e4183e06d87142e5e2405a82b;hp=e8fca3e5ab7f9f0594a8c2b9567d95a2bb821b60;hb=a9baeb490600c1e0a64cfc1e193cc6c145327c21;hpb=2032feb2980d31db130ec1e48037f019e605f8bf;ds=sidebyside diff --git a/lisp/pkgusr.el b/lisp/pkgusr.el index e8fca3e..01c3c4f 100644 --- a/lisp/pkgusr.el +++ b/lisp/pkgusr.el @@ -5,7 +5,7 @@ ;; Author: Steve Youngs ;; Maintainer: Steve Youngs ;; Created: <2007-07-13> -;; Time-stamp: +;; Time-stamp: ;; Homepage: N/A ;; Keywords: utils package-management @@ -221,11 +221,12 @@ If non-interactive, return a list whose car is user and cdr is group." (let* ((allpkgs (pkgusr-all-pkgs)) (pkg (or pkg (completing-read "Package: " (mapcar #'list allpkgs) - nil t nil pkgusr-pkg-history)))) + nil t nil pkgusr-pkg-history))) + (pkgfile (format "/usr/src/%s/.project" pkg))) (when (member pkg allpkgs) (with-temp-buffer (erase-buffer) - (insert (shell-command-to-string (format "pinky -l %s" pkg))) + (insert-file-contents pkgfile) (goto-char (point-min)) (re-search-forward "Web_Site: <\\(.*\\)>$" nil t) (if (interactive-p) @@ -239,11 +240,12 @@ If non-interactive, return a list whose car is user and cdr is group." (pkg (or pkg (completing-read "Package: " (mapcar #'list allpkgs) nil t nil pkgusr-pkg-history))) + (pkgfile (format "/usr/src/%s/.project" pkg)) repo type) (when (member pkg allpkgs) (with-temp-buffer (erase-buffer) - (insert (shell-command-to-string (format "pinky -l %s" pkg))) + (insert-file-contents pkgfile) (goto-char (point-min)) (re-search-forward "Repo_Type: ?$" nil t) (setq type (match-string 1)) @@ -259,11 +261,12 @@ If non-interactive, return a list whose car is user and cdr is group." (let* ((allpkgs (pkgusr-all-pkgs)) (pkg (or pkg (completing-read "Package: " (mapcar #'list allpkgs) - nil t nil pkgusr-pkg-history)))) + nil t nil pkgusr-pkg-history))) + (pkgfile (format "/usr/src/%s/.project" pkg))) (if (member pkg allpkgs) (with-temp-buffer (erase-buffer) - (insert (shell-command-to-string (format "pinky -l %s" pkg))) + (insert-file-contents pkgfile) (goto-char (point-min)) (re-search-forward "Version: \\(.*$\\)" nil t) (if (interactive-p) @@ -277,11 +280,12 @@ If non-interactive, return a list whose car is user and cdr is group." (let* ((allpkgs (pkgusr-all-pkgs)) (pkg (or pkg (completing-read "Package: " (mapcar #'list allpkgs) - nil t nil pkgusr-pkg-history)))) + nil t nil pkgusr-pkg-history))) + (pkgfile (format "/usr/src/%s/.project" pkg))) (if (member pkg allpkgs) (with-temp-buffer (erase-buffer) - (insert (shell-command-to-string (format "pinky -l %s" pkg))) + (insert-file-contents pkgfile) (goto-char (point-min)) (re-search-forward "Description: \\(.*$\\)" nil t) (if (interactive-p) @@ -289,6 +293,25 @@ If non-interactive, return a list whose car is user and cdr is group." (match-string 1))) (error 'pkgusr-unknown-pkg pkg)))) +(defun pkgusr-pkg-deps (&optional pkg) + "Return the dependencies of PKG as a string." + (interactive) + (let* ((allpkgs (pkgusr-all-pkgs)) + (pkg (or pkg (completing-read "Package: " + (mapcar #'list allpkgs) + nil t nil pkgusr-pkg-history))) + (pkgfile (format "/usr/src/%s/.project" pkg))) + (if (member pkg allpkgs) + (with-temp-buffer + (erase-buffer) + (insert-file-contents pkgfile) + (goto-char (point-min)) + (re-search-forward "Deps: \\(.*$\\)" nil t) + (if (interactive-p) + (message "[%s Deps] %s" pkg (match-string 1)) + (match-string 1))) + (error 'pkgusr-unknown-pkg pkg)))) + ;; A little bogus perhaps, but it works. `pkgusr-find-file' is ;; something that only I can use because it ssh's through root to ;; get to the pkgusr. And nobody but me would have a need for @@ -338,6 +361,7 @@ after the setq. Be bold and hard code it in pkgusr.el itself.") (global-set-key [(hyper c) f] #'pkgusr-file-pkg) (global-set-key [(hyper c) (hyper r)] #'pkgusr-list-pkgs-regexp) (global-set-key [(hyper c) d] #'pkgusr-pkg-description) +(global-set-key [(hyper c) D] #'pkgusr-pkg-deps) (global-set-key [(hyper c) g] #'pkgusr-pkg-general-notes) (global-set-key [(hyper c) i] #'pkgusr-pkg-install-notes) (global-set-key [(hyper c) r] #'pkgusr-pkg-repo)