Skip to content

Commit

Permalink
Merge pull request #866 from marxin/skip-undefined-non-weak-symbol-fo…
Browse files Browse the repository at this point in the history
…r-python

Skip undefined-non-weak-symbol for python packages.
  • Loading branch information
marxin authored May 18, 2022
2 parents fc5303f + 4307bef commit d141a20
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rpmlint/checks/BinariesCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class BinariesCheck(AbstractCheck):
la_file_regex = re.compile(r'\.la$')
invalid_dir_ref_regex = re.compile(r'/(home|tmp)(\W|$)')
usr_arch_share_regex = re.compile(r'/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64|m68k|arm|aarch64|mips|riscv)')
python_module_regex = re.compile(r'.*\.\w*(python|pypy)\w*(-\w+){4}\.so')

lto_text_like_sections = {'.preinit_array', '.init_array', '.fini_array'}
# The following sections are part of the RX ABI and do correspond to .text, .data and .bss
Expand Down Expand Up @@ -373,6 +374,11 @@ def _check_dependency(self, pkg, pkgfile):
# following issues are errors for shared libs and warnings for executables
if not self.is_dynamically_linked:
return

# Skip python packages
if self.python_module_regex.fullmatch(pkgfile.name):
return

if not self.is_archive and not self.readelf_parser.is_debug:
info_type = 'E' if self.readelf_parser.is_shlib else 'W'
for symbol in self.ldd_parser.undefined_symbols:
Expand Down

0 comments on commit d141a20

Please sign in to comment.