New procedure for updating copyright years...

Joel Brobecker brobecker@adacore.com
Wed Jan 4 08:20:00 GMT 2012


Hello,

this patch series enhanced our procedures for updating the copyright
years by switching away from an emacs lisp program to a script that's
part of gnulib.

There are several parts to this series:

  1. Importing the update-copyright script from gnulib

  2. Write a new script that uses it. Since I had never used it before,
     I spent a lot of time double-checking the output.

     gnulib's update-copyright script is more general than the
     emacs-based approach, and it allows us to lift the limitation
     about several categories of files that previously had to be updated
     by hand. It is also worth mentioning that update-copyright gets
     the job done in 2 seconds where the emacs would take, IIRC, a good
     10-15 minutes.

     update-copyright, however, is a little more sensitive to incorrect
     formatting of the copyright notice. As a result, it failed to
     find the copyright notice in several files.

     But the good news is that it does generate a warning when not finding
     the copyright notice in a file.  So I enhance our new script to catch
     them and process them.  For each file that that update-copyright
     cannot update, I perform a crude sanity check, and let the warning
     through if there is any chance that the file might have, in fact,
     a copyright notice.

     The script does not let through warning about files where the word
     "Copyright" does not appear within the first 50 lines (arbitrary
     but seemed like a good number), because there are a LOT (and I mean
     A LOT) of those, and so these warnings would drown the rest.  We
     should probably fix those, but this is not the job of the guy
     simply updating the existing copyright notices.

     Finally, I should say that the new script was written in Python,
     compatible with Python 2.6 and 2.7 at least. This is simply because
     it was so much harder for me to write the same sanity checks in
     bourne shell.

  3. The last patch updates our documentation.



More information about the Gdb-patches mailing list