--- SourceCheck.py +++ SourceCheck.py @@ -17,7 +17,7 @@ DEFAULT_VALID_SRC_PERMS = (0644, 0755) -source_regex = re.compile('\\.(tar|patch|tgz|diff)$') +source_regex = re.compile('\\.(tar|patch|tar\.gz|tgz|diff)$') use_bzip2 = Config.getOption('UseBzip2', 1) valid_src_perms = Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS) @@ -40,7 +40,7 @@ printError(pkg, 'multiple-specfiles', spec_file, fname) else: spec_file = fname - elif source_regex.search(fname): + elif source_regex.search(fname) and files[f][4] > 120*1024: if use_bzip2: if not fname.endswith('.bz2'): printWarning(pkg, 'source-or-patch-not-bzipped', fname) @@ -61,7 +61,9 @@ 'source-or-patch-not-bzipped', '''A source archive or file in your package is not bzipped (doesn't -have the .bz2 extension). To bzip it, use bzip2.''', +have the .bz2 extension). Files bigger than 100k should be bzip2'ed ++in order to save space. To bzip2 a patch, use bzip2. To bzip2 a source ++tarball, use bznew''', 'source-or-patch-not-gzipped', '''A source archive or file in your package is not gzipped (doesn't