Ticket #846: bcfg2-action-always.patch

File bcfg2-action-always.patch, 3.3 KB (added by somekool <[email protected]…>, 13 years ago)

patched!

  • src/lib/Client/Frame.py

     
    5656                   isinstance(driver, types.StringType): 
    5757                self.logger.error("Tool driver %s is not available" % driver) 
    5858                drivers.remove(driver) 
    59                  
     59 
    6060        tclass = {} 
    6161        for tool in drivers: 
    6262            if not isinstance(tool, types.StringType): 
     
    9595                if tl: 
    9696                    if not tl[0].VerifyConfigFile(cfile, []): 
    9797                        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 
    100100                        try: 
    101101                            self.states[cfile] = tl[0].InstallConfigFile(cfile) 
    102102                        except: 
     
    120120            self.logger.debug("The following entries are included multiple times:") 
    121121            self.logger.debug(["%s:%s" % entry for entry in multi]) 
    122122            self.logger.debug("") 
    123              
    124                      
     123 
     124 
    125125    def __getattr__(self, name): 
    126126        if name in ['extra', 'handled', 'modified', '__important__']: 
    127127            ret = [] 
     
    175175                self.logger.info("In blacklist mode: suppressing installation of:") 
    176176                self.logger.info(["%s:%s" % (e.tag, e.get('name')) for e in b_to_rem]) 
    177177                self.whitelist = [x for x in self.whitelist if x not in b_to_rem] 
    178              
     178 
    179179        if self.dryrun: 
    180180            if self.whitelist: 
    181181                self.logger.info("In dryrun mode: suppressing entry installation for:") 
     
    223223                    [self.whitelist.remove(ent) for ent in b_to_remv] 
    224224 
    225225        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) 
    228228 
    229229        for entry in candidates: 
    230230            if entry not in self.whitelist: 
     
    270270                    self.DispatchInstallCalls(clobbered) 
    271271 
    272272        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 
    273276            for tool in self.tools: 
    274277                try: 
    275278                    if bundle in mbundles: 
     
    279282                except: 
    280283                    self.logger.error("%s.BundleNotUpdated() call failed:" % \ 
    281284                                      (tool.__name__), exc_info=1) 
    282                  
     285 
    283286    def Remove(self): 
    284287        '''Remove extra entries''' 
    285288        for tool in self.tools: 
     
    303306        if phase == 'final' and self.setup['extra']: 
    304307            self.logger.info(["%s:%s" % (entry.tag, entry.get('name')) \ 
    305308                              for entry in self.extra]) 
    306                  
     309 
    307310        self.logger.info("") 
    308311 
    309312        if ((self.states.values().count(False) == 0) and not self.extra):