Remove duplicate symlinks

Now that the copy-firmware.sh script can create symlinks from the Link:
entries in the WHENCE file on the fly, remove the duplicate symlinks
from the filesystem.

One odd entry was intel/dsp_fw_cnl.bin which was listed both as symlink
and as a regular file. Both entries can be removed since the it's really
a symlink, so it will be recreated at installation time.

While at it, update the check_whence.py script to not look for the
existence of symlinks in the filesystem because they are created on the
fly at installation time by the copy_firmware.sh script.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
This commit is contained in:
Thierry Reding
2019-09-30 13:17:04 +02:00
committed by Josh Boyer
parent 2de7abd480
commit 9cfefbd7fb
66 changed files with 2 additions and 67 deletions

View File

@@ -5,11 +5,11 @@ import os, re, sys
def list_whence():
with open('WHENCE') as whence:
for line in whence:
match = re.match(r'(?:File|Link|Source):\s*"(.*)"', line)
match = re.match(r'(?:File|Source):\s*"(.*)"', line)
if match:
yield match.group(1)
continue
match = re.match(r'(?:File|Link|Source):\s*(\S*)', line)
match = re.match(r'(?:File|Source):\s*(\S*)', line)
if match:
yield match.group(1)
continue