Always output all archs - even if empty

This commit is contained in:
Stephan Kulow 2017-09-06 20:20:21 +02:00
parent a75365baf7
commit c13b16679d
2 changed files with 8 additions and 13 deletions

View File

@ -35,7 +35,7 @@ class CommandLineInterface(pkglistgen.CommandLineInterface):
for group in self.tool.groups.values():
setattr(g, group.safe_name, group)
g.sle_minimal.solve(ignore_recommended=True)
g.sle_minimal.solve(ignore_recommended=True, extra=['dummy-release'])
# g.release_packages_sles.solve()
# g.release_packages_leanos.solve(base = g.sle_minimal)
@ -64,8 +64,6 @@ class CommandLineInterface(pkglistgen.CommandLineInterface):
g.fonts_initrd.solve(base = g.fonts)
g.bootloader.solve(base = g.sle_base)
g.python.solve(base = g.sle_base)
g.php7.solve(base = g.sle_base)

View File

@ -244,9 +244,6 @@ class Group(object):
if autodeps:
autodeps -= self.packages[arch]
if not packages and not autodeps:
return None
name = self.name
if arch != '*':
name += '.' + arch
@ -291,10 +288,10 @@ class Group(object):
return root
def dump(self):
for arch in sorted(self.architectures()):
archs = ('*') + ARCHITECTURES
for arch in archs:
x = self.toxml(arch)
if x is not None:
print(ET.tostring(x, pretty_print = True))
print(ET.tostring(x, pretty_print = True))
class PkgListGen(ToolBase.ToolBase):
@ -365,6 +362,7 @@ class PkgListGen(ToolBase.ToolBase):
def _write_all_groups(self):
self._check_supplements()
archs = ('*',) + ARCHITECTURES
for name in self.groups:
group = self.groups[name]
fn = '{}.group'.format(group.name)
@ -374,11 +372,10 @@ class PkgListGen(ToolBase.ToolBase):
os.unlink(fn)
continue
with open(os.path.join(self.output_dir, fn), 'w') as fh:
for arch in sorted(group.architectures()):
for arch in archs:
x = group.toxml(arch)
if x is not None:
#fh.write(ET.tostring(x, pretty_print = True, doctype = '<?xml version="1.0" encoding="UTF-8"?>'))
fh.write(ET.tostring(x, pretty_print = True))
#fh.write(ET.tostring(x, pretty_print = True, doctype = '<?xml version="1.0" encoding="UTF-8"?>'))
fh.write(ET.tostring(x, pretty_print = True))
def _parse_product(self, root):
print(root.find('.//products/product/name').text)