if terminal: self.status.world_target.add(pn) # drop reference count now self.status.possible_world = None self.status.all_depends = None def interactiveMode(self): """Drop off into a shell""" try: from bb import shell except ImportError, details: bb.msg.fatal(bb.msg.domain.Parsing, "Sorry, shell not available (%s)" % details) else: shell.start(self) def parseConfigurationFile(self, afile): try: self.configuration.data = bb.parse.handle(afile, self.configuration.data) # Handle any INHERITs and inherit the base class inherits = ["base"] + (bb.data.getVar( 'INHERIT', self.configuration.data, True) or "").split() for inherit in inherits: self.configuration.data = bb.parse.handle( os.path.join('classes', '%s.bbclass' % inherit), self.configuration.data, True) # Nomally we only register event handlers at the end of parsing .bb files
else: if x == 1: sys.stdout.write("Parsing .bb files, please wait...") sys.stdout.flush() if x == y: sys.stdout.write("done.") sys.stdout.flush() def interactiveMode( self ): """Drop off into a shell""" try: from bb import shell except ImportError, details: bb.msg.fatal(bb.msg.domain.Parsing, "Sorry, shell not available (%s)" % details ) else: shell.start( self ) sys.exit( 0 ) def parseConfigurationFile( self, afile ): try: self.configuration.data = bb.parse.handle( afile, self.configuration.data ) # Handle any INHERITs and inherit the base class inherits = ["base"] + (bb.data.getVar('INHERIT', self.configuration.data, True ) or "").split() for inherit in inherits: self.configuration.data = bb.parse.handle(os.path.join('classes', '%s.bbclass' % inherit), self.configuration.data, True ) # Nomally we only register event handlers at the end of parsing .bb files # We register any handlers we've found so far here... for var in data.getVar('__BBHANDLERS', self.configuration.data) or []: bb.event.register(var,bb.data.getVar(var, self.configuration.data))