Support pkg sub-groups in pkgusr-cmd-pkg/pkgusr-file-pkg * lisp/pkgusr.el (pkgusr-cmd-pkg): Use the new #'user-group-name from latest SXEmacs. This fixes the issue of a pkgusr sub-group being displayed as "nil". (pkgusr-file-pkg): Ditto. * usr/lib/pkgusr/update-pkg-project: Always exit zero. Signed-off-by: Steve Youngs <steve@steveyoungs.com>
Pretty decent overhaul of the elisp tools. Most interactive defuns can now optionally insert their results into the current buffer at point. The list of packages is now only evaled at load time to reduce processing. Relevant defuns can re-eval explicitly via prefix arg. * etc/pkgusr/bash_profile (CHECKUPDATES): Don't checkupdates if $TERM is "dumb". This allows TRAMP to still function if a pkgusr would have gotten the update message on a normal login. * lisp/pkgusr.el (pkgusr-all-pkgs): New variable to hold list of installed packages so we don't have to calculate it every time it is used. (pkgusr-all-pkgs-update): New. Updates above, to be optionally used in the rest of pkgusr.el. (pkgusr-pkgs-count): Use it. (pkgusr-list-pkgs-regexp): Ditto. Also optionally insert result into current buffer at point. (pkgusr-pkg-details): Pop to a buffer displaying a package's filelist and other details. (pkgusr-show-pkg): Remove its argument, it was never intended to be called non-interactively. Update the packages list via prefix arg. Use #'pkgusr-pkg-details (pkgusr-pkg-install-notes): Ditto. (pkgusr-pkg-general-notes): Ditto. (pkgusr-cmd-pkg): Insert into buffer with prefix arg. Error out if the file owner or group isn't a pkgusr (pkgusr-file-pkg): Ditto. (pkgusr-project-file): New. (pkgusr-pkg-url): Use it. Optionally insert into buffer. Optionally force update of packages list. (pkgusr-pkg-repo): Ditto. (pkgusr-pkg-version): Ditto. (pkgusr-pkg-description): Ditto. (pkgusr-pkg-deps): Ditto. (pkgusr-find-file): Force update of packages list via prefix arg. (pkgusr-pkg-rdeps): New. Returns a list of reverse dependencies of a package. IOW, what packages need a package. * lisp/bld-update.el: Typo fix. Signed-off-by: Steve Youngs <steve@bastard.steveyoungs.com>
A few more minor tweaks. * etc/pkgusr/skel-package/build (update_commands): Just use update-pkg-project. * etc/pkgusr/handy_funcs (find_pkg_deps): Removed. Wasn't all that handy. * etc/pkgusr/handy_funcs (build-update): Copy the new build script into ${HOME}/build-YYYYmmdd if SXEmacs isn't installed to allow for manual update. * usr/bin/forall_direntries_from (IGNORE_READDIR_RACE): For use primarily in the uninstall script. * usr/lib/pkgusr/uninstall_package (run): The -ignore_readdir_race option can't be used here directly. It is now in forall_direntries_from and activated via env varibable set in this script. Signed-off-by: Steve Youngs <steve@sxemacs.org>
Try to make it easier for when I update the build script template. It's most likely incredibly hacky, but this changeset gives a pkgusr a way to incrementally and interactively apply updates to their build script when the central template script in /etc/pkgusr/skel-package is updated. If the central template script is newer than the pkgusr's a notice is printed to their stdout on login that contains further instructions of how to proceed. The actual updating is done via #'ediff-files in an interactive SXEmacs session. That way the pkgusr can "cherrypick" the changes. * lisp/bld-update.el: New. Update build scripts via ediff. * etc/pkgusr/handy_funcs (build-update): New. Calls SXEmacs with ediff-files on ~/build and /etc/pkgusr/skel-package/build (checkupdates): Checks to see if the build script in /etc/pkgusr/skel-package is newer than the one in $HOME * etc/pkgusr/bash_profile (CHECKUPDATES): New. Signed-off-by: Steve Youngs <steve@sxemacs.org>
Add some rudimentary dependency tracking. "tracking" is probably an over-statement. What this does is to store a package's run-time so deps (gleaned from ldd) in its .project. The build script template has been updated to find/store them, and functions have been added to handy_funcs to view them. I've also gotten rid of most of the uses of pinky in the aux functions and simplified them. * etc/pkgusr/skel-package/.project (Deps): New. * etc/pkgusr/skel-package/build (update_commands): Add magic to find the run-time deps. * etc/pkgusr/handy_funcs (deps): Show the dependencies. * etc/pkgusr/handy_funcs (H-pkg): Add `deps'. * etc/pkgusr/handy_funcs (showinst,showgen,srepo,trepo,web): Remove unnecessary use of pinky. * etc/pkgusr/zsh/_zsh-pkgtools: Add `dpkg'. * etc/pkgusr/zsh/zsh-pkgtools (H-pkg): Add `dpkg'. * etc/pkgusr/zsh/zsh-pkgtools (dpkg): New. * etc/pkgusr/zsh/zsh-pkgtools (upkg,Lpkg,vpkg,ipkg,gpkg,wpkg,pkgrepo): Remove unnecessary use of pinky, sed, etc to simplify. * lisp/pkgusr.el (pkgusr-pkg-deps): New. Bind `H-c D' to it. * lisp/pkgusr.el (pkgusr-pkg-url): Remove unnecessary use of pinky. * lisp/pkgusr.el (pkgusr-pkg-repo): Ditto. * lisp/pkgusr.el (pkgusr-pkg-version): Ditto. * lisp/pkgusr.el (pkgusr-pkg-description): Ditto. Signed-off-by: Steve Youngs <steve@sxemacs.org>