From 3bf025e6596f8d21b3e9e2aade9397f62a156fcd Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Tue, 20 Mar 2012 19:33:09 +0000 Subject: [PATCH] Explicitly default :files to "*.el", expanded after check-out. This resolves the inconsistency wherein an empty :files value meant "every file" for git packages, but just "package-name.el" for wiki packages. It also allows the removal of most :files values in the pkglist, since "*.el" is almost always the Right Value. --- package-build.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/package-build.el b/package-build.el index 0b0d07ee..7bc1701e 100644 --- a/package-build.el +++ b/package-build.el @@ -357,17 +357,15 @@ If PKG-INFO is nil, an empty one is created." (expand-file-name file-name package-build-working-dir)))) (let* ((version (pb/checkout name cfg pkg-cwd)) - (files (pb/expand-file-list pkg-cwd (plist-get cfg :files))) + (files (pb/expand-file-list pkg-cwd + (or (plist-get cfg :files) + (list "*.el")))) (default-directory package-build-working-dir)) (cond ((not version) (print (format "Unable to check out repository for %s" name))) - ((or (and (eq 'wiki (plist-get cfg :fetcher)) - (< (length files) 2)) - (= 1 (length files))) - (let* ((pkgsrc (expand-file-name (or (car files) - (concat file-name ".el")) - pkg-cwd)) + ((= 1 (length files)) + (let* ((pkgsrc (expand-file-name (car files) pkg-cwd)) (pkgdst (expand-file-name (concat file-name "-" version ".el") package-build-archive-dir))