Skip to content

Commit

Permalink
Improve printing of reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
Vogtinator committed Jul 10, 2023
1 parent 9a9a216 commit 552e0b1
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 40 deletions.
50 changes: 26 additions & 24 deletions cleanup_32bit.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,29 @@ class Cleanup32bit(ToolBase.ToolBase):
def run(self, prj: str, arch: str, verbose: bool=False):
Config(self.apiurl, prj)
cr = CleanupRings(StagingAPI(self.apiurl, prj))
cr.whitelist = set(["wine", "wine-nine-standalone", "wine:staging",
# https://bugzilla.suse.com/show_bug.cgi?id=1210244
"gstreamer", "gstreamer-plugins-base",
"gstreamer-plugins-bad", "gstreamer-plugins-good",
"gstreamer-plugins-ugly", "gstreamer-plugins-libav",
# http://bugzilla.opensuse.org/show_bug.cgi?id=1210199
"mangohud", "gamemode",
# http://bugzilla.opensuse.org/show_bug.cgi?id=1210304
"alsa-plugins",
# https://bugzilla.opensuse.org/show_bug.cgi?id=1210137
"alsa-oss",
# https://bugzilla.opensuse.org/show_bug.cgi?id=1210305
"apitrace",
# https://bugzilla.suse.com/show_bug.cgi?id=1210145
"Mesa-demo", "vulkan-tools", "xf86-video-intel",
# Creates grub2-i386-efi for x86_64
"grub2",
# File deps: some texlive stuff needs python2 and snobol4
"python:python-base", "snobol4"])
# -32bit flavors only needed if pam-32bit is installed
cr.whitelist.add("gnome-keyring")
cr.whitelist.add("pam_kwallet")
cr.force_required = {
"wine": "wine", "wine-nine-standalone": "wine",
"wine:staging": "wine",
"gstreamer": "boo#1210244",
"gstreamer-plugins-base": "boo#1210244",
"gstreamer-plugins-bad": "boo#1210244",
"gstreamer-plugins-good": "boo#1210244",
"gstreamer-plugins-ugly": "boo#1210244",
"gstreamer-plugins-libav": "boo#1210244",
"mangohud": "boo#1210199",
"gamemode": "boo#1210199",
"alsa-plugins": "boo#1210304",
"alsa-oss": "boo#1210137",
"apitrace": "boo#1210305",
"Mesa-demo": "boo#1210145",
"vulkan-tools": "boo#1210145",
"xf86-video-intel": "boo#1210145",
"grub2": "Creates grub2-i386-efi for x86_64",
"python:python-base": "File deps: some texlive stuff needs python2 and snobol4",
"snobol4": "File deps: some texlive stuff needs python2 and snobol4",
"gnome-keyring": "32bit PAM stack",
"pam_kwallet": "32bit PAM stack"
}

cr.fill_pkginfo(prj, "standard", arch)

Expand All @@ -41,7 +42,8 @@ def run(self, prj: str, arch: str, verbose: bool=False):
# actual builddep of a randomly chosen (tm) package to get the former,
# check_depinfo handles obs-service-*.
for bdep in cr.package_get_bdeps(prj, "glibc", "standard", arch):
cr.whitelist.add(bdep)
if bdep not in cr.force_required:
cr.force_required[bdep] = "bdep of glibc"

# Make sure those pkgs are also installable
for wppra in [("openSUSE:Factory:NonFree", "steam", "standard", "x86_64")]:
Expand All @@ -55,7 +57,7 @@ def run(self, prj: str, arch: str, verbose: bool=False):

if name.endswith("-32bit"):
name = name[:-len("-32bit")]
cr.whitelist.add(cr.bin2src[name])
cr.force_required[cr.bin2src[name]] = "Runtime dep of" + wpkg

pkgdeps = cr.check_depinfo(prj, "i586", True)

Expand Down
29 changes: 13 additions & 16 deletions osclib/cleanup_rings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,17 @@ def __init__(self, api):
self.api = api
self.links = {}
self.commands = []
self.whitelist = [
self.force_required = {
# Keep this in ring 1, even though ring 0 builds the main flavor
# and ring 1 has that disabled.
'automake:testsuite',
'meson:test',
# Used by ARM only, but part of oS:F ring 1 in general
'u-boot',
'raspberrypi-firmware-dt',
'raspberrypi-firmware-config',
# Added manually to notice failures early
'vagrant',
# https://github.com/openSUSE/open-build-service/issues/14129
'snobol4',
]
'automake:testsuite': 'Keep in Ring 1',
'meson:test': 'Keep in Ring 1',
'u-boot': 'ARM Ring1',
'raspberrypi-firmware-dt': 'ARM Ring1',
'raspberrypi-firmware-config': 'ARM Ring1',
'vagrant': 'Added manually to notice failures early',
'snobol4': 'https://github.com/openSUSE/open-build-service/issues/14129'
}

def perform(self):
for index, ring in enumerate(self.api.rings):
Expand Down Expand Up @@ -215,10 +212,10 @@ def check_depinfo(self, prj, arch, multibuild_independent):
# buildtime services aren't visible in _builddepinfo
self.pkgdeps[pkg] = "OBS service"

# Treat all binaries in the whitelist as needed
for pkg in self.whitelist:
# Include all force required packages
for pkg in self.force_required:
if pkg in self.sources:
self.pkgdeps[pkg] = "whitelist"
self.pkgdeps[pkg] = "Forced: " + self.force_required[pkg]

to_visit = set(self.pkgdeps)
# print("Directly needed: ", to_visit)
Expand Down Expand Up @@ -274,7 +271,7 @@ def check_depinfo(self, prj, arch, multibuild_independent):
if len(requiredby):
# Include it and also resolve its build deps
if pkg not in self.pkgdeps:
self.pkgdeps[pkg] = f"Runtime dep of {requiredby}"
self.pkgdeps[pkg] = f"Runtime dep of {', '.join(requiredby)}"
to_visit.add(pkg)

return self.pkgdeps

0 comments on commit 552e0b1

Please sign in to comment.