mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 04:58:53 +08:00
Make check for apt-get package work (#2434)
* Pass package name to dpkg-query * dpkg-query reports status as 'install ok installed' * when el-get name is different from apt-get name
This commit is contained in:
parent
5696301d84
commit
a6638a664a
|
@ -40,8 +40,8 @@
|
|||
;;
|
||||
(defun el-get-dpkg-package-installed-p (package)
|
||||
"Return non-nil if PACKAGE is installed according to dpkg."
|
||||
(equal "installed"
|
||||
(car (process-lines "dpkg-query" "--show" "--showformat=${Status}\n"))))
|
||||
(equal "install ok installed"
|
||||
(car (process-lines "dpkg-query" "--show" "--showformat=${Status}\n" package))))
|
||||
|
||||
;;
|
||||
;; those functions are meant as hooks at install and remove, and they will
|
||||
|
@ -123,7 +123,8 @@ password prompt."
|
|||
(defun el-get-apt-get-install-if-needed (package url post-install-fun)
|
||||
"Call `el-get-apt-get-install' if PACKAGE isn't installed yet.
|
||||
The installation status is retrieved from the system, not el-get."
|
||||
(when (el-get-dpkg-package-installed-p package)
|
||||
(when (el-get-dpkg-package-installed-p (or (plist-get (el-get-package-def package) :pkgname)
|
||||
(el-get-as-string package)))
|
||||
(el-get-apt-get-install package url post-install-fun)))
|
||||
|
||||
(defun el-get-apt-get-install (package url post-install-fun)
|
||||
|
|
Loading…
Reference in New Issue
Block a user