Skip to content

Commit d141a20

Browse files
authored
Merge pull request #866 from marxin/skip-undefined-non-weak-symbol-for-python
Skip undefined-non-weak-symbol for python packages.
2 parents fc5303f + 4307bef commit d141a20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rpmlint/checks/BinariesCheck.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class BinariesCheck(AbstractCheck):
3131
la_file_regex = re.compile(r'\.la$')
3232
invalid_dir_ref_regex = re.compile(r'/(home|tmp)(\W|$)')
3333
usr_arch_share_regex = re.compile(r'/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64|m68k|arm|aarch64|mips|riscv)')
34+
python_module_regex = re.compile(r'.*\.\w*(python|pypy)\w*(-\w+){4}\.so')
3435

3536
lto_text_like_sections = {'.preinit_array', '.init_array', '.fini_array'}
3637
# The following sections are part of the RX ABI and do correspond to .text, .data and .bss
@@ -373,6 +374,11 @@ def _check_dependency(self, pkg, pkgfile):
373374
# following issues are errors for shared libs and warnings for executables
374375
if not self.is_dynamically_linked:
375376
return
377+
378+
# Skip python packages
379+
if self.python_module_regex.fullmatch(pkgfile.name):
380+
return
381+
376382
if not self.is_archive and not self.readelf_parser.is_debug:
377383
info_type = 'E' if self.readelf_parser.is_shlib else 'W'
378384
for symbol in self.ldd_parser.undefined_symbols:

0 commit comments

Comments
 (0)