+(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))))
+