https://sourceware.org/bugzilla/show_bug.cgi?id=31881
Nick Clifton <nickc at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15626|0 |1 is obsolete| | --- Comment #19 from Nick Clifton <nickc at redhat dot com> --- Created attachment 15636 --> https://sourceware.org/bugzilla/attachment.cgi?id=15636&action=edit Proposed patch > Why to generate the VERSION_DATE and the version.h > file if building from a source tarball? Err, because I did not think to check. Doh! > If any source tarball created by the src-release.sh it already contains > the generated version.h file with properly generated VERSION_DATE from > the last commit in the Git repo. I think in case of source tarball the > configure script should not try to generate the version.h again because > it already exist. Yes - this is what should happen. > This line in your patch assumes the date could always be found in > the very first line of the change log file: > > VERSION_DATE=$(head -1 $srcdir/ChangeLog.git | cut -b 1-10 | sed -e s/-//g) True - the assumption might be true most of the time, but you are correct - the code should not rely upon it. > What do you think about changing that code into the following one? > > VERSION_DATE=$(grep -m 1 -Po '^\d{4}-\d{2}-\d{2}(?=\s+)' > $srcdir/ChangeLog.git | sed s/-//g) Much better. The uploaded new patch includes this change. > I also don't see the ChangeLog.git file anywhere in the Git repo > of binutils. Did you mean ChangeLog file? No - the ChangeLog.git file is created as part of the binutils release process, so it should always be present in release tarballs, but absent from the git repository. I also found that the "git rev-parse --is-inside-work-tree" does not work as desired. If run outside of a repository it returns a fatal error and stops the rest of the scriptlet from running. So I have replaced it with a test for the .git directory at the top level of the source tree. Which I think should always work. So - please can you look over this revision of the patch and let me know what you think ? -- You are receiving this mail because: You are on the CC list for the bug.