diff --git a/gather/gather.py b/gather/gather.py index 5b066509..7760fed8 100755 --- a/gather/gather.py +++ b/gather/gather.py @@ -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()