forked from pool/rpmlint
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
|
--- SourceCheck.py
|
||
|
+++ SourceCheck.py
|
||
|
@@ -14,7 +14,7 @@
|
||
|
|
||
|
DEFAULT_VALID_SRC_PERMS=(0644, 0755)
|
||
|
|
||
|
-source_regex=re.compile('\\.(tar|patch|tgz|diff)$')
|
||
|
+source_regex=re.compile('\\.(tar|patch|tgz|tar\.gz|dif||diff)$')
|
||
|
use_bzip2=Config.getOption('UseBzip2', 1)
|
||
|
valid_src_perms=Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS)
|
||
|
|
||
|
@@ -38,7 +38,7 @@
|
||
|
printError(pkg, 'multiple-specfiles', spec_file, f)
|
||
|
else:
|
||
|
spec_file=f
|
||
|
- elif source_regex.search(f):
|
||
|
+ elif source_regex.search(f) and files[f][4] > 120*1024:
|
||
|
if use_bzip2:
|
||
|
if not f.endswith('.bz2'):
|
||
|
printWarning(pkg, 'source-or-patch-not-bzipped', f)
|
||
|
@@ -59,8 +59,10 @@
|
||
|
all your RPM information.''',
|
||
|
|
||
|
'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.''',
|
||
|
+'''A source archive or patch in your package is not bzipped (doesn't
|
||
|
+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
|