[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] maint: edit-readme-alpha shouldn't try to re-edit during dis
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH] maint: edit-readme-alpha shouldn't try to re-edit during dist. |
Date: |
Tue, 21 Sep 2010 07:07:08 +0200 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
Hi Gary,
* Gary V. Vaughan wrote on Tue, Sep 21, 2010 at 03:05:46AM CEST:
> Well, it does at least show that the script interacts correctly with
> an error for make to help catch the case where someone commits a change
> to the first paragraph of README without a matching edit to the sed
> expressions in edit-readme-alpha.
>
> Here is (an overkill) patch to not exit with an error, so that `make
> distcheck' can complete.
>
> Okay to push?
Well, I don't want to appear overly nitpicky for this issue,
but if you don't absolutely need to check and skip non-writable files,
I wouldn't do it, and rather error out in that case.
> * libltdl/config/edit-readme-alpha: If README is non-writable
> assume that it is being run from distcheck, and bail out with
> a warning
FWIW, exiting 0 is not what I'd call "bail out".
> (to help diagnose cases where the heuristic is not
> correct). However, if README has already been edited to the
> alpha text, quietly skip without an error message.
> --- a/libltdl/config/edit-readme-alpha
> +++ b/libltdl/config/edit-readme-alpha
> @@ -55,10 +55,23 @@ func_fatal_error ()
>
>
> for file in "$@"; do
> + # Assume that read-only README indicates that we are running inside
> + # the latter part of a `make distcheck'.
> + test -w $file || {
> + echo "$progname: not editing non-writeable \`$file' (distcheck?)"
If you prefer to, or need to keep the warning+skip, I suggest to
print warnings on stderr.
> + continue
> + }
> +
> # Make sure the paragraph we are matching has not been edited since
> # this script was written.
> - matched=`sed -n -e '/^This is GNU Libtool,/,/^interface.$/p' $file \
> + matched=`sed -n -e '/^This is GNU Libtool,/,/^interface\.$/p' $file \
> |wc -l |sed 's|^ *||'`
> +
> + # Unless, of course, it was edited by this script already.
> + test 3 = "$matched" \
> + || matched=`sed -n -e '/^This is an alpha testing release/,/behind a
> consistent, portable interface\.$/p' $file \
> + |wc -l |sed 's|^ *||'`
Indentation is a bit weird here, I'd have expected the | to align one
after the ` in the line above.
> +
> test 3 = "$matched" \
> || func_fatal_error "$file format has changed, please fix \`$0'"
Thanks,
Ralf
- Re: [PATCH 2/6] maint: consolidate Introductions of README and README.alpha., (continued)
[PATCH 1/6] maint: copy the Version Numbering section into README.alpha., Gary V. Vaughan, 2010/09/18
[PATCH 4/6] maint: reformat README `The Test Suites' for consistency., Gary V. Vaughan, 2010/09/18
[PATCH 6/6] maint: use sed instead of maintaining 2 README files., Gary V. Vaughan, 2010/09/18
- Re: [PATCH 6/6] maint: use sed instead of maintaining 2 README files., Ralf Wildenhues, 2010/09/18
- Re: [PATCH 6/6] maint: use sed instead of maintaining 2 README files., Gary V. Vaughan, 2010/09/18
- Re: [PATCH 6/6] maint: use sed instead of maintaining 2 README files., Ralf Wildenhues, 2010/09/20
- [PATCH] maint: edit-readme-alpha shouldn't try to re-edit during dist., Gary V. Vaughan, 2010/09/20
- Re: [PATCH] maint: edit-readme-alpha shouldn't try to re-edit during dist.,
Ralf Wildenhues <=
- Re: [PATCH] maint: edit-readme-alpha shouldn't try to re-edit during dist., Gary V. Vaughan, 2010/09/21
- Re: [PATCH] maint: edit-readme-alpha shouldn't try to re-edit during dist., Ralf Wildenhues, 2010/09/21
Re: README cleanups, Ralf Wildenhues, 2010/09/18