;; Author: Steve Youngs <steve@sxemacs.org>
;; Maintainer: Steve Youngs <steve@sxemacs.org>
;; Created: <2007-07-13>
-;; Time-stamp: <Saturday Jun 23, 2012 13:56:29 steve>
+;; Time-stamp: <Sunday Feb 3, 2013 12:17:39 steve>
;; Homepage: N/A
;; Keywords: utils package-management
(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)
(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))
(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)
(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)
(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
(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)