;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'helm-system-packages) (defvar helm-system-packages-xbps-help-message "* Helm xbps\n\n** Options\n\n- `helm-system-packages-xbps-confirm-p'\n- `helm-system-packages-xbps-sync-threshold'\n- `helm-system-packages-xbps-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-pinned] Toggle display of pinned packages.\n\\[helm-system-packages-toggle-descriptions] Toggle display of package descriptions.") (defvar helm-system-packages-xbps-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\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 [134217808] helm-system-packages-toggle-pinned "" helm-system-packages-toggle-descriptions] 5)) #@17 (fn PACKAGES) (defalias 'helm-system-packages-xbps-transformer #[257 "\305\306!\211\211\203a\211@\307\310!\311\312 \313\"\"A\211\204'\203'B\262\210\202Z \2031\314>\204O\n\203;\315>\204O \203E\316>\204O\f\203Y\317>\203Y\320\321@#B\262\210A\266\202\202\207" [helm-system-packages--show-uninstalled-p helm-system-packages--show-explicit-p helm-system-packages--show-dependencies-p helm-system-packages--show-orphans-p helm-system-packages--show-pinned-p nil reverse assoc helm-system-packages-extract-name plist-get helm-system-packages--cache-get :display helm-system-packages-explicit helm-system-packages-dependencies helm-system-packages-orphans helm-system-packages-pinned propertize face] 10 (#$ . 1427)]) #@37 List explicitly installed packages. (defalias 'helm-system-packages-xbps-list-explicit #[0 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307\310\303\310\311%\210eb\210\312\313\310\303#\203(\314\315!\210\202\316 *\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 "xbps-query" nil "--list-manual-pkgs" re-search-forward "-[^-]+$" replace-match "" buffer-string] 8 (#$ . 2174)]) #@141 List packages installed as a required dependency. NON-DEPENDENCIES are package lists which are to be excluded. (fn &rest NON-DEPENDENCIES) (defalias 'helm-system-packages-xbps-list-dependencies #[128 "\300\301\302\303\304\305\"r\211q\210\306\307\"\216\310\311\312\305\312\313\314\315\316&\210eb\210\317\320\312\305#\203/\321\314!\210\202 \322 *\262!#\207" [seq-reduce seq-difference split-string generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] process-file "xbps-query" nil "--search" "" "--prop" "automatic-install" re-search-forward "-[^-]+$" replace-match buffer-string] 15 (#$ . 2664)]) #@49 List orphan packages (unrequired dependencies). (defalias 'helm-system-packages-xbps-list-orphans #[0 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307\310\303\310\311%\210eb\210\312\313\310\303#\203(\314\315!\210\202\316 *\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 "xbps-query" nil "--list-orphans" re-search-forward "-[^-]+$" replace-match "" buffer-string] 8 (#$ . 3332)]) #@88 List pinned installed packages. That is, packages that won't be updated automatically. (defalias 'helm-system-packages-xbps-list-pinned #[0 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307\310\303\310\311%\210eb\210\312\313\310\303#\203(\314\315!\210\202\316 *\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 "xbps-query" nil "--list-hold-pkgs" re-search-forward "-[^-]+$" replace-match "" buffer-string] 8 (#$ . 3828)]) #@63 Cache all package names with descriptions. (fn DISPLAY-LIST) (defalias 'helm-system-packages-xbps-cache #[257 "\300\211\301\302\303\"r\211q\210\304\305\"\216\306\307\300\303\300\310\311\312&\210eb\210m\204M\313\314!\210\315\316\300\303#\210\317\300f\320\"\204@\313\321!\210\316c\210\322u\210\202+\313\321!\210\316c\210\300y\210\202\323 *\262\262\324\325\312#\262\326\327$\207" [nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] process-file "xbps-query" "-R" "--search" "" delete-char 4 search-forward " " char-equal 45 1 -2 buffer-string replace-regexp-in-string " .*" helm-system-packages--cache-set "xbps"] 12 (#$ . 4364)]) #@27 Refresh the package list. (defalias 'helm-system-packages-xbps-refresh #[0 "\300 \301 \302 \303#\304\211\203!\211@\211\305BB\262A\266\202\202 \210\211\2037\211@\211\306BB\262A\266\202\202#\210\211\203M\211@\211\307BB\262A\266\202\2029\210\211\203c\211@\211\310BB\262A\266\202\202O\210\311!\207" [helm-system-packages-xbps-list-explicit helm-system-packages-xbps-list-orphans helm-system-packages-xbps-list-pinned helm-system-packages-xbps-list-dependencies nil (helm-system-packages-explicit) (helm-system-packages-dependencies) (helm-system-packages-orphans) (helm-system-packages-pinned) helm-system-packages-xbps-cache] 9 (#$ . 5078) nil]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable helm-system-packages-xbps-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-xbps-outdated-database-p #[0 "\205\301\302\303\304\305\306\307!!\"\301\"\237@\310\311 \312!\"\"\207" [helm-system-packages-xbps-synchronize-threshold time-less-p sort mapcar #[257 "\300\301!8\207" [5 file-attributes] 4 "\n\n(fn FILE)"] file-expand-wildcards expand-file-name "/var/db/xbps/*/*-repodata" time-subtract current-time seconds-to-time] 7 (#$ . 6095)]) #@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-xbps-info #[257 "\301\302\303\304\203 C\202\305 !\"!\207" [helm-in-persistent-action helm-system-packages-show-information helm-system-packages-mapalist ((uninstalled (lambda (packages) (mapcar (lambda (pkg) (cons pkg (helm-system-packages-call "xbps-query" nil "-R" pkg))) packages))) (all (lambda (packages) (mapcar (lambda (pkg) (cons pkg (helm-system-packages-call "xbps-query" nil pkg))) packages)))) helm-system-packages-categorize helm-marked-candidates] 6 (#$ . 6598)]) (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-xbps-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-xbps-confirm-p #[0 "\300\207" [t] 1] "Prompt for confirmation before proceeding with transaction."] 8) #@36 Install marked candidates. (fn _) (defalias 'helm-system-packages-xbps-install #[257 "\203\304 \305 \210\306 \204db\210\307\310\261\210)\311\312\313 \205 \314\n\205%\315 ?\205+\316$\207" [helm-system-packages-xbps-auto-clean-cache eshell-buffer-name helm-current-prefix-arg helm-system-packages-xbps-confirm-p helm-system-packages-shell-name eshell eshell-interactive-process "sudo xbps-remove --clean-cache " "&& " helm-system-packages-run-as-root "xbps-install" helm-system-packages-xbps-outdated-database-p "--sync" "--force" "--yes"] 6 (#$ . 8205)]) #@38 Uninstall marked candidates. (fn _) (defalias 'helm-system-packages-xbps-uninstall #[257 "\302\303\205\304 ?\205 \305#\207" [helm-current-prefix-arg helm-system-packages-xbps-confirm-p helm-system-packages-run-as-root-over-installed "xbps-remove" "--recursive" "--yes"] 5 (#$ . 8776)]) #@52 Browse homepage URLs of marked candidates. (fn _) (defalias 'helm-system-packages-xbps-browse-url #[257 "\300\301\302\303 \"!\207" [helm-system-packages-browse-url mapcar #[257 "\300\301\302\303\304\305&\207" [helm-system-packages-call "xbps-query" nil "-R" "--prop" "homepage"] 8 "\n\n(fn PKG)"] helm-marked-candidates] 5 (#$ . 9073)]) #@43 Find files for marked candidates. (fn _) (defalias 'helm-system-packages-xbps-find-files #[257 "\300\301\302\303\"\304 \211\203@\211@\305\306\307\310\311\312\313\314\315 %#\316\317#\211\2038\211@\320\321\"B#\266A\266\202\202\210A\266\202\202\262\262!\207" [helm-system-packages-find-files make-hash-table :test equal helm-marked-candidates split-string replace-regexp-in-string " -> .*" "" helm-system-packages-call "xbps-query" nil "-R" "--files" "\n" t puthash gethash] 15 (#$ . 9420)]) #@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-xbps-show-dependencies #[513 "\211\203\300\202 \301\203\302\202\303\304\305\306\307 \310#Q\311\312\305\306\313\314\315\"\307 \"\316#BC\"\207" ["-X" "-x" "Reverse dependencies" "Dependencies" " of " mapconcat identity helm-marked-candidates " " helm-system-packages-show-packages uninstalled mapcar make-closure #[257 "\301\302\303\304\305\306\307\300%#\207" [V0 replace-regexp-in-string "[-<>][^-<>]+$" "" helm-system-packages-call "xbps-query" nil "-R"] 10 "\n\n(fn PKG)"] "\n"] 12 (#$ . 9937)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable helm-system-packages-xbps-actions funcall function #[0 "\300\207" [(("Show package(s)" . helm-system-packages-xbps-info) ("Install (`C-u' to reinstall)" . helm-system-packages-xbps-install) ("Uninstall (`C-u' to include dependencies)" . helm-system-packages-xbps-uninstall) ("Browse homepage URL" . helm-system-packages-xbps-browse-url) ("Find files" . helm-system-packages-xbps-find-files) ("Show dependencies (`C-u' to include optional deps)" . helm-system-packages-xbps-show-dependencies) ("Show reverse dependencies" lambda (_) (helm-system-packages-xbps-show-dependencies _ 'reverse)) ("Mark as dependency" lambda (_) (helm-system-packages-run-as-root-over-installed "xbps-pkgdb" "--mode" "auto")) ("Mark as explicit" lambda (_) (helm-system-packages-run-as-root-over-installed "xbps-pkgdb" "--mode" "manual")) ("Pin package" lambda (_) (helm-system-packages-run-as-root-over-installed "xbps-pkgdb" "--mode" "hold")) ("Unpin package" lambda (_) (helm-system-packages-run-as-root-over-installed "xbps-pkgdb" "--mode" "unhold")) ("Check for errors" lambda (_) (helm-system-packages-run-as-root-over-installed "xbps-pkgdb")) ("Reconfigure (`C-u' to force)" lambda (_) (helm-system-packages-run-as-root-over-installed "xbps-reconfigure" (when helm-current-prefix-arg "--force"))))] 1] "Actions for Helm xbps." :group helm-system-packages :type (alist :key-type string :value-type function)] 8) #@29 Build Helm source for xbps. (defalias 'helm-system-packages-xbps-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-xbps-map helm-system-packages-xbps-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-xbps-transformer :candidate-number-limit :display-to-real helm-system-packages-extract-name :keymap :help-message helm-system-packages-xbps-help-message :persistent-help "Show package description" :action] 20 (#$ . 12129)]) #@32 Preconfigured `helm' for xbps. (defalias 'helm-system-packages-xbps #[0 "\301\302\303 \304\305\306\307\310\205\311\312\313!\206\314!&\207" [helm-system-packages-use-symbol-at-point-p helm :sources helm-system-packages-xbps-build-source :buffer "*helm xbps*" :truncate-lines t :input substring-no-properties thing-at-point symbol ""] 11 (#$ . 12824)]) (provide 'helm-system-packages-xbps)