emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/system-packages 2862c5b 05/10: change-log, owning-file,


From: Stefan Monnier
Subject: [elpa] externals/system-packages 2862c5b 05/10: change-log, owning-file, owning-file-remote: New commands
Date: Tue, 16 Mar 2021 09:44:27 -0400 (EDT)

branch: externals/system-packages
commit 2862c5b36b3333402ce9e8dc3a818e2b88664bb7
Author: Štěpán Němec <stepnem@gmail.com>
Commit: Štěpán Němec <stepnem@gmail.com>

    change-log, owning-file, owning-file-remote: New commands
    
    Caveat: currently I only really use pacman & pacaur, the other
    invocations (incomplete, anyway) mostly come from
    https://wiki.archlinux.org/index.php/Pacman/Rosetta
---
 README.org         |  3 +++
 system-packages.el | 41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/README.org b/README.org
index 32e01ef..b65b410 100644
--- a/README.org
+++ b/README.org
@@ -71,9 +71,12 @@ the commands to =system-packages-supported-package-managers= 
like so:
                          (update . "pacaur -Syu")
                          (clean-cache . "pacaur -Sc")
                          (log . "cat /var/log/pacman.log")
+                         (change-log . "pacaur -Qc")
                          (get-info . "pacaur -Qi")
                          (get-info-remote . "pacaur -Si")
                          (list-files-provided-by . "pacaur -Ql")
+                         (owning-file . "pacaur -Qo")
+                         (owning-file-remote . "pacaur -F")
                          (verify-all-packages . "pacaur -Qkk")
                          (verify-all-dependencies . "pacaur -Dk")
                          (remove-orphaned . "pacaur -Rns $(pacman -Qtdq)")
diff --git a/system-packages.el b/system-packages.el
index ab0b104..4b72c6e 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -132,10 +132,13 @@
              (uninstall . "pacman -Rns")
              (update . "pacman -Syu")
              (clean-cache . "pacman -Sc")
+             (change-log . "pacman -Qc")
              (log . "cat /var/log/pacman.log")
              (get-info . "pacman -Qi")
              (get-info-remote . "pacman -Si")
              (list-files-provided-by . "pacman -qQl")
+             (owning-file . "pacman -Qo")
+             (owning-file-remote . "pacman -F")
              (verify-all-packages . "pacman -Qkk")
              (verify-all-dependencies . "pacman -Dk")
              (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
@@ -152,9 +155,12 @@
           (update . ("apt-get update" "apt-get upgrade"))
           (clean-cache . "apt-get clean")
           (log . "cat /var/log/dpkg.log")
+          (change-log . "apt-get changelog")
           (get-info . "dpkg -s")
           (get-info-remote . "apt-cache show")
           (list-files-provided-by . "dpkg -L")
+          (owning-file . "dpkg -S")
+          (owning-file-remote . "apt-file search")
           (verify-all-packages . "debsums")
           (verify-all-dependencies . "apt-get check")
           (remove-orphaned . "apt-get autoremove")
@@ -170,9 +176,12 @@
                (update . ("apt update" "aptitude safe-upgrade"))
                (clean-cache . "aptitude clean")
                (log . "cat /var/log/dpkg.log")
+               (change-log . "aptitude changelog")
                (get-info . "aptitude show")
                (get-info-remote . "aptitude show")
                (list-files-provided-by . "dpkg -L")
+               (owning-file . "dpkg -S")
+               (owning-file-remote . "apt-file search")
                (verify-all-packages . "debsums")
                (verify-all-dependencies . "apt-get check")
                (remove-orphaned . nil) ; aptitude does this automatically
@@ -189,9 +198,12 @@
              (update . "emerge -u world")
              (clean-cache . "eclean distfiles")
              (log . "cat /var/log/portage")
+             (change-log . "equery changes -f")
              (get-info . "emerge -pv")
              (get-info-remote . "emerge -S")
              (list-files-provided-by . "equery files")
+             (owning-file . "equery belongs")
+             (owning-file-remote . "equery belongs")
              (verify-all-packages . "equery check")
              (verify-all-dependencies . "emerge -uDN world")
              (remove-orphaned . "emerge --depclean")
@@ -211,6 +223,8 @@
              (get-info . "zypper info")
              (get-info-remote . "zypper info")
              (list-files-provided-by . "rpm -Ql")
+             (owning-file . "zypper search -f")
+             (owning-file-remote . "zypper search -f")
              (verify-all-packages . "rpm -Va")
              (verify-all-dependencies . "zypper verify")
              (remove-orphaned . "zypper rm -u")
@@ -226,10 +240,13 @@
           (uninstall . "dnf remove")
           (update . ("dnf upgrade"))
           (clean-cache . "dnf clean all")
+          (change-log . "rpm -q --changelog")
           (log . "dnf history")
           (get-info . "rpm -qi")
           (get-info-remote . "dnf info")
           (list-files-provided-by . "rpm -ql")
+          (owning-file . "rpm -qf")
+          (owning-file-remote . "dnf provides")
           (verify-all-packages . "rpm -Va")
           (verify-all-dependencies . "dnf repoquery --requires")
           (remove-orphaned . "dnf autoremove")
@@ -246,9 +263,12 @@
          (update . "yum update")
          (clean-cache . "yum clean expire-cache")
          (log . "cat /var/log/yum.log")
+          (change-log . "rpm -q --changelog")
          (get-info . "yum info")
          (get-info-remote . "repoquery --plugins -i")
          (list-files-provided-by . "rpm -ql")
+          (owning-file . "rpm -qf")
+          (owning-file-remote . "repoquery -f")
          (verify-all-packages)
          (verify-all-dependencies)
          (remove-orphaned . "yum autoremove")
@@ -437,6 +457,27 @@ You may use ARGS to pass options to the package manager."
   (interactive "sPackage to list provided files of: ")
   (system-packages--run-command 'list-files-provided-by pack args))
 
+;;;###autoload
+(defun system-packages-owning-file (file &optional args)
+  "Search for packages containing FILE.
+
+Search only locally installed packages by default.  With a prefix
+argument, try to search packages not yet installed.
+
+You may use ARGS to pass options to the package manager."
+  (interactive "FFile name: ")
+  (if current-prefix-arg
+      (system-packages--run-command 'owning-file-remote file args)
+    (system-packages--run-command 'owning-file file args)))
+
+;;;###autoload
+(defun system-packages-change-log (pack &optional args)
+  "Show the change log of PACK.
+
+You may use ARGS to pass options to the package manager."
+  (interactive "sPackage to show change log of: ")
+  (system-packages--run-command 'change-log pack args))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; functions that don't take a named package
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]