From 4119ac1741ad1ff96679487dc617235b5b5f3060 Mon Sep 17 00:00:00 2001 From: David Leatherman Date: Wed, 11 Apr 2012 19:10:01 -0400 Subject: [PATCH 1/3] Add the package source to the package description --- package-build.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/package-build.el b/package-build.el index af302a8a..a172e04f 100644 --- a/package-build.el +++ b/package-build.el @@ -365,19 +365,20 @@ The file is written to `package-build-working-dir'." (nth 2 pkgfile-info) (nth 1 pkgfile-info))))) - (defun pb/expand-file-list (dir files) "In DIR, expand FILES, some of which may be shell-style wildcards." (let ((default-directory dir)) (mapcan 'file-expand-wildcards files))) -(defun pb/merge-package-info (pkg-info name version) +(defun pb/merge-package-info (config pkg-info name version) "Return a version of PKG-INFO updated with NAME and VERSION. If PKG-INFO is nil, an empty one is created." - (let ((merged (or (copy-seq pkg-info) - (vector name nil "No description available." version)))) - (aset merged 3 version) + (let* ((merged (or (copy-seq pkg-info) + (vector name nil "No description available." version)))) (aset merged 0 (downcase name)) + (aset merged 2 (format "%s [Packaged source: %s]" + (aref merged 2) (plist-get config :fetcher))) + (aset merged 3 version) merged)) (defun pb/dump-archive-contents () @@ -437,6 +438,7 @@ If PKG-INFO is nil, an empty one is created." (concat file-name "-" version ".el") package-build-archive-dir)) (pkg-info (pb/merge-package-info + cfg (pb/get-package-info pkgsrc) file-name version))) @@ -450,6 +452,7 @@ If PKG-INFO is nil, an empty one is created." (pkg-file (concat file-name "-pkg.el")) (pkg-info (pb/merge-package-info + cfg (let ((default-directory pkg-cwd)) (or (pb/get-pkg-file-info pkg-file) ;; some packages (like magit) provide name-pkg.el.in From aad9c41d76eef9bc7ca3b279ea446326f73b6df7 Mon Sep 17 00:00:00 2001 From: David Leatherman Date: Thu, 12 Apr 2012 07:52:07 -0400 Subject: [PATCH 2/3] Updated source tag to simply [source: ] --- package-build.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-build.el b/package-build.el index a172e04f..e868f1e9 100644 --- a/package-build.el +++ b/package-build.el @@ -376,7 +376,7 @@ If PKG-INFO is nil, an empty one is created." (let* ((merged (or (copy-seq pkg-info) (vector name nil "No description available." version)))) (aset merged 0 (downcase name)) - (aset merged 2 (format "%s [Packaged source: %s]" + (aset merged 2 (format "%s [source: %s]" (aref merged 2) (plist-get config :fetcher))) (aset merged 3 version) merged)) From 252137632d458cb5727faac028231d33cbd87bae Mon Sep 17 00:00:00 2001 From: David Leatherman Date: Thu, 12 Apr 2012 09:12:40 -0400 Subject: [PATCH 3/3] Moved config argument to the end --- package-build.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package-build.el b/package-build.el index e868f1e9..512e01d2 100644 --- a/package-build.el +++ b/package-build.el @@ -370,7 +370,7 @@ The file is written to `package-build-working-dir'." (let ((default-directory dir)) (mapcan 'file-expand-wildcards files))) -(defun pb/merge-package-info (config pkg-info name version) +(defun pb/merge-package-info (pkg-info name version config) "Return a version of PKG-INFO updated with NAME and VERSION. If PKG-INFO is nil, an empty one is created." (let* ((merged (or (copy-seq pkg-info) @@ -438,10 +438,10 @@ If PKG-INFO is nil, an empty one is created." (concat file-name "-" version ".el") package-build-archive-dir)) (pkg-info (pb/merge-package-info - cfg (pb/get-package-info pkgsrc) file-name - version))) + version + cfg))) (print pkg-info) (when (file-exists-p pkgdst) (delete-file pkgdst t)) @@ -452,13 +452,14 @@ If PKG-INFO is nil, an empty one is created." (pkg-file (concat file-name "-pkg.el")) (pkg-info (pb/merge-package-info - cfg (let ((default-directory pkg-cwd)) (or (pb/get-pkg-file-info pkg-file) ;; some packages (like magit) provide name-pkg.el.in (pb/get-pkg-file-info (concat pkg-file ".in")) (pb/get-package-info (concat file-name ".el")))) - file-name version))) + file-name + version + cfg))) (print pkg-info) (copy-directory file-name pkg-dir)