]> git.proxmox.com Git - mirror_linux-firmware.git/commitdiff
check_whence: Recognize RawFile keyword
authorJuerg Haefliger <juerg.haefliger@canonical.com>
Fri, 1 Sep 2023 06:52:24 +0000 (08:52 +0200)
committerJosh Boyer <jwboyer@kernel.org>
Tue, 5 Sep 2023 16:51:05 +0000 (12:51 -0400)
WHENCE and copy_firmware.sh now support a new keyword RawFile to list
files that must not be compressed. Update check_whence.py to recognize
that.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
check_whence.py

index db6ac0f5d1c5af5159d945066a4ef5fa3230353c..7e0a04f964dabb415edb4545bd03253af78accf1 100755 (executable)
@@ -7,11 +7,11 @@ from io import open
 def list_whence():
     with open("WHENCE", encoding="utf-8") as whence:
         for line in whence:
-            match = re.match(r'(?:File|Source):\s*"(.*)"', line)
+            match = re.match(r'(?:RawFile|File|Source):\s*"(.*)"', line)
             if match:
                 yield match.group(1)
                 continue
-            match = re.match(r"(?:File|Source):\s*(\S*)", line)
+            match = re.match(r"(?:RawFile|File|Source):\s*(\S*)", line)
             if match:
                 yield match.group(1)
                 continue
@@ -35,7 +35,7 @@ def list_whence():
 def list_whence_files():
     with open("WHENCE", encoding="utf-8") as whence:
         for line in whence:
-            match = re.match(r"File:\s*(.*)", line)
+            match = re.match(r"(?:RawFile|File):\s*(.*)", line)
             if match:
                 yield match.group(1).replace("\ ", " ").replace('"', "")
                 continue