Commit 976ca293 authored by Dimitri Fontaine's avatar Dimitri Fontaine

Status file fixes, now that we deal with a package symbol.

There's a difference between 'package and :package even if both are symbolp.
parent f760b1a6
......@@ -77,6 +77,12 @@ returning a list that contains it (and only it)."
(if (listp element-or-list) element-or-list
(list element-or-list)))
(defun el-get-source-name (source)
"Return the package name (stringp) given an `el-get-sources'
entry."
(if (symbolp source) (symbol-name source)
(format "%s" (plist-get source :name))))
;;
;; Common support bits
......
......@@ -44,13 +44,6 @@
)
;;; END "Fuzzy" data structure support
(defun el-get-source-name (source)
"Return the package name (stringp) given an `el-get-sources'
entry."
(if (symbolp source) (symbol-name source)
(format "%s" (plist-get source :name))))
(defconst el-get-build-recipe-body
'(choice :tag "Format"
......
......@@ -23,7 +23,9 @@
(defun el-get-package-symbol (package-name)
"Returns a symbol :package."
(if (symbolp package-name) package-name
(if (and (symbolp package-name)
(string= (substring (symbol-name package-name) 0 1) ":"))
package-name
(intern (format ":%s" package-name))))
(defun el-get-package-name (package-symbol)
......@@ -56,7 +58,7 @@
(defun el-get-list-package-names-with-status (&rest status)
"Return package names that are currently in given status"
(loop for (p s) on (el-get-read-all-packages-status) by 'cddr
if (member s status) collect (el-get-package-name p)))
when (member s status) collect (el-get-package-name p)))
(defun el-get-read-package-with-status (action &rest status)
"Read a package name in given status"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment