Add --full-archlist option to include i686 packages in x86_64 trees.

Pungi limits x86_64 package architectures to x86_64 and noarch only,
which renders depsolving in multiarch repos impossible.
This patch adds --full-archlist option which removes the limitation.
This commit is contained in:
Daniel Mach 2011-11-01 11:21:58 -04:00 committed by Dennis Gilmore
parent 44cda03261
commit 83a22bd5ea
3 changed files with 6 additions and 1 deletions

View File

@ -83,6 +83,8 @@ def main():
config.set('pungi', 'isfinal', "True")
if opts.nohash:
config.set('pungi', 'nohash', "True")
if opts.full_archlist:
config.set('pungi', 'full_archlist', "True")
# Actually do work.
mypungi = pypungi.Pungi(config, ksparser)
@ -214,6 +216,8 @@ if __name__ == '__main__':
help='Specify this is a GA tree, which causes betanag to be turned off during install')
parser.add_option("--nohash", default=False, action="store_true",
help='disable hashing the Packages trees')
parser.add_option("--full-archlist", action="store_true",
help='Use the full arch list for x86_64 (include i686, i386, etc.)')
parser.add_option("-c", "--config", dest="config",
help='Path to kickstart config file')

View File

@ -240,7 +240,7 @@ class Pungi(pypungi.PungiBase):
# Filter out all the multilib arches, anaconda won't use them.
# only makes sense on x86_64
full_archlist = set(yum.rpmUtils.arch.getArchList(yumarch))
if arch == 'x86_64':
if arch == 'x86_64' and not self.config.getboolean('pungi', 'full_archlist'):
compat_archinfo = yum.rpmUtils.arch.getMultiArchInfo(yumarch)
compat_archlist = set(yum.rpmUtils.arch.getArchList(compat_archinfo[0]))
newarchlist = list(full_archlist.difference(compat_archlist))

View File

@ -45,4 +45,5 @@ class Config(SafeConfigParser):
self.set('pungi', 'alldeps', "True")
self.set('pungi', 'isfinal', "False")
self.set('pungi', 'nohash', "False")
self.set('pungi', 'full_archlist', "False")