Lookaside repo support.
This commit is contained in:
parent
2d2a3e8083
commit
c076de2e9f
@ -87,6 +87,8 @@ def main():
|
||||
config.set('pungi', 'full_archlist', "True")
|
||||
if opts.arch:
|
||||
config.set('pungi', 'arch', opts.arch)
|
||||
if opts.lookaside_repos:
|
||||
config.set('pungi', 'lookaside_repos', " ".join(opts.lookaside_repos))
|
||||
|
||||
# Actually do work.
|
||||
mypungi = pypungi.Pungi(config, ksparser)
|
||||
@ -222,6 +224,8 @@ if __name__ == '__main__':
|
||||
help='Use the full arch list for x86_64 (include i686, i386, etc.)')
|
||||
parser.add_option("--arch",
|
||||
help='Override default (uname based) arch')
|
||||
parser.add_option("--lookaside-repo", action="append", dest="lookaside_repos", metavar="NAME",
|
||||
help='Specify lookaside repo name(s) (packages will used for depsolving but not be included in the output)')
|
||||
|
||||
parser.add_option("-c", "--config", dest="config",
|
||||
help='Path to kickstart config file')
|
||||
|
@ -143,6 +143,7 @@ class Pungi(pypungi.PungiBase):
|
||||
self.resolved_deps = {} # list the deps we've already resolved, short circuit.
|
||||
self.excluded_pkgs = {} # list the packages we've already excluded.
|
||||
self.seen_pkgs = {} # list the packages we've already seen so we can check all deps only once
|
||||
self.lookaside_repos = self.config.get('pungi', 'lookaside_repos').split(" ")
|
||||
|
||||
def _add_yum_repo(self, name, url, mirrorlist=False, groups=True,
|
||||
cost=1000, includepkgs=[], excludepkgs=[],
|
||||
@ -848,7 +849,7 @@ class Pungi(pypungi.PungiBase):
|
||||
|
||||
def _listPackages(self, polist):
|
||||
"""Cycle through the list of packages and return their paths."""
|
||||
return [ os.path.join(pkg.basepath or "", pkg.relativepath) for pkg in polist ]
|
||||
return [ os.path.join(pkg.basepath or "", pkg.relativepath) for pkg in polist if pkg.repoid not in self.lookaside_repos ]
|
||||
|
||||
def listPackages(self):
|
||||
"""Cycle through the list of RPMs and return their paths."""
|
||||
|
@ -46,4 +46,5 @@ class Config(SafeConfigParser):
|
||||
self.set('pungi', 'isfinal', "False")
|
||||
self.set('pungi', 'nohash', "False")
|
||||
self.set('pungi', 'full_archlist', "False")
|
||||
self.set('pungi', 'lookaside_repos', '')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user