From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: master 38fb5f4: Make make-dist more automatic Date: Sat, 02 Feb 2019 14:19:51 -0500 Message-ID: References: <20190201234220.19088.3350@vcs0.savannah.gnu.org> <20190201234221.F285C205D8@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="216956"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: Paul Eggert To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 02 20:20:06 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gq0pf-000uIc-PZ for ged-emacs-devel@m.gmane.org; Sat, 02 Feb 2019 20:20:03 +0100 Original-Received: from localhost ([127.0.0.1]:47034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gq0pe-0002NL-PZ for ged-emacs-devel@m.gmane.org; Sat, 02 Feb 2019 14:20:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gq0pW-0002NF-NO for emacs-devel@gnu.org; Sat, 02 Feb 2019 14:19:55 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gq0pW-0007Ob-4g; Sat, 02 Feb 2019 14:19:54 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1gq0pU-0005dJ-7L; Sat, 02 Feb 2019 14:19:52 -0500 X-Spook: KGB global Blowpipe Ansar al-Islam Mexicles X-Ran: SKuy`^Pgo*hPVp$q|^LWr&r,``0@$R0?u#O;!IFe=OSg7Z~&FAi!v:1Q|OTzf9C6|IW6.? X-Hue: green X-Attribution: GM In-Reply-To: <20190201234221.F285C205D8@vcs0.savannah.gnu.org> (Paul Eggert's message of "Fri, 1 Feb 2019 18:42:21 -0500 (EST)") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232914 Archived-At: 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 -