From 6abc82965c19df63ee8531651e4275b3e62d290d Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Tue, 13 Sep 2005 15:46:04 +0000 Subject: add default package type (Logical change 1.306) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1254 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Debian.py | 2 ++ src/lib/Client/Solaris.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lib/Client') diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py index 77971a6ca..1785b5440 100644 --- a/src/lib/Client/Debian.py +++ b/src/lib/Client/Debian.py @@ -32,6 +32,8 @@ class Debian(Toolset): self.installed = {} self.pkgwork = {'add':[], 'update':[], 'remove':[]} self.extra_services = [] + for pkg in [cpkg for cpkg in self.cfg.finall(".//Package") if not cpkg.attrib.has_key('type')]: + pkg.set('type', 'deb') self.Refresh() def Refresh(self): diff --git a/src/lib/Client/Solaris.py b/src/lib/Client/Solaris.py index 028889a01..72ca7a8b5 100644 --- a/src/lib/Client/Solaris.py +++ b/src/lib/Client/Solaris.py @@ -23,7 +23,9 @@ class Solaris(Toolset): except OSError: pass self.Refresh() - + for pkg in [cpkg for cpkg in self.cfg.findall(".//Package") if not cpkg.attrib.has_key('type')]: + pkg.set('type', 'sysv') + def Refresh(self): '''Refresh memory hashes of packages''' self.installed = {} -- cgit v1.2.3-1-g7c22