aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2023-06-05 14:58:06 +0100
committerJosh Boyer <jwboyer@kernel.org>2023-06-25 11:57:07 -0400
commitf2671b1f50eb11901f88b3e8dc3c2b47b4b33008 (patch)
treefa7c2863ccd4022b5b493e033050cce110bb6271
parent4b539e7a32e199bc74191634c2c56d7b679c01b7 (diff)
downloadlinux-firmware-f2671b1f50eb11901f88b3e8dc3c2b47b4b33008.tar.gz
check_whence: error if File: is actually a link
Commits from a few years ago added support for Link entries, over having the symlinks in-tree. At the same time, it didn't add a check whether one didn't add a File entry that is actually a symlink. Do so now, to be on the safe side. v2: - drop copy-firmware.sh changes Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Josh Boyer <jwboyer@kernel.org>
-rwxr-xr-xcheck_whence.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/check_whence.py b/check_whence.py
index e00fdd19..93ff330d 100755
--- a/check_whence.py
+++ b/check_whence.py
@@ -60,6 +60,11 @@ def main():
sys.stderr.write('E: %s listed in WHENCE twice\n' % name)
ret = 1
+ for name in set(link for link in whence_files if os.path.islink(link)):
+ sys.stderr.write('E: %s listed in WHENCE as File, but is a symlink\n' %
+ name)
+ ret = 1
+
for name in sorted(list(known_files - git_files)):
sys.stderr.write('E: %s listed in WHENCE does not exist\n' % name)
ret = 1