A first stab at downloading packages
This commit is contained in:
parent
f04c99fcbe
commit
151917685c
@ -21,8 +21,16 @@ def create_yumobj(yumconf):
|
||||
myYum = yum.yumBase()
|
||||
myYum.doConfigSetup(fn=yumconf)
|
||||
myYum.doRepoSetup()
|
||||
myYum.doSackSetup()
|
||||
return myYum
|
||||
|
||||
def download_packages(yumobj, pkglist):
|
||||
pkgobjs = []
|
||||
for pkg in pkglist:
|
||||
pkgobjs.extend(yumobj.pkgSack.searchNevra(name=pkg))
|
||||
for pkgobj in pkgobjs:
|
||||
pkgobj.repo.getPackage(pkgobj)
|
||||
|
||||
def main():
|
||||
# This is used for testing the module
|
||||
(opts, args) = get_arguments()
|
||||
|
Loading…
Reference in New Issue
Block a user