Add an option to allow only grabbing the best provides for a particular depenedency, instead of all.
This commit is contained in:
parent
27cf6a26b4
commit
b4e40a079e
@ -77,6 +77,8 @@ def main():
|
||||
# Set debuginfo flag
|
||||
if opts.nodebuginfo:
|
||||
config.set('pungi', 'debuginfo', "False")
|
||||
if opts.nogreedy:
|
||||
config.set('pungi', 'alldeps', "False")
|
||||
|
||||
# Actually do work.
|
||||
mypungi = pypungi.Pungi(config, ksparser)
|
||||
@ -178,6 +180,8 @@ if __name__ == '__main__':
|
||||
help='disable gathering of source packages (optional)')
|
||||
parser.add_option("--nodebuginfo", action="store_true", dest="nodebuginfo",
|
||||
help='disable gathering of debuginfo packages (optional)')
|
||||
parser.add_option("--nogreedy", action="store_true", dest="nogreedy",
|
||||
help='disable pulling of all providers of package dependencies (optional)')
|
||||
parser.add_option("--sourceisos", default=False, action="store_true", dest="sourceisos",
|
||||
help='Create the source isos (other arch runs must be done)')
|
||||
parser.add_option("--force", default=False, action="store_true",
|
||||
|
@ -285,6 +285,9 @@ class Pungi(pypungi.PungiBase):
|
||||
self.logger.warn("Unresolvable dependency %s in %s.%s" % (r, po.name, po.arch))
|
||||
continue
|
||||
|
||||
if not self.config.getboolean('pungi', 'alldeps'):
|
||||
deps = self.ayum.bestPackagesFromList(deps)
|
||||
|
||||
depsack = yum.packageSack.ListPackageSack(deps)
|
||||
|
||||
for dep in depsack.returnNewestByNameArch():
|
||||
|
@ -42,4 +42,5 @@ class Config(SafeConfigParser):
|
||||
self.set('pungi', 'bugurl', 'https://bugzilla.redhat.com')
|
||||
self.set('pungi', 'cdsize', '695.0')
|
||||
self.set('pungi', 'debuginfo', "True")
|
||||
self.set('pungi', 'alldeps', "True")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user