Merge pull request #2944 from Vogtinator/cleanupcleanuprings
cleanup_rings cleanup
This commit is contained in:
commit
4a241c4b09
@ -68,7 +68,7 @@ def _full_project_name(self, project):
|
||||
def lock_needed(cmd, opts):
|
||||
return not (
|
||||
cmd in ('check', 'check_duplicate_binaries', 'check_local_links',
|
||||
'frozenage', 'rebuild', 'unlock', 'setprio') or
|
||||
'frozenage', 'rebuild', 'unlock', 'setprio', 'cleanup_rings') or
|
||||
(cmd == 'list' and not opts.supersede)
|
||||
)
|
||||
|
||||
|
@ -19,6 +19,18 @@ class CleanupRings(object):
|
||||
# Must remain in ring-1 with other kernel packages to keep matching
|
||||
# build number, but is required by virtualbox in ring-2.
|
||||
'kernel-syms',
|
||||
# buildtime services aren't visible in _buildinfo
|
||||
'obs-service-recompress',
|
||||
'obs-service-set_version',
|
||||
'obs-service-tar_scm',
|
||||
# Used by ARM only, but part of oS:F ring 1 in general
|
||||
'u-boot',
|
||||
'raspberrypi-firmware-dt',
|
||||
'raspberrypi-firmware-config',
|
||||
# Says "QA", must be important
|
||||
'kernel-obs-qa',
|
||||
# Added manually to notice failures early
|
||||
'vagrant',
|
||||
]
|
||||
|
||||
def perform(self):
|
||||
@ -118,7 +130,10 @@ class CleanupRings(object):
|
||||
return True
|
||||
|
||||
def check_image_bdeps(self, project, arch):
|
||||
for dvd in ('000product:openSUSE-dvd5-dvd-{}'.format(arch), 'Test-DVD-{}'.format(arch)):
|
||||
url = makeurl(self.api.apiurl, ['build', project, '_result'])
|
||||
root = ET.parse(http_GET(url)).getroot()
|
||||
for image in root.xpath(f"result[@repository = 'images' and @arch = '{arch}']/status[@code != 'excluded' and @code != 'disabled']"):
|
||||
dvd = image.get('package')
|
||||
try:
|
||||
url = makeurl(self.api.apiurl, ['build', project, 'images', arch, dvd, '_buildinfo'])
|
||||
root = ET.parse(http_GET(url)).getroot()
|
||||
@ -126,6 +141,8 @@ class CleanupRings(object):
|
||||
if e.code == 404:
|
||||
continue
|
||||
raise
|
||||
# Don't delete the image itself
|
||||
self.pkgdeps[dvd.split(':')[0]] = 'MYdvd{}'.format(self.api.rings.index(project))
|
||||
for bdep in root.findall('bdep'):
|
||||
if 'name' not in bdep.attrib:
|
||||
continue
|
||||
@ -135,7 +152,6 @@ class CleanupRings(object):
|
||||
continue
|
||||
b = self.bin2src[b]
|
||||
self.pkgdeps[b] = 'MYdvd{}'.format(self.api.rings.index(project))
|
||||
break
|
||||
|
||||
def check_buildconfig(self, project):
|
||||
url = makeurl(self.api.apiurl, ['build', project, 'standard', '_buildconfig'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user