Print a warning when :files is redundant

If a :files spec is provided and expands to the same set of files as
package-build-default-files-spec, then print a warning.
This commit is contained in:
Steve Purcell 2014-02-21 10:01:54 +00:00
parent a04dd517e0
commit 686ee3a775

View file

@ -856,6 +856,10 @@ Returns the archive entry for the package."
(when (symbolp package-name) (when (symbolp package-name)
(setq package-name (symbol-name package-name))) (setq package-name (symbol-name package-name)))
(let ((files (package-build-expand-file-specs source-dir file-specs))) (let ((files (package-build-expand-file-specs source-dir file-specs)))
(unless (equal file-specs package-build-default-files-spec)
(when (equal files (package-build-expand-file-specs
source-dir package-build-default-files-spec nil t))
(pb/message "Note: this :files spec is equivalent to the default.")))
(cond (cond
((not version) ((not version)
(error "Unable to check out repository for %s" package-name)) (error "Unable to check out repository for %s" package-name))