[entropy.qa] add support for externally inferred (via config files) broken libraries for test_missing_runtime_libraries()
This commit is contained in:
@@ -38,6 +38,7 @@ entropy-install:
|
||||
install -m 644 conf/brokensyms.conf $(DESTDIR)/etc/entropy/
|
||||
install -m 644 conf/fssymlinks.conf $(DESTDIR)/etc/entropy/
|
||||
install -m 644 conf/brokenlibsmask.conf $(DESTDIR)/etc/entropy/
|
||||
install -m 644 conf/brokenlinksmask.conf $(DESTDIR)/etc/entropy/
|
||||
|
||||
install -m 644 conf/repositories.conf.example $(DESTDIR)/etc/entropy/
|
||||
install -m 644 conf/entropy.conf $(DESTDIR)/etc/entropy/
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Project Entropy 1.0 Entropy configuration file
|
||||
#
|
||||
# This is part of the broken runtime linking QA tool.
|
||||
# Such tool will collect broken library linking (packages which required
|
||||
# libraries are not provided by any package in repositories).
|
||||
# Used by: entropy.qa.QA.test_missing_runtime_libraries()
|
||||
#
|
||||
# Please list, one per line, known broken library linkings.
|
||||
# For example, libGL.so.1 is usually provided by many packages but none
|
||||
# of them are actually installing it into its final path, because the
|
||||
# OpenGL implementation is handled through an external tool, which takes care
|
||||
# of setting up proper library symlinks.
|
||||
|
||||
libGL.so.1
|
||||
libGLU.so.1
|
||||
libm.so.6
|
||||
libpthread.so.0
|
||||
libgcc_s.so.1
|
||||
libdl.so.2
|
||||
@@ -220,6 +220,7 @@ class SystemSettings(Singleton, EntropyPluginStore):
|
||||
'system_rev_symlinks': etpConst['confdir']+"/fssymlinks.conf",
|
||||
'broken_syms': etpConst['confdir']+"/brokensyms.conf",
|
||||
'broken_libs_mask': etpConst['confdir']+"/brokenlibsmask.conf",
|
||||
'broken_links_mask': etpConst['confdir']+"/brokenlinksmask.conf",
|
||||
'hw_hash': etpConst['confdir']+"/.hw.hash",
|
||||
'system': etpConst['entropyconf'],
|
||||
'repositories': etpConst['repositoriesconf'],
|
||||
@@ -230,7 +231,7 @@ class SystemSettings(Singleton, EntropyPluginStore):
|
||||
'license_accept', 'system_mask', 'system_package_sets',
|
||||
'system_dirs', 'system_dirs_mask', 'extra_ldpaths',
|
||||
'system', 'system_rev_symlinks', 'hw_hash',
|
||||
'broken_syms', 'broken_libs_mask'
|
||||
'broken_syms', 'broken_libs_mask', 'broken_links_mask'
|
||||
])
|
||||
self.__setting_files_pre_run.extend(['repositories'])
|
||||
|
||||
@@ -800,6 +801,16 @@ class SystemSettings(Singleton, EntropyPluginStore):
|
||||
"""
|
||||
return self.__generic_parser(self.__setting_files['broken_libs_mask'])
|
||||
|
||||
def _broken_links_mask_parser(self):
|
||||
"""
|
||||
Parser returning a list of broken library linking libraries which are
|
||||
always considered sane.
|
||||
|
||||
@return: parsed metadata
|
||||
@rtype: dict
|
||||
"""
|
||||
return self.__generic_parser(self.__setting_files['broken_links_mask'])
|
||||
|
||||
def _hw_hash_parser(self):
|
||||
"""
|
||||
Hardware hash metadata parser and generator. It returns a theorically
|
||||
|
||||
+10
-4
@@ -447,6 +447,11 @@ class QAInterface(TextInterface, EntropyPluginStore):
|
||||
missing_sonames = set()
|
||||
if excluded_libraries is None:
|
||||
excluded_libraries = set()
|
||||
else:
|
||||
excluded_libraries = set(excluded_libraries)
|
||||
|
||||
# update content taken from brokenlinksmask.conf
|
||||
excluded_libraries.update(self._settings['broken_links_mask'])
|
||||
|
||||
def _resolve_needed_content_fallback(repo, pkg_id, library):
|
||||
# at this point, perhaps the library is self contained in the
|
||||
@@ -540,12 +545,12 @@ class QAInterface(TextInterface, EntropyPluginStore):
|
||||
|
||||
if not silent:
|
||||
self.output(
|
||||
"[%s] %s %s: %s, ELF class: %s" % (
|
||||
"[%s] %s %s: %s, class: %s" % (
|
||||
purple(repository_id),
|
||||
teal(atom),
|
||||
purple(_("requires")),
|
||||
brown(library),
|
||||
elfclass,
|
||||
darkgreen(str(elfclass)),
|
||||
),
|
||||
importance = 1,
|
||||
level = "warning",
|
||||
@@ -584,9 +589,10 @@ class QAInterface(TextInterface, EntropyPluginStore):
|
||||
self.output("", level = "info", importance = 0)
|
||||
else:
|
||||
self.output(
|
||||
_("no missing runtime libraries found"),
|
||||
darkgreen(_("no missing runtime libraries found")),
|
||||
level = "info",
|
||||
importance = 1)
|
||||
importance = 1
|
||||
)
|
||||
|
||||
return missing_sonames
|
||||
|
||||
|
||||
Reference in New Issue
Block a user