From ced1c3a60a43fc6a7277723b8b5d7e119e953bf5e2c23ab40e111898a1ce7dc7 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Wed, 15 Jun 2011 12:34:35 +0000 Subject: [PATCH] - fix library policy check complaining about non-ELF files OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=36 --- LibraryPolicyCheck.py | 4 ++-- rpmlint.changes | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/LibraryPolicyCheck.py b/LibraryPolicyCheck.py index 855468e..b239e87 100644 --- a/LibraryPolicyCheck.py +++ b/LibraryPolicyCheck.py @@ -318,11 +318,11 @@ class LibraryPolicyCheck(AbstractCheck.AbstractCheck): reqlibs = set() pkg_requires = set(map(lambda x: string.split(x[0],'(')[0], pkg.requires())) - for f in files.keys(): + for f, pkgfile in files.items(): if f.find('.so.') != -1 or f.endswith('.so'): filename = pkg.dirName() + '/' + f try: - if stat.S_ISREG(files[f].mode): + if stat.S_ISREG(files[f].mode) and 'ELF' in pkgfile.magic: bi = BinaryInfo(pkg, filename, f, False, True) libs_needed = libs_needed.union(bi.needed) if bi.soname != 0: diff --git a/rpmlint.changes b/rpmlint.changes index 60d0570..6027c60 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 15 12:34:09 UTC 2011 - lnussel@suse.de + +- fix library policy check complaining about non-ELF files + ------------------------------------------------------------------- Tue Jun 7 15:14:20 UTC 2011 - lnussel@suse.de