From d4b8a1b74df50fec943f18d4a1659407e866bde5 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Nov 22 2016 00:34:07 +0000 Subject: filterlist: filter several other file types too alt has a ton of png files in it, turns out, so let's filter these too. archive has some 'hdr' files for old releases (no idea) and some 'filez' and 'dirtree' files which seem to be to do with Atomic in more recent releases. --- diff --git a/create-filelist b/create-filelist index 8fc3367..1c97870 100755 --- a/create-filelist +++ b/create-filelist @@ -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 various non-image file types 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', '.hdr', '.filez', '.dirtree') 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: