check_whence: Recognize RawFile keyword
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>
This commit is contained in:
parent
c57a9388c1
commit
80de4d8a41
|
@ -7,11 +7,11 @@ from io import open
|
||||||
def list_whence():
|
def list_whence():
|
||||||
with open("WHENCE", encoding="utf-8") as whence:
|
with open("WHENCE", encoding="utf-8") as whence:
|
||||||
for line in whence:
|
for line in whence:
|
||||||
match = re.match(r'(?:File|Source):\s*"(.*)"', line)
|
match = re.match(r'(?:RawFile|File|Source):\s*"(.*)"', line)
|
||||||
if match:
|
if match:
|
||||||
yield match.group(1)
|
yield match.group(1)
|
||||||
continue
|
continue
|
||||||
match = re.match(r"(?:File|Source):\s*(\S*)", line)
|
match = re.match(r"(?:RawFile|File|Source):\s*(\S*)", line)
|
||||||
if match:
|
if match:
|
||||||
yield match.group(1)
|
yield match.group(1)
|
||||||
continue
|
continue
|
||||||
|
@ -35,7 +35,7 @@ def list_whence():
|
||||||
def list_whence_files():
|
def list_whence_files():
|
||||||
with open("WHENCE", encoding="utf-8") as whence:
|
with open("WHENCE", encoding="utf-8") as whence:
|
||||||
for line in whence:
|
for line in whence:
|
||||||
match = re.match(r"File:\s*(.*)", line)
|
match = re.match(r"(?:RawFile|File):\s*(.*)", line)
|
||||||
if match:
|
if match:
|
||||||
yield match.group(1).replace("\ ", " ").replace('"', "")
|
yield match.group(1).replace("\ ", " ").replace('"', "")
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue