cleanup_rings: extract check_image_bdeps() and check_buildconfig().
- change archs loop to use the archs appropriate for the ring instead of always using DVD archs - drop check_image_bdeps() out of archs loop since DVD should only look at DVD archs even if ring 1
This commit is contained in:
parent
50166347e1
commit
51c2f6e0e9
@ -103,47 +103,42 @@ class CleanupRings(object):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def check_image_bdeps(self, project, arch):
|
||||||
|
url = makeurl(self.api.apiurl, ['build', project, 'images', arch, 'Test-DVD-' + arch, '_buildinfo'])
|
||||||
|
root = ET.parse(http_GET(url)).getroot()
|
||||||
|
for bdep in root.findall('bdep'):
|
||||||
|
if 'name' not in bdep.attrib:
|
||||||
|
continue
|
||||||
|
b = bdep.attrib['name']
|
||||||
|
if b not in self.bin2src:
|
||||||
|
continue
|
||||||
|
b = self.bin2src[b]
|
||||||
|
self.pkgdeps[b] = 'MYdvd{}'.format(self.api.rings.index(project))
|
||||||
|
|
||||||
|
def check_buildconfig(self, project):
|
||||||
|
url = makeurl(self.api.apiurl, ['build', project, 'standard', '_buildconfig'])
|
||||||
|
for line in http_GET(url).read().split('\n'):
|
||||||
|
if line.startswith('Preinstall:') or line.startswith('Support:'):
|
||||||
|
for prein in line.split(':')[1].split():
|
||||||
|
if prein not in self.bin2src:
|
||||||
|
continue
|
||||||
|
b = self.bin2src[prein]
|
||||||
|
self.pkgdeps[b] = 'MYinstall'
|
||||||
|
|
||||||
def check_depinfo_ring(self, prj, nextprj):
|
def check_depinfo_ring(self, prj, nextprj):
|
||||||
if not self.repo_state_acceptable(prj):
|
if not self.repo_state_acceptable(prj):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
self.find_inner_ring_links(prj)
|
self.find_inner_ring_links(prj)
|
||||||
for arch in self.api.cstaging_dvd_archs:
|
for arch in self.api.ring_archs(prj):
|
||||||
self.fill_pkgdeps(prj, 'standard', arch)
|
self.fill_pkgdeps(prj, 'standard', arch)
|
||||||
|
|
||||||
if prj == '{}:1-MinimalX'.format(self.api.crings):
|
|
||||||
url = makeurl(self.api.apiurl, ['build', prj, 'images', arch, 'Test-DVD-' + arch, '_buildinfo'])
|
|
||||||
root = ET.parse(http_GET(url)).getroot()
|
|
||||||
for bdep in root.findall('bdep'):
|
|
||||||
if 'name' not in bdep.attrib:
|
|
||||||
continue
|
|
||||||
b = bdep.attrib['name']
|
|
||||||
if b not in self.bin2src:
|
|
||||||
continue
|
|
||||||
b = self.bin2src[b]
|
|
||||||
self.pkgdeps[b] = 'MYdvd'
|
|
||||||
|
|
||||||
if prj == '{}:2-TestDVD'.format(self.api.crings):
|
|
||||||
url = makeurl(self.api.apiurl, ['build', prj, 'images', arch, 'Test-DVD-' + arch, '_buildinfo'])
|
|
||||||
root = ET.parse(http_GET(url)).getroot()
|
|
||||||
for bdep in root.findall('bdep'):
|
|
||||||
if 'name' not in bdep.attrib:
|
|
||||||
continue
|
|
||||||
b = bdep.attrib['name']
|
|
||||||
if b not in self.bin2src:
|
|
||||||
continue
|
|
||||||
b = self.bin2src[b]
|
|
||||||
self.pkgdeps[b] = 'MYdvd2'
|
|
||||||
|
|
||||||
if prj == '{}:0-Bootstrap'.format(self.api.crings):
|
if prj == '{}:0-Bootstrap'.format(self.api.crings):
|
||||||
url = makeurl(self.api.apiurl, ['build', prj, 'standard', '_buildconfig'])
|
self.check_buildconfig(prj)
|
||||||
for line in http_GET(url).read().split('\n'):
|
else: # Ring 1 or 2.
|
||||||
if line.startswith('Preinstall:') or line.startswith('Support:'):
|
# Always look at DVD archs for image, even in ring 1.
|
||||||
for prein in line.split(':')[1].split():
|
for arch in self.api.cstaging_dvd_archs:
|
||||||
if prein not in self.bin2src:
|
self.check_image_bdeps(prj, arch)
|
||||||
continue
|
|
||||||
b = self.bin2src[prein]
|
|
||||||
self.pkgdeps[b] = 'MYinstall'
|
|
||||||
|
|
||||||
for source in self.sources:
|
for source in self.sources:
|
||||||
if source not in self.pkgdeps and source not in self.links:
|
if source not in self.pkgdeps and source not in self.links:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user