Ignore duplicate files in tar.

Sometimes the name-pkg.el file is included but gets included twice
because we also add our own version. This causes problems when
installing.  The `tar' will list both files and extract only one and
the tar mode for Emacs doesn't behave nicely.
This commit is contained in:
Donald Curtis 2012-05-14 10:01:40 -05:00
parent ca5608128f
commit 42ac78dad8

View file

@ -585,7 +585,7 @@ FILES is a list of (SOURCE . DEST) relative filepath pairs."
(expand-file-name (expand-file-name
(concat file-name "-" version ".tar") package-build-archive-dir) (concat file-name "-" version ".tar") package-build-archive-dir)
pkg-dir pkg-dir
(append (mapcar 'cdr files) (list pkg-file))) (delete-dups (append (mapcar 'cdr files) (list pkg-file))))
(delete-directory pkg-dir t nil) (delete-directory pkg-dir t nil)
(pb/add-to-archive-contents pkg-info 'tar))) (pb/add-to-archive-contents pkg-info 'tar)))