summaryrefslogtreecommitdiffstats
path: root/src/lib/Client
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-09-13 00:41:13 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-09-13 00:41:13 +0000
commitda565e4b2b34b7e1de7765ea45f9a4e0007259eb (patch)
treec1e0eb92cc9718dc5c4e320b23cbd98d91344101 /src/lib/Client
parent67428b573ec1b270b8d21212ce639f428a9bcbbe (diff)
downloadbcfg2-da565e4b2b34b7e1de7765ea45f9a4e0007259eb.tar.gz
bcfg2-da565e4b2b34b7e1de7765ea45f9a4e0007259eb.tar.bz2
bcfg2-da565e4b2b34b7e1de7765ea45f9a4e0007259eb.zip
relocation support
They should even get installed group-wise per relocation (Logical change 1.305) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1250 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client')
-rw-r--r--src/lib/Client/Redhat.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Client/Redhat.py b/src/lib/Client/Redhat.py
index db2c90a91..e7dc6a7b7 100644
--- a/src/lib/Client/Redhat.py
+++ b/src/lib/Client/Redhat.py
@@ -17,6 +17,13 @@ class Redhat(Toolset):
Toolset.__init__(self, cfg, setup)
self.pkgwork = {'add':[], 'update':[], 'remove':[]}
self.Refresh()
+ # 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'))
+ if not self.pkgtool.has_key(ptoolname):
+ cmd = "rpm --relocate /usr=%s --oldpackage --replacepkgs --quiet -U %%s"%(cpkg.get('reloc'))
+ self.pkgtool[ptoolname] = (cmd, ("%s", ["url"]))
+ pkg.set('type', ptoolname)
def Refresh(self):
'''Refresh memory hashes of packages'''