X-Git-Url: http://git.onelab.eu/?p=nodeupdate.git;a=blobdiff_plain;f=NodeUpdate.py;h=fccfcb3a5e31e94c556c183736ac711277c833e6;hp=09183fbdda2bb82a3da567818b461d86fd5ef77f;hb=cfd8982b5f11cde95613fc85c7478ae45731a346;hpb=97b1178abd8551b3dd17799b4258022b60fef382 diff --git a/NodeUpdate.py b/NodeUpdate.py index 09183fb..fccfcb3 100755 --- a/NodeUpdate.py +++ b/NodeUpdate.py @@ -130,14 +130,19 @@ class YumDnf: def update_group(self, group): # it is important to invoke dnf group *upgrade* and not *update* # because the semantics of groups has changed within dnf + overall = True if HAS_DNF: - cmd = \ - "{} {} -y group upgrade {}".format(self.command, self.options, group) + cmd = "{} {} -y group install {}".format(self.command, self.options, group) + Message("Invoking {}".format(cmd)) + if os.system(cmd) != 0: overall = False + cmd = "{} {} -y group upgrade {}".format(self.command, self.options, group) + Message("Invoking {}".format(cmd)) + if os.system(cmd) != 0: overall = False else: - cmd = \ - "{} {} -y groupinstall {}".format(self.command, self.options, group) - Message("Invoking {}".format(cmd)) - return os.system(cmd) == 0 + cmd = "{} {} -y groupinstall {}".format(self.command, self.options, group) + Message("Invoking {}".format(cmd)) + if os.system(cmd) != 0: overall = False + return overall ########## update the whole system def update_system(self):