def install_packages(self,specdir): spec = specdir if specdir.startswith("http:"): spec = self.DownloadSpec(specdir) dependpackages = self.ReadSpec(spec) packages = self.GetPackages(dependpackages) command.yum(packages,'',"install","current")
def ExecYum(self,cmd,operation): if cmd != '': self.Debug('Yum running') yumcmds = cmd.split(';') for yum_cmd in yumcmds: a = yum_cmd.split(',') package=(a[0],) if len(a) == 2: branch = a[1] else: branch = 'test' status,output = command.yum(package,'',operation,branch) command.WriteFile(output) if(status!=0): raise Exception,output