Subject: bug#72809: ms-windows: Copyright embedded into executable is outdated

From: Stefan Kangas <[email-masked]>
Date: Sat, 14 Sep 2024 06:28:15 -0700

Eli Zaretskii <[email-masked]> writes:

> Stefan, what are your thoughts about improving the script?  Do you
> understand why these files were missed?

The simple reason is that the Gnulib `build-aux/update-copyright` script
don't support them, so we need to remember to update them manually.

As for why this is, the cases are different.

1. There's more than one copyright year in these files:

    configure.ac
    doc/lispref/tips.texi
    etc/images/gud/README

   However, the Gnulib script only updates the first copyright year.

2. For these files:

    nt/emacs.rc.in
    nt/emacsclient.rc.in

   the Gnulib script does not support making this update:

   -	    VALUE "LegalCopyright", "Copyright (C) 2001-2021\0"
   +	    VALUE "LegalCopyright", "Copyright (C) 2001-2024\0"

3. This file:

    test/lisp/which-key-tests.el

   was added with the wrong copyright in 2024.

There are even more edge cases, see for example commit 33d159c36f42.

I'm not sure if it's worth updating our script to support all this.
It's not too hard to remember to grep for "202[0-9]" and updating them
manually.  Writing code to do this has a maintenance cost too, and also
runs a risk of missing some years.  Files change, new files are added,
etc.  So there's no way around grepping to make sure, I think.

Thus, perhaps we should just do this:

diff --git a/admin/update-copyright b/admin/update-copyright
index b9007100b35..23b78443ca4 100755
--- a/admin/update-copyright
+++ b/admin/update-copyright
@@ -77,3 +77,6 @@ updatable_files=
   -print) &&

 build-aux/update-copyright $updatable_files
+
+printf "!! Please remember to grep for and manually update any"
+printf "!! copyright years that were not updated by this script."