;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'helm-system-packages) (defvar helm-system-packages-pacman-help-message "* Helm pacman\n\n** Options\n\n- `helm-system-packages-pacman-confirm-p'\n- `helm-system-packages-pacman-synchronize-threshold'\n- `helm-system-packages-pacman-auto-clean-cache'\n\n** Commands\n\\\n\\[helm-system-packages-toggle-explicit] Toggle display of explicitly installed packages.\n\\[helm-system-packages-toggle-uninstalled] Toggle display of non-installed.\n\\[helm-system-packages-toggle-dependencies] Toggle display of required dependencies.\n\\[helm-system-packages-toggle-orphans] Toggle display of unrequired dependencies.\n\\[helm-system-packages-toggle-locals] Toggle display of local packages.\n\\[helm-system-packages-toggle-groups] Toggle display of package groups.\n\\[helm-system-packages-toggle-descriptions] Toggle display of package descriptions.") (defvar helm-system-packages-pacman-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\303\314\315#\210\303\316\317#\210\303\320\321#\210\207" [helm-map make-sparse-keymap set-keymap-parent define-key [134217801] helm-system-packages-toggle-explicit [134217806] helm-system-packages-toggle-uninstalled [134217796] helm-system-packages-toggle-dependencies [134217807] helm-system-packages-toggle-orphans [134217804] helm-system-packages-toggle-locals [134217799] helm-system-packages-toggle-groups "" helm-system-packages-toggle-descriptions] 5)) #@17 (fn PACKAGES) (defalias 'helm-system-packages-pacman-transformer #[257 "\306\307!\211\211\203\223\211@\310\311!\312\313 \314\"\"A\211\204/\311!\235\203/\315\316\317#B\262\210\202\214\211\204@ \203@B\262\210\202\214\320>\203X\n\203\213\315\316@#B\262\210\202\214 \203b\321>\204\201\f\203l\322>\204\201 \203v\323>\204\201\203\213\324>\203\213\315\316@#B\262\210A\266\202\202\207" [helm-system-packages--virtual-list helm-system-packages--show-uninstalled-p helm-system-packages--show-locals-p helm-system-packages--show-explicit-p helm-system-packages--show-dependencies-p helm-system-packages--show-orphans-p nil reverse assoc helm-system-packages-extract-name plist-get helm-system-packages--cache-get :display propertize face helm-system-packages-pacman-virtual helm-system-packages-locals helm-system-packages-explicit helm-system-packages-dependencies helm-system-packages-orphans helm-system-packages-groups helm-system-packages--show-groups-p] 10 (#$ . 1587)]) #@37 List explicitly installed packages. (defalias 'helm-system-packages-pacman-list-explicit #[0 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307\310\303\310\311\312\313&\210\314 *\262!\207" [split-string generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] process-file "pacman" nil "--query" "--explicit" "--quiet" buffer-string] 10 (#$ . 2608)]) #@51 List packages installed as a required dependency. (defalias 'helm-system-packages-pacman-list-dependencies #[0 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307\310\303\310\311\312\313&\210\314 *\262!\207" [split-string generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] process-file "pacman" nil "--query" "--deps" "--quiet" buffer-string] 10 (#$ . 3024)]) #@49 List orphan packages (unrequired dependencies). (defalias 'helm-system-packages-pacman-list-orphans #[0 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307\310\303\310\311\312\313\314&\210\315 *\262!\207" [split-string generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] process-file "pacman" nil "--query" "--deps" "--unrequired" "--quiet" buffer-string] 11 (#$ . 3454)]) #@105 List explicitly installed local packages. Local packages can also be orphans, explicit or dependencies. (defalias 'helm-system-packages-pacman-list-locals #[0 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307\310\303\310\311\312\313&\210\314 *\262!\207" [split-string generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] process-file "pacman" nil "--query" "--foreign" "--quiet" buffer-string] 10 (#$ . 3897)]) #@105 List groups. Groups can be (un)installed. Dependency queries list the packages belonging to the group. (defalias 'helm-system-packages-pacman-list-groups #[0 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307\310\303\310\311\312&\210\313 *\262!\207" [split-string generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] process-file "pacman" nil "--sync" "--groups" buffer-string] 9 (#$ . 4379)]) #@133 Cache all package names with descriptions. LOCAL-PACKAGES and GROUPS are lists of strings. (fn DISPLAY-LIST LOCAL-PACKAGES GROUPS) (defalias 'helm-system-packages-pacman-cache #[771 "\301\211\302\303\304\"r\211q\210\305\306\"\216\307\310\"\311\312\301\313\301\314&\210\315\311\312\301\316\301\317 &\266\211\203G\211@\211\320GZ\321\"\322Qc\210A\266\202\202.\210\323\301ed#\210\324 *\262\262\325\326\327#\262\330\331$\207" [helm-system-packages-column-width nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] format "%%-%dn %%d" process-file "expac" (t nil) "--sync" apply (t nil) "--query" make-string 32 " \n" sort-lines buffer-string replace-regexp-in-string " .*" "" helm-system-packages--cache-set "pacman"] 16 (#$ . 4844)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable helm-system-packages-pacman-column-width funcall function #[0 "\300\207" [40] 1] "Column at which descriptions are aligned, excluding a double-space gap.\nIf nil, then use `helm-system-packages-column-width'." :group helm-system-packages :type integer] 8) #@27 Refresh the package list. (defalias 'helm-system-packages-pacman-refresh #[0 "\206 \302 \303 \304 \305 \306 \307\211\203&\211@\211\310BB\262A\266\202\202\210\211\203<\211@\211\311BB\262A\266\202\202(\210\211\203R\211@\211\312BB\262A\266\202\202>\210\211\203m\211@\313\"\211\314AB\241\266A\266\202\202T\210\211\203\203\211@\211\315BB\262A\266\202\202o\210\316#\207" [helm-system-packages-pacman-column-width helm-system-packages-column-width helm-system-packages-pacman-list-explicit helm-system-packages-pacman-list-dependencies helm-system-packages-pacman-list-orphans helm-system-packages-pacman-list-locals helm-system-packages-pacman-list-groups nil (helm-system-packages-explicit) (helm-system-packages-dependencies) (helm-system-packages-orphans) assoc helm-system-packages-locals (helm-system-packages-groups) helm-system-packages-pacman-cache] 12 (#$ . 6020) nil]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable helm-system-packages-pacman-synchronize-threshold funcall function #[0 "\300\207" [86400] 1] "Auto-synchronize database on installation if older than this many seconds.\nIf nil, no automatic action is taken." :group helm-system-packages :type integer] 8) #@97 Return non-nil when database is older than `helm-system-packages-pacman-synchronize-threshold'. (defalias 'helm-system-packages-pacman-outdated-database-p #[0 "\205I\301\302\303\"r\211q\210\304\305\"\216\306\307\310\303\310\311%\210eb\210\312\313!\210\314\315\310\303#\210\316`T\317 \"*\262\320\321\322\323\324\325\326\"!\"\320\"\237@\327\330 \331!\"\"\262\207" [helm-system-packages-pacman-synchronize-threshold generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] process-file "pacman" nil "--verbose" keep-lines "^DB Path" search-forward ":" buffer-substring-no-properties line-end-position time-less-p sort mapcar #[257 "\300\301!8\207" [5 file-attributes] 4 "\n\n(fn FILE)"] file-expand-wildcards expand-file-name "sync/*.db" time-subtract current-time seconds-to-time] 9 (#$ . 7281)]) #@318 Print information about the selected packages. The local database will be queried if possible, while the sync database is used as a fallback. Note that they don't hold the exact same information. With prefix argument, insert the output at point. Otherwise display in `helm-system-packages-buffer'. (fn CANDIDATE) (defalias 'helm-system-packages-pacman-info #[257 "\301\302\303\302\304\305\203C\202\306 !\"\"!\207" [helm-in-persistent-action helm-system-packages-show-information helm-system-packages-mapalist ((uninstalled (lambda (info-string) (mapcar (lambda (desc) (string-match "\\(.*\\)\n.*: \\(.*\\)" desc) (cons (match-string 2 desc) (concat (match-string 1 desc) (substring desc (match-end 2))))) (split-string info-string "\n\n" t)))) (all (lambda (info-string) (mapcar (lambda (desc) (string-match ".*: \\(.*\\)" desc) (cons (match-string 1 desc) (substring desc (match-end 2)))) (split-string info-string "\n\n" t))))) ((uninstalled (lambda (packages) (helm-system-packages-call "pacman" packages "--sync" "--info" "--info" "--color" "never"))) (groups ignore) (all (lambda (packages) (helm-system-packages-call "pacman" packages "--query" "--info" "--info" "--color" "never")))) helm-system-packages-categorize helm-marked-candidates] 8 (#$ . 8147)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\311&\207" [custom-declare-variable helm-system-packages-pacman-auto-clean-cache funcall function #[0 "\300\207" [nil] 1] "Clean cache before installing.\nThe point of keeping previous version in cache is that you can revert back if\nsomething fails.\nBy always cleaning before installing, the previous version in kept in cache.\nThis is only healthy if you test every version you install.\nInstalling two upgrades (or the same version) will effectively leave you with no\ntested package to fall back on." :group helm-system-packages :type boolean helm-system-packages-pacman-confirm-p #[0 "\300\207" [t] 1] "Prompt for confirmation before proceeding with transaction."] 8) #@36 Install marked candidates. (fn _) (defalias 'helm-system-packages-pacman-install #[257 "\203\304 \305 \210\306 \204db\210\307\n?\205\310\311\261\210)\312\313\314\315 \205'\316 ?\205-\317\n?\2053\320%\207" [helm-system-packages-pacman-auto-clean-cache eshell-buffer-name helm-system-packages-pacman-confirm-p helm-current-prefix-arg helm-system-packages-shell-name eshell eshell-interactive-process "sudo pacman --sync --clean " "--noconfirm " "&& " helm-system-packages-run-as-root "pacman" "--sync" helm-system-packages-pacman-outdated-database-p "--refresh" "--needed" "--noconfirm"] 7 (#$ . 10200)]) #@38 Uninstall marked candidates. (fn _) (defalias 'helm-system-packages-pacman-uninstall #[257 "\302\303\304\205\305 ?\205\306$\207" [helm-current-prefix-arg helm-system-packages-pacman-confirm-p helm-system-packages-run-as-root-over-installed "pacman" "--remove" "--recursive" "--noconfirm"] 6 (#$ . 10822)]) #@239 List candidate files for display in `helm-system-packages-find-files'. The local database will be queried if possible, while the sync database is used as a fallback. Note that they don't hold the exact same information. (fn CANDIDATE) (defalias 'helm-system-packages-pacman-find-files #[257 "\300\301\302\"\303\304\305\306\307\310 !\"\"\211\203A\211@\311\312\"\210\311\313\314\225#\203:\315\316\"\315\317\"\320\321\"B#\266\202A\266\202\202\210\322!\207" [make-hash-table :test equal mapcar cdr helm-system-packages-mapalist ((uninstalled (lambda (packages) (replace-regexp-in-string "\\([^ ]+ \\)" "\\1/" (helm-system-packages-call "pacman" packages "--files" "--list" "--color" "never")))) (groups ignore) (all (lambda (packages) (helm-system-packages-call "pacman" packages "--query" "--list" "--color" "never")))) helm-system-packages-categorize helm-marked-candidates string-match "" "\n?\\([^ ]+\\) \\(.*\\)" 0 match-string 2 1 puthash gethash helm-system-packages-find-files] 13 (#$ . 11141)]) #@163 List candidate dependencies for `helm-system-packages-show-packages'. If REVERSE is non-nil, list reverse dependencies instead. (fn CANDIDATE &optional REVERSE) (defalias 'helm-system-packages-pacman-show-dependencies #[513 "\211\203\301\202\302\205\303P\203\304\202\305\306\307\310\311 \312#Q\313\314\315\316\317\320\321\322\323\324\325\f\257ED\326\203;\327\202<\330D\331\316\332\320\321\322\333\324\325\257EDE\334\311 !\"\"\207" [helm-current-prefix-arg "%N" "%E" "%o" "Reverse dependencies" "Dependencies" " of " mapconcat identity helm-marked-candidates " " helm-system-packages-show-packages helm-system-packages-mapalist uninstalled lambda (packages) helm-system-packages-call "expac" packages "--sync" "--listdelim" "\n" groups ignore #[257 "\300\301\302\303\304%\207" [helm-system-packages-call "expac" "--sync" "-g" "%n"] 7 "\n\n(fn PACKAGES)"] all (packages) "--query" helm-system-packages-categorize] 18 (#$ . 12170)]) #@51 Filter pacman logs by candidates. (fn CANDIDATE) (defalias 'helm-system-packages-pacman-history #[257 "\301!\210\302\303!\210\304 \210\212\305\306\307\310\"r\211q\210\311\312\"\216\313\314\315\310\315\316%\210eb\210\317\320!\210\321\322\315\310#\210\323`T\324 \"*\262!\210)\317\325\326\327 !P!\210\330 \207" [helm-system-packages-buffer switch-to-buffer view-mode 0 erase-buffer insert-file-contents-literally generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] process-file "pacman" nil "--verbose" keep-lines "^Log File" search-forward ":" buffer-substring-no-properties line-end-position "\\[PACMAN\\].*" regexp-opt helm-marked-candidates log-view-mode] 9 (#$ . 13130)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable helm-system-packages-pacman-actions funcall function #[0 "\300\207" [(("Show package(s)" . helm-system-packages-pacman-info) ("Install (`C-u' to reinstall)" . helm-system-packages-pacman-install) ("Uninstall (`C-u' to include dependencies)" . helm-system-packages-pacman-uninstall) ("Browse homepage URL" lambda (_) (helm-system-packages-browse-url (split-string (helm-system-packages-run "expac" "--sync" "%u") "\n" t))) ("Find files" . helm-system-packages-pacman-find-files) ("Show dependencies (`C-u' to include optional deps)" . helm-system-packages-pacman-show-dependencies) ("Show reverse dependencies" lambda (_) (helm-system-packages-pacman-show-dependencies _ 'reverse)) ("Mark as dependency" lambda (_) (helm-system-packages-run-as-root-over-installed "pacman" "--database" "--asdeps")) ("Mark as explicit" lambda (_) (helm-system-packages-run-as-root-over-installed "pacman" "--database" "--asexplicit")) ("Show history" . helm-system-packages-pacman-history))] 1] "Actions for Helm pacman." :group helm-system-packages :type (alist :key-type string :value-type function)] 8) #@31 Build Helm source for pacman. (defalias 'helm-system-packages-pacman-build-source #[0 "\303\304 \305\"\206 \306\307\310\311\312\313\314\315\316\317\320 \321\322\323\324\325\n&\207" [helm-system-packages-candidate-limit helm-system-packages-pacman-map helm-system-packages-pacman-actions plist-get helm-system-packages--cache-get :title "package manager" helm-make-source helm-source-in-buffer :init helm-system-packages-init :candidate-transformer helm-system-packages-pacman-transformer :candidate-number-limit :display-to-real helm-system-packages-extract-name :keymap :help-message helm-system-packages-pacman-help-message :persistent-help "Show package description" :action] 20 (#$ . 15049)]) #@34 Preconfigured `helm' for pacman. (defalias 'helm-system-packages-pacman #[0 "\301\302!?\205\303\304\305 \306\307\310\311\312\205\313\314\315!\206\316!&\207" [helm-system-packages-use-symbol-at-point-p helm-system-packages-missing-dependencies-p "expac" helm :sources helm-system-packages-pacman-build-source :buffer "*helm pacman*" :truncate-lines t :input substring-no-properties thing-at-point symbol ""] 11 (#$ . 15756)]) (provide 'helm-system-packages-pacman)