Ticket #846: bcfg2-action-always.patch
File bcfg2-action-always.patch, 3.3 KB (added by somekool <[email protected]…>, 13 years ago) |
---|
-
src/lib/Client/Frame.py
56 56 isinstance(driver, types.StringType): 57 57 self.logger.error("Tool driver %s is not available" % driver) 58 58 drivers.remove(driver) 59 59 60 60 tclass = {} 61 61 for tool in drivers: 62 62 if not isinstance(tool, types.StringType): … … 95 95 if tl: 96 96 if not tl[0].VerifyConfigFile(cfile, []): 97 97 if self.setup['interactive'] and not \ 98 promptFilter("Install %s: %s? (y/N):", [cfile]): 99 continue 98 promptFilter("Install %s: %s? (y/N):", [cfile]): 99 continue 100 100 try: 101 101 self.states[cfile] = tl[0].InstallConfigFile(cfile) 102 102 except: … … 120 120 self.logger.debug("The following entries are included multiple times:") 121 121 self.logger.debug(["%s:%s" % entry for entry in multi]) 122 122 self.logger.debug("") 123 124 123 124 125 125 def __getattr__(self, name): 126 126 if name in ['extra', 'handled', 'modified', '__important__']: 127 127 ret = [] … … 175 175 self.logger.info("In blacklist mode: suppressing installation of:") 176 176 self.logger.info(["%s:%s" % (e.tag, e.get('name')) for e in b_to_rem]) 177 177 self.whitelist = [x for x in self.whitelist if x not in b_to_rem] 178 178 179 179 if self.dryrun: 180 180 if self.whitelist: 181 181 self.logger.info("In dryrun mode: suppressing entry installation for:") … … 223 223 [self.whitelist.remove(ent) for ent in b_to_remv] 224 224 225 225 if self.setup['interactive']: 226 self.whitelist = promptFilter(prompt, self.whitelist) 227 self.removal = promptFilter(rprompt, self.removal) 226 self.whitelist = promptFilter(prompt, self.whitelist) 227 self.removal = promptFilter(rprompt, self.removal) 228 228 229 229 for entry in candidates: 230 230 if entry not in self.whitelist: … … 270 270 self.DispatchInstallCalls(clobbered) 271 271 272 272 for bundle in self.config.findall('.//Bundle'): 273 if self.setup['bundle'] and bundle not in self.setup['bundle']: 274 # prune out unspecified bundles when running with -b 275 continue 273 276 for tool in self.tools: 274 277 try: 275 278 if bundle in mbundles: … … 279 282 except: 280 283 self.logger.error("%s.BundleNotUpdated() call failed:" % \ 281 284 (tool.__name__), exc_info=1) 282 285 283 286 def Remove(self): 284 287 '''Remove extra entries''' 285 288 for tool in self.tools: … … 303 306 if phase == 'final' and self.setup['extra']: 304 307 self.logger.info(["%s:%s" % (entry.tag, entry.get('name')) \ 305 308 for entry in self.extra]) 306 309 307 310 self.logger.info("") 308 311 309 312 if ((self.states.values().count(False) == 0) and not self.extra):