diff --git a/pungi/gather.py b/pungi/gather.py index 048336b6..8d77c757 100644 --- a/pungi/gather.py +++ b/pungi/gather.py @@ -67,9 +67,7 @@ def yumlocked(method): def is_debug(po): - if "debuginfo" in po.name: - return True - return False + return "debuginfo" in po.name or "debugsource" in po.name def is_source(po): diff --git a/pungi/gather_dnf.py b/pungi/gather_dnf.py index 1b030be8..2d31645c 100644 --- a/pungi/gather_dnf.py +++ b/pungi/gather_dnf.py @@ -25,6 +25,9 @@ import pungi.dnf_wrapper import pungi.multilib_dnf from pungi.profiler import Profiler +# Globs for package name that should match all debuginfo packages +DEBUG_GLOBS = ["*-debuginfo", "*-debuginfo-*", "*-debugsource", "*-debugsource-*"] + def get_source_name(pkg): # Workaround for rhbz#1418298 @@ -120,7 +123,7 @@ class GatherBase(object): q_multilib = q.difference(q_native).union(q_noarch).apply() # debug packages - self.q_debug_packages = q.filter(name__glob=["*-debuginfo", "*-debuginfo-*"]).apply() + self.q_debug_packages = q.filter(name__glob=DEBUG_GLOBS).apply() self.q_native_debug_packages = self.q_debug_packages.intersection(q_native) self.q_multilib_debug_packages = self.q_debug_packages.intersection(q_multilib) diff --git a/pungi/util.py b/pungi/util.py index 40d38305..60086002 100644 --- a/pungi/util.py +++ b/pungi/util.py @@ -192,11 +192,11 @@ def pkg_is_debug(pkg_obj): return False if isinstance(pkg_obj, str): # string - if "-debuginfo" in pkg_obj: + if "-debuginfo" in pkg_obj or '-debugsource' in pkg_obj: return True else: # package object - if "-debuginfo" in pkg_obj.name: + if "-debuginfo" in pkg_obj.name or '-debugsource' in pkg_obj.name: return True return False