forked from pool/rpmlint
28 lines
1.5 KiB
Diff
28 lines
1.5 KiB
Diff
--- BinariesCheck.py
|
|
+++ BinariesCheck.py
|
|
@@ -119,6 +119,8 @@
|
|
sparc_regex=re.compile('SPARC32PLUS|SPARC V9|UltraSPARC')
|
|
system_lib_paths=Config.getOption('SystemLibPaths', DEFAULT_SYSTEM_LIB_PATHS)
|
|
usr_lib_regex=re.compile('^/usr/lib(64)?/')
|
|
+lib_perl_regex=re.compile('^/usr/lib/perl5/(?:vendor_perl/)?([0-9]+\.[0-9]+)\.([0-9]+)/')
|
|
+perl_version_trick=Config.getOption('PerlVersionTrick', 1)
|
|
bin_regex=re.compile('^(/usr(/X11R6)?)?/s?bin/')
|
|
soversion_regex=re.compile('.*?([0-9][.0-9]*)\\.so|.*\\.so\\.([0-9][.0-9]*).*')
|
|
reference_regex=re.compile('\.la$|^/usr/lib(64)?/pkgconfig/')
|
|
@@ -234,7 +236,14 @@
|
|
if p in system_lib_paths or \
|
|
not usr_lib_regex.search(p):
|
|
printError(pkg, 'binary-or-shlib-defines-rpath', i[0], bin_info.rpath)
|
|
- break
|
|
+ res=lib_perl_regex.search(p)
|
|
+ if res:
|
|
+ if perl_version_trick:
|
|
+ vers = res.group(1) + '.' + res.group(2)
|
|
+ else:
|
|
+ vers = res.group(1) + res.group(2)
|
|
+ if not (pkg.check_versioned_dep('perl', vers)):
|
|
+ printError(pkg, "no-dependency-on", "perl", vers)
|
|
|
|
# statically linked ?
|
|
is_exec=executable_regex.search(i[1])
|