emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 38fb5f4: Make make-dist more automatic


From: Glenn Morris
Subject: Re: master 38fb5f4: Make make-dist more automatic
Date: Sat, 02 Feb 2019 14:19:51 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

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"







reply via email to

[Prev in Thread] Current Thread [Next in Thread]