Add support for debugsource packages
These packages should behave like regular debuginfo packages (at least for now). Fixes: https://pagure.io/pungi/issue/684 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
65078ef9cf
commit
d92390b80b
@ -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):
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user