Fixed some problems with updated epkgs repository.

Now uses both the .config and master files.
This commit is contained in:
Donald Ephraim Curtis 2011-12-03 00:40:52 -06:00
parent 0f8bbb6ce8
commit c2cde4998b
2 changed files with 28 additions and 27 deletions

2
epkgs

@ -1 +1 @@
Subproject commit ad3160bc041ce0a977b0bd0bd72179bff30760c9
Subproject commit 6f590af6c53cebeb563ce7d40afd4ba9f24e04a7

View file

@ -154,18 +154,17 @@
"build the pkg file"
(let ((print-level nil)
(print-length nil)
(pkglst (or (package-read-from-file pkg-file)
(list 'define-package
file-name
version
homepage
;; (list 'quote
;; ;; Turn version lists into string form.
(list 'quote (mapcar
(lambda (elt)
(list (car elt)
(package-version-join (cadr elt))))
nil))))))
(pkglst
(or (package-read-from-file pkg-file)
(list 'define-package
file-name
version
homepage
(list 'quote (mapcar
(lambda (elt)
(list (car elt)
(package-version-join (cadr elt))))
nil))))))
;; set the packages version
(setq pkglst (package-change-list-elt pkglst 2 version))
@ -193,6 +192,10 @@
(buffer-substring-no-properties (point-min) (point-max))))))))
(defun package-build-get-config (file-name)
"get the configuration information for the given file-name"
(package-read-from-file (format "epkgs/%s/.config" file-name)))
(defun package-build-get-master (file-name)
"get the configuration information for the given file-name"
(package-read-from-file (format "epkgs/%s/master" file-name)))
@ -227,13 +230,13 @@
(defun package-build-archive (file-name)
"build a git package archive"
(interactive)
(let* ((desc (package-build-get-config file-name))
(let* ((desc (package-build-get-master file-name))
(cfg (package-build-get-config file-name))
(name (intern file-name))
(local-dir (file-name-as-directory (expand-file-name file-name package-build-working-dir))))
(when desc
(let* ((repo (plist-get desc :repository))
(repo-type (car repo))
(repo-url (cdr repo))
(let* ((repo-type (plist-get cfg :fetcher))
(repo-url (plist-get cfg :url))
(summary (plist-get desc :summary)))
(package-build-read-archive-contents)
@ -256,14 +259,14 @@
(concat (file-name-as-directory package-build-working-dir)
(file-name-as-directory pkg-base-dir))))
(default-directory package-build-working-dir))
(when (file-exists-p local-dir)
(when (and (file-exists-p local-dir) version)
(copy-directory file-name pkg-base-dir)
(setq pkglst (package-build-pkg-file pkg-file file-name version summary))
(setq pkgdeps (mapcar
(lambda (elt)
(list (car elt) (version-to-list (cadr elt))))
(eval (nth 4 pkglst))))
(message (prin1-to-string pkgdeps))
(message "deps: %s"(prin1-to-string pkgdeps))
(package-build-create-tar
pkg-base-dir
(expand-file-name
@ -271,9 +274,7 @@
(delete-directory pkg-base-dir t nil)
(package-build-add-to-archive-contents name version pkgdeps summary 'tar)
(package-build-dump-archive-contents)
)
)
))))
(message "Success!")))))))
(defun package-build-dump-archive-contents ()
"dump the archive contents back to the file"