From 151917685cf59db438402521cd8bd164aac2d717 Mon Sep 17 00:00:00 2001 From: "jkeating@localhost.localdomain" <> Date: Tue, 10 Oct 2006 23:52:50 -0400 Subject: [PATCH] A first stab at downloading packages --- gather/gather.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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()