]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: fix bugs in gdb/copyright.py, make it use glob patterns
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 11 Apr 2025 15:08:06 +0000 (11:08 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 17 Apr 2025 03:11:17 +0000 (23:11 -0400)
commitfc0747d0b1520d880b44ebb9ff5ebb7588467a33
tree86eb0266a72330face420b39ba9b2b5acef0c841
parent2c00b2fbb88b10cb22dfe3bc737368c9f488c70d
gdb: fix bugs in gdb/copyright.py, make it use glob patterns

gdb/copyright.py currently changes some files that it shouldn't:

 - despite having a `gnulib/import` entry in EXCLUDE_LIST, it does
   change the files under that directory
 - it is missing `sim/Makefile.in`

Change the exclude list logic to use glob patterns.  This makes it
easier to specify exclusions of full directories or files by basename,
while simplifying the code.

Merge EXCLUDE_LIST and NOT_FSF_LIST, since there's no fundamental reason
to keep them separate (they are treated identically).  I kept the
comment that explains that some files are excluded due to not being
FSF-licensed.

Merge EXCLUDE_ALL_LIST in EXCLUDE_LIST, converting the entries to glob
patterns that match everywhere in the tree (e.g. `**/configure`).

Tested by running the script on the parent commit of d01e823438c7
("Update copyright dates to include 2025") and diff'ing the result with
d01e823438c7.  The only differences are:

 - the files that we don't want to modify (gnulib/import and
   sim/Makefile.in)
 - the files that need to be modified by hand

Running the script on latest master produces no diff.

Change-Id: I318dc3bff34e4b3a9b66ea305d0c3872f69cd072
Reviewed-By: Guinevere Larsen <guinevere@redhat.com>
gdb/copyright.py