create-filelist: filter png and jpg too (acked by nirik)

This is a tiny change to the previous commit to just filter
png and jpg files too, as alt has tons of pngs. Will send a
PR for upstream create-filelist.
This commit is contained in:
Adam Williamson 2016-11-19 15:49:26 -08:00
parent 45d8ea3f89
commit 6fa8dbfcf2

View file

@ -58,8 +58,8 @@ def parseopts():
null = open(os.devnull, 'w')
p = argparse.ArgumentParser(
description='Generate a list of files and times, suitable for consumption by quick-fedora-mirror, '
'and a much smaller list with packages, Device Tree boot files, HTML files and '
'directories filtered out, for consumption by fedfind.')
'and a much smaller list with packages, Device Tree boot files, HTML files, pictures '
'and directories filtered out, for consumption by fedfind.')
p.add_argument('-c', '--checksum', action='store_true',
help='Include checksums of all repomd.xml files in the file list.')
p.add_argument('-C', '--checksum-file', action='append', dest='checksum_files',
@ -112,7 +112,7 @@ def main():
# opts.filelist.write(entry.path + '\n')
print(entry.path, file=opts.filelist)
# write to filtered list if appropriate
skips = ('.rpm', '.drpm', '.dtb', '.html')
skips = ('.rpm', '.drpm', '.dtb', '.html', 'png', 'jpg')
if not any(entry.path.endswith(skip) for skip in skips) and not (entry.is_dir()):
print(entry.path, file=opts.filterlist)
if entry.name in opts.checksum_files: