[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/system-packages ede298f 094/117: Add system-packages-en
From: |
Stefan Monnier |
Subject: |
[elpa] externals/system-packages ede298f 094/117: Add system-packages-ensure |
Date: |
Fri, 14 Dec 2018 17:02:15 -0500 (EST) |
branch: externals/system-packages
commit ede298ff50f70143f04abbf735aea3e0075b3819
Author: Alex Branham <address@hidden>
Commit: Alex Branham <address@hidden>
Add system-packages-ensure
Also an alias for system-packages-package-installed-p to
executable-find. This is somewhat related to bug #26, since you can
now do something clever with if statments: if pack-man=apt, then
ensure blah, else if pack-man=pacman, ensure blah-foo.
Obviously, there's still work to be done here.
---
system-packages.el | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/system-packages.el b/system-packages.el
index d425198..6b3f426 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -354,6 +354,22 @@ manger."
(system-packages--run-command 'install pack args))
;;;###autoload
+(defun system-packages-ensure (pack &optional args)
+ "Ensure PACK is installed on system.
+Search for PACK with `system-packages-package-installed-p', and
+install the package if not found. Use ARGS to pass options to
+the package manager."
+ (if (system-packages-package-installed-p pack)
+ t
+ (system-packages-install pack args)))
+
+;;;###autoload
+(defalias 'system-packages-package-installed-p #'executable-find
+ "Return t if PACK is installed.
+Currently an alias for `executable-find', so it will give wrong
+results if the package and executable names are different.")
+
+;;;###autoload
(defun system-packages-search (pack &optional args)
"Search for system packages.
- [elpa] externals/system-packages d18b2c0 108/117: Update dir-local bug-reference-url-format to point to gitlab, (continued)
- [elpa] externals/system-packages d18b2c0 108/117: Update dir-local bug-reference-url-format to point to gitlab, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 2e38329 109/117: Remove cl-lib dependency, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages e5f8c29 114/117: Version 1.0.9, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 1f3eb2a 091/117: Version bump 1.0.3, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages e42e8e7 096/117: Simplify sudo handling, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 3af0d4d 104/117: system-packages--run-command: Inhibit read-only text properties, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages e53540f 102/117: Update CI to use Emacs docker image, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 54f8243 116/117: Version 1.0.10, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages e821fa2 056/117: Drop support for pacaur, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages ce34019 066/117: Update travis to use latest Emacs release, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages ede298f 094/117: Add system-packages-ensure,
Stefan Monnier <=
- [elpa] externals/system-packages f85a7bf 083/117: Remove unneeded :group statements, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages ec3ca7a 078/117: Fix brew list, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages ed5d9cc 082/117: Improve system-packages-package-manager :type defcustom, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 04e2f7f 087/117: Make travis run tests, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages e4551fc 079/117: Add initial support for guix, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages df01469 113/117: Ensure a space between command and args, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 453802c 110/117: Add cache cleaning commands for nix and guix, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 4f82d24 092/117: Fix missing space before a nonconfirm option, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages fff67d1 084/117: README: add guix, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages b504534 115/117: Revert "Ensure a space between command and args", Stefan Monnier, 2018/12/14