diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2005-09-13 15:46:04 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2005-09-13 15:46:04 +0000 |
commit | 19497cce6476e7497cdd813c22c839e9285a1c3d (patch) | |
tree | 93d4280bceb1665d7f57ffba3eda05fd5d2353f7 /src | |
parent | a2b4f01901dd4c91166379428fd669af5e07f3ec (diff) | |
download | bcfg2-19497cce6476e7497cdd813c22c839e9285a1c3d.tar.gz bcfg2-19497cce6476e7497cdd813c22c839e9285a1c3d.tar.bz2 bcfg2-19497cce6476e7497cdd813c22c839e9285a1c3d.zip |
fix all of Cory's problems
(Logical change 1.306)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1256 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Client/Redhat.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/Client/Redhat.py b/src/lib/Client/Redhat.py index e7dc6a7b7..c14219e54 100644 --- a/src/lib/Client/Redhat.py +++ b/src/lib/Client/Redhat.py @@ -17,14 +17,19 @@ class Redhat(Toolset): Toolset.__init__(self, cfg, setup) self.pkgwork = {'add':[], 'update':[], 'remove':[]} self.Refresh() + for pkg in [cpkg for cpkg in self.cfg.finall(".//Package") if not cpkg.attrib.has_key('type')]: + pkg.set('type', 'rpm') + for srv in [csrv for csrv in self.cfg.findall(".//Service") if not csrv.attrib.has_key('type')]: + srv.set('type', 'chkconfig') # relocation hack: we will define one pkgtool per relocation location for pkg in [cpkg for cpkg in self.cfg.findall('.//Package') if cpkg.attrib.has_key('reloc')]: - ptoolname = "rpm-reloc-%s" % (cpkg.get('reloc')) + ptoolname = "rpm-reloc-%s" % (pkg.get('reloc')) if not self.pkgtool.has_key(ptoolname): - cmd = "rpm --relocate /usr=%s --oldpackage --replacepkgs --quiet -U %%s"%(cpkg.get('reloc')) + cmd = "rpm --relocate %s --oldpackage --replacepkgs --quiet -U %%s"%(pkg.get('reloc')) self.pkgtool[ptoolname] = (cmd, ("%s", ["url"])) pkg.set('type', ptoolname) + def Refresh(self): '''Refresh memory hashes of packages''' self.installed = {} |