[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: 3 small patches
From: |
Eric Blake |
Subject: |
Re: FYI: 3 small patches |
Date: |
Tue, 22 Apr 2008 13:09:12 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jim Meyering on 4/22/2008 8:28 AM:
| Without a guard like this, it is far too easy to apply a patch
| prepared against a preceding release, and not notice that a NEWS
| entry is inserted into the wrong block.
| * maint.mk (sc_immutable_NEWS): New rule.
| (update-NEWS-hash): New rule to update the hard-coded hash.
|
| +
| +# Ensure that we don't accidentally insert an entry into an old NEWS block.
| +old_NEWS_hash = c58d611d93d218181ed77f81ff2395ff -
| +sc_immutable_NEWS:
| + @if test -f $(srcdir)/NEWS; then \
| + test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : || \
| + { echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \
| + fi
| +
| +# Update the hash stored above. Do this after each release.
| +update-NEWS-hash: NEWS
| + perl -pi -e 's/^(old_NEWS_hash = ).*/$${1}'"$(NEWS_hash)/" $(ME)
Nice rule. However, two concerns here. First, how do you intend to share
maint.mk with other projects, when the NEWS hash to coreutils is now
hardcoded in here? Shouldn't the hash be stored in cfg.mk instead?
Second, what happens if a typo correction is made in the old NEWS? I
guess that means manually updating the hash to account for the intentional
changes (or maybe running 'make update-NEWS-hash' after ensuring that all
I changed was a typo fix).
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkgON9gACgkQ84KuGfSFAYAKpACgqpuTcXZ7SWfyAl+jy8Z8qR3X
FR4An00Ru5c4IQU19wxqX6Df0Xov63Vo
=d8FX
-----END PGP SIGNATURE-----