summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2004-09-27 15:50:35 +0000
committerNarayan Desai <desai@mcs.anl.gov>2004-09-27 15:50:35 +0000
commit61ad0e9e73ba301f25fe06cd7fa250957732ec6a (patch)
treee6b2b7b08ca6acbc49fee1152a17301f8c14f76b /src/lib
parentbd62dc3fd61382df46ae307aa099b9c709b5a723 (diff)
downloadbcfg2-61ad0e9e73ba301f25fe06cd7fa250957732ec6a.tar.gz
bcfg2-61ad0e9e73ba301f25fe06cd7fa250957732ec6a.tar.bz2
bcfg2-61ad0e9e73ba301f25fe06cd7fa250957732ec6a.zip
make package installs work
(Logical change 1.60) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@330 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Client/Debian.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py
index e5e1c3bab..043fa0eb5 100644
--- a/src/lib/Client/Debian.py
+++ b/src/lib/Client/Debian.py
@@ -98,7 +98,11 @@ class Debian(Toolset):
return False
else:
# implement package installation here
- return False
+ rc = system("apt-get --reinstall -q=2 -y install %s=%s"%(entry.attrib['name'],entry.attrib['version']))
+ if rc == 0:
+ return True
+ else:
+ return False
def GetInstalledConfigs(self):
# returns a list of installed config files
@@ -106,3 +110,11 @@ class Debian(Toolset):
for a in map(lambda x:split(open(x).read(),"\n"),glob("/var/lib/dpkg/info/*.conffiles")):
ret += a
return ret
+
+ def FindConfigs(self):
+ e = []
+ for (pkg, vers) in self.installed.iteritems():
+ e.append(Element('Package', name=pkg, version=vers))
+ # need to add config file two way later
+ return e
+