Correct the format of recipe when check for update

This commit is contained in:
ynilu 2016-10-01 09:40:56 +08:00 committed by d12frosted
parent e6357a5ea3
commit 3b6c0e3b31
No known key found for this signature in database
GPG Key ID: 8F60E862D6F5CE8F
2 changed files with 4 additions and 4 deletions

View File

@ -1419,18 +1419,18 @@ wether the declared layer is an used one or not."
(when pkg
(let ((location (oref pkg :location)))
(when (and (listp location) (eq 'recipe (car location)))
location)))))
(cons pkg-name (cdr location)))))))
(defun configuration-layer//new-version-available-p (pkg-name)
"Return non nil if there is a new version available for PKG-NAME."
(let ((recipe (configuration-layer//get-package-recipe pkg-name))
(cur-version (configuration-layer//get-package-version-string pkg-name))
(quelpa-upgrade-p t)
new-version)
(when cur-version
(setq new-version
(if recipe
(quelpa-checkout recipe (expand-file-name (symbol-name pkg-name)
quelpa-build-dir))
(or (quelpa-checkout recipe (expand-file-name (symbol-name pkg-name) quelpa-build-dir)) cur-version)
(configuration-layer//get-latest-package-version-string
pkg-name)))
;; (message "%s: %s > %s ?" pkg-name cur-version new-version)

View File

@ -1746,7 +1746,7 @@
'layer-no-recipe-1)
,(configuration-layer/make-package '(pkg2 :location elpa)
'layer-no-recipe-1)) t)
(should (eq 'recipe
(should (eq 'pkg1
(car (configuration-layer//get-package-recipe 'pkg1))))))
(ert-deftest test-get-package-recipe--return-nil-if-package-has-no-recipe ()