From: Glenn Morris <rgm@gnu.org>
To: emacs-devel@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: master 38fb5f4: Make make-dist more automatic
Date: Sat, 02 Feb 2019 14:19:51 -0500 [thread overview]
Message-ID: <xfpnsaj8vc.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <20190201234221.F285C205D8@vcs0.savannah.gnu.org> (Paul Eggert's message of "Fri, 1 Feb 2019 18:42:21 -0500 (EST)")
Hi,
> branch: master
> commit 38fb5f4d22a5d69621a8b42bf39258af0919b456
> Make make-dist more automatic
I like the simplification, but I have some issues with the MANIFEST file.
1) I don't think it should be linked to --no-update. The MANIFEST file
is fundamental to creating a tar file and it needs to be up-to-date.
As it stands, if you use --no-update you can easily end up with a stale
MANIFEST file and a broken tar file. If it does need to be optional,
please can it have a separate eg --no-update-manifest option.
2) Running make-dist leaves a top-level MANIFEST file that nothing ever
deletes. Since in the vast majority of the time this file will be an
automatically generated file, I think it would be better to use a
temporary file. This also takes care of point 1.
Here's a possible patch.
This excludes itself MANIFEST from the tar file.
It could be re-added, but I don't know what the point would be.
--- i/make-dist
+++ w/make-dist
@@ -364,7 +364,7 @@ fi
# Don't distribute site-init.el, site-load.el, or default.el.
possibly_non_vc_files="
$top_level_ChangeLog
- MANIFEST aclocal.m4 configure
+ aclocal.m4 configure
admin/charsets/jisx2131-filter
src/config.in src/dmpstruct.h src/emacs-module.h
src/fingerprint.c
@@ -381,27 +381,31 @@ else
info_files=
fi
+echo "Creating staging directory: '${tempparent}'"
+
+mkdir ${tempparent} || exit
+tempdir="${tempparent}/${emacsname}"
+
+manifest=MANIFEST
+
+[ -f $manifest ] || manifest=${tempparent}/MANIFEST
+
# If Git is in use update the file MANIFEST, which can substitute for
# 'git ls-files' later (e.g., after extraction from a tarball).
# Otherwise, rely on the existing MANIFEST, which should be maintained some
# other way when adding or deleting a distributed file while not using Git.
-if ( [ $update = yes ] || [ ! -f MANIFEST ] ) && [ -r .git ]; then
- echo "Updating MANIFEST"
+if ( [ $update = yes ] || [ ! -f $manifest ] ) && [ -r .git ]; then
+ echo "Updating $manifest"
if [ $with_tests = yes ]; then
- git ls-files >MANIFEST
+ git ls-files > $manifest
else
- git ls-files | grep -v '^test' >MANIFEST
+ git ls-files | grep -v '^test' >$manifest
fi || exit
- printf '%s\n' $possibly_non_vc_files $info_files >>MANIFEST || exit
- sort -u -o MANIFEST MANIFEST || exit
+ printf '%s\n' $possibly_non_vc_files $info_files >>$manifest || exit
+ sort -u -o $manifest $manifest || exit
fi
-<MANIFEST || exit
-
-echo "Creating staging directory: '${tempparent}'"
-
-mkdir ${tempparent} || exit
-tempdir="${tempparent}/${emacsname}"
+<$manifest || exit
### This trap ensures that the staging directory will be cleaned up even
### when the script is interrupted in mid-career.
@@ -449,13 +453,13 @@ MANIFEST_subdir_sed='
/^$/d
s,^,'$tempdir'/,
'
-tempsubdirs=$(sed "$MANIFEST_subdir_sed" MANIFEST | sort -u)
+tempsubdirs=$(sed "$MANIFEST_subdir_sed" $manifest | sort -u)
$mkdir_verbose -p $tempsubdirs || exit
echo "Making links to files"
while read file; do
[ $file = "$file_to_skip" ] || ln $file $tempdir/$file || exit
-done <MANIFEST
+done <$manifest
if [ "${newer}" ]; then
printf '%s\n' "Removing files older than $newer"
next parent reply other threads:[~2019-02-02 19:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190201234220.19088.3350@vcs0.savannah.gnu.org>
[not found] ` <20190201234221.F285C205D8@vcs0.savannah.gnu.org>
2019-02-02 19:19 ` Glenn Morris [this message]
2019-02-03 3:27 ` master 38fb5f4: Make make-dist more automatic Paul Eggert
2019-02-05 3:54 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xfpnsaj8vc.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.