diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | lib/bb/cooker.py | 2 | ||||
-rw-r--r-- | lib/bb/shell.py | 28 |
3 files changed, 16 insertions, 15 deletions
@@ -88,6 +88,7 @@ Changes in Bitbake 1.9.x: - Don't give a stacktrace for invalid tasks, have a user friendly message (#3431) - Add support for "-e target" (#3432) - Fix shell showdata command (#3259) + - Fix shell data updating problems (#1880) Changes in Bitbake 1.8.0: - Release 1.7.x as a stable series diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index f800937e2..8d6c93c06 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -523,8 +523,6 @@ class BBCooker: except ImportError, details: bb.msg.fatal(bb.msg.domain.Parsing, "Sorry, shell not available (%s)" % details ) else: - bb.data.update_data( self.configuration.data ) - bb.data.expandKeys( self.configuration.data ) shell.start( self ) def parseConfigurationFile( self, afile ): diff --git a/lib/bb/shell.py b/lib/bb/shell.py index 81652b6dd..cb91546fb 100644 --- a/lib/bb/shell.py +++ b/lib/bb/shell.py @@ -68,7 +68,6 @@ leave_mainloop = False last_exception = None cooker = None parsed = False -initdata = None debug = os.environ.get( "BBSHELL_DEBUG", "" ) ########################################################################## @@ -156,11 +155,14 @@ class BitBakeShellCommands: cooker.configuration.cmd = cmd td = taskdata.TaskData(cooker.configuration.abort) + localdata = data.createCopy(cooker.configuration.data) + data.update_data(localdata) + data.expandKeys(localdata) try: tasks = [] for name in names: - td.add_provider(cooker.configuration.data, cooker.status, name) + td.add_provider(localdata, cooker.status, name) providers = td.get_provider(name) if len(providers) == 0: @@ -168,9 +170,9 @@ class BitBakeShellCommands: tasks.append([name, "do_%s" % cooker.configuration.cmd]) - td.add_unresolved(cooker.configuration.data, cooker.status) + td.add_unresolved(localdata, cooker.status) - rq = runqueue.RunQueue(cooker, cooker.configuration.data, cooker.status, td, tasks) + rq = runqueue.RunQueue(cooker, localdata, cooker.status, td, tasks) rq.prepare_runqueue() rq.execute_runqueue() @@ -241,11 +243,10 @@ class BitBakeShellCommands: oldcmd = cooker.configuration.cmd cooker.configuration.cmd = cmd - thisdata = copy.deepcopy( initdata ) - # Caution: parse.handle modifies thisdata, hence it would - # lead to pollution cooker.configuration.data, which is - # why we use it on a safe copy we obtained from cooker right after - # parsing the initial *.conf files + thisdata = data.createCopy(cooker.configuration.data) + data.update_data(thisdata) + data.expandKeys(thisdata) + try: bbfile_data = parse.handle( bf, thisdata ) except parse.ParseError: @@ -393,6 +394,11 @@ SRC_URI = "" os.system( "%s %s/%s" % ( os.environ.get( "EDITOR" ), fulldirname, filename ) ) new.usage = "<directory> <filename>" + def package( self, params ): + """Execute 'package' on a providee""" + self.build( params, "package" ) + package.usage = "<providee>" + def pasteBin( self, params ): """Send a command + output buffer to the pastebin at http://rafb.net/paste""" index = params[0] @@ -732,10 +738,6 @@ class BitBakeShell: print __credits__ - # save initial cooker configuration (will be reused in file*** commands) - global initdata - initdata = copy.deepcopy( cooker.configuration.data ) - def cleanup( self ): """Write readline history and clean up resources""" debugOut( "writing command history" ) |