]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
12 years agocommand: Treat empty messages as failures, not CommandCompleted
Richard Purdie [Fri, 13 Sep 2013 16:33:30 +0000 (17:33 +0100)] 
command: Treat empty messages as failures, not CommandCompleted

Empty messages should trigger CommandFailed, not CommandCompleted as
otherwise the exit code will be incorrect.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker/command: Add finishcommand to reset cooker state
Richard Purdie [Fri, 13 Sep 2013 16:32:53 +0000 (17:32 +0100)] 
cooker/command: Add finishcommand to reset cooker state

After running a command on the server, it needs to reset to the initial
state. This ensures that subsequent clients start from a known state
and notice any configuration changes.

Ultimately we may want to do more than this buts a good start and better
than nothing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: Rename confusing 'stop' state to 'forceshutdown'
Richard Purdie [Fri, 13 Sep 2013 16:31:54 +0000 (17:31 +0100)] 
cooker: Rename confusing 'stop' state to 'forceshutdown'

The shutdown state causes the server to finish what its doing, stop was
them meant to completely stop it. It doesn't mean the server is stopped
though. Renaming the current stop event for forceshutdown gives more
meaning to what it actually does. The stopped namespace then becomes
available to indicate a completely stopped server.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: Clean up init/reset configuration code
Richard Purdie [Fri, 13 Sep 2013 16:31:09 +0000 (17:31 +0100)] 
cooker: Clean up init/reset configuration code

Currently the cooker event data isn't rebuilt upon reset and the cache
configuration cannot be changed after init. These are both bad things
and this patch refactors the init/reset code so that it is possible
to reconfigure the server.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: Drop obsolete worker test
Richard Purdie [Fri, 13 Sep 2013 16:30:18 +0000 (17:30 +0100)] 
cooker: Drop obsolete worker test

This call only ever happens in cooker context now so we can drop the
nasty worker check from here.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: xmlrpc: delete unused code BitBakeUIEventServer
Alexandru DAMIAN [Mon, 9 Sep 2013 16:41:03 +0000 (17:41 +0100)] 
bitbake: xmlrpc: delete unused code BitBakeUIEventServer

BitBakeUIEventServer is an unused class that pushes UI
events over a separate thread.

The current version of XMLRPC server works just fine with
the classic UI event handlers, so this class is not needed.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Account for changes in append/prepend/remove in the config hash
Richard Purdie [Thu, 12 Sep 2013 13:06:22 +0000 (13:06 +0000)] 
data_smart: Account for changes in append/prepend/remove in the config hash

bitbake wasn't reparsing when _remove items were added to its configuration
and equally, appends/prepends were also being badly tracked. This
change enrures these variables are accounted for in the configuration
hash.

[YOCTO #5172]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoutils: Fix BB_PRESERVE_ENV
Richard Purdie [Wed, 11 Sep 2013 10:01:47 +0000 (11:01 +0100)] 
utils: Fix BB_PRESERVE_ENV

BB_PRESERVE_ENV wasn't working since data.inheritFromOS wasn't getting a
correct list of keys to import into the data store. This fixes
things so it does add all environment variables into the data store
when BB_PRESERVE_ENV is used.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: runqueue: add sceneQueueTaskCompleted event
Alexandru DAMIAN [Mon, 9 Sep 2013 16:40:56 +0000 (17:40 +0100)] 
bitbake: runqueue: add sceneQueueTaskCompleted event

Adding an event to be fired when a scene task is completed.
It is analogous to the run task completed event, and has
been missing for some reason.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agorunqueue.py: check whether multiple versions of the same PN are due to be built
Robert Yang [Mon, 2 Sep 2013 13:47:21 +0000 (09:47 -0400)] 
runqueue.py: check whether multiple versions of the same PN are due to be built

There would be an race issue if we:

$ bitbake make-3.81 make-3.82

This because they are being built at the same time which would cause
unexpected problems, for example:

[snip]
ERROR: Package already staged (/path/to/tmp/sstate-control/manifest-qemux86-make.populate-sysroot)?!
ERROR: Function failed: sstate_task_postfunc
[snip]

Or there would be python's strack trace such as:

[snip]
 *** 0004:    mfile = open(manifest)
     0005:    entries = mfile.readlines()
     0006:    mfile.close()
     0007:
     0008:    for entry in entries:
Exception: IOError: [Errno 2] No such file or directory: xxx
[snip]

[YOCTO #5094]

We can quit earlier to avoid this kind of issue when two versions of the same PN
are going to be built since this isn't supported.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoproviders.py: enhance the runtime debug degbug messgae
Robert Yang [Mon, 2 Sep 2013 13:41:19 +0000 (09:41 -0400)] 
providers.py: enhance the runtime debug degbug messgae

The runtime provider debug message is the same as the build time debug
message, make them different would be better.

[YOCTO #5067]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprserv: Ensure data is committed
Richard Purdie [Sun, 8 Sep 2013 09:45:54 +0000 (09:45 +0000)] 
prserv: Ensure data is committed

In exclusive mode, we need to complete the transaction for writes to make
it to the database. Therefore add sync calls to ensure this happens.

Autocommit mode is significantly (100 times) slower so caching the
data is of significant benefit.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocontrib/vim: merge changes from vim-bitbake repo
Christopher Larson [Fri, 6 Sep 2013 19:25:32 +0000 (12:25 -0700)] 
contrib/vim: merge changes from vim-bitbake repo

commit 00ca441614695b4261d8d4f31b7ef0e3e3784282
Merge: 8cc367d bb88c0f
Author: Christopher Larson <kergoth@gmail.com>
Date:   Thu Aug 22 16:42:42 2013 -0700

    Merge pull request #6 from staticshock/multi-line-strings

    Remove "keepend" and "excludenl" directives

commit bb88c0fd4ad2b7b9c8c4c73def2b3cb20c473ac3
Author: Anton Backer <olegov@gmail.com>
Date:   Sat Jul 13 01:24:15 2013 -0400

    Remove "keepend" and "excludenl" directives

    It looks like these were never actually used correctly, and were doing
    more harm than good. "keepend" on bbString, for instance, prevented
    proper nesting of ${@python} in strings. Similarly, a balanced pair of
    { } braces inside a shell function would force the function to terminate
    early if the closing brace was on its own line.

    So far I've seen absolutely no negative consequences from removing
    these, but a bunch of positive consequences.

    Fixes #1

commit 8cc367d01f4c699be5fcc072de59e6f2f14a138b
Merge: c58628c eec6b7f
Author: Christopher Larson <kergoth@gmail.com>
Date:   Thu Aug 22 09:46:46 2013 -0700

    Merge pull request #4 from staticshock/function-names

    Parse function names with nested vars

commit c58628ca517cd25985361fc0d27863521cc28a5d
Merge: dfb0f7c a890982
Author: Christopher Larson <kergoth@gmail.com>
Date:   Thu Aug 22 09:43:40 2013 -0700

    Merge pull request #5 from yoyko/master

    syntax: python expansion (${@...}) inside shell functions

commit a890982b7c33a6e363b12d6cb69e22b4bbc0f317
Author: Jozef Šiška <yoyo@ksp.sk>
Date:   Thu Aug 22 13:20:45 2013 +0200

    syntax: python expansion (${@...}) inside shell functions

Signed-off-by: Jozef Šiška <jsiska@nuvotechnologies.com>
commit eec6b7f6f0472787929f424968f9a0d78ac4af08
Author: Anton Backer <olegov@gmail.com>
Date:   Fri Jul 12 22:16:01 2013 -0400

    Parse function names with nested vars

    For instance, pkg_postinst_${PN}

    Fixes #3

commit dfb0f7c0d51556448cba79b474b8c19b9cded9af
Author: Christopher Larson <chris_larson@mentor.com>
Date:   Fri Jun 1 18:57:13 2012 -0400

    syntax: add ?= flag def

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
commit 589a62a00709ca822a42327e7086008aba2d9933
Author: Christopher Larson <kergoth@gmail.com>
Date:   Fri Dec 9 22:25:47 2011 -0700

    ftplugin: set commentstring

Signed-off-by: Christopher Larson <kergoth@gmail.com>
commit 7ffc80b3fb4ddf68cc5a69bdc63ab03d70c44f87
Author: Chris Larson <chris_larson@mentor.com>
Date:   Thu Jun 2 15:27:48 2011 -0700

    Handle +=/=+ for flags

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoknotty: Reduce refresh of footer
Richard Purdie [Mon, 2 Sep 2013 21:48:29 +0000 (21:48 +0000)] 
knotty: Reduce refresh of footer

When displaying larger number of events the client can get caught up in displaying
the footer, then immediately overwriting it. To avoid this, wait for pauses
in the event stream before displaying the footer to give a slightly more
friendly feel to the UI.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: Ensure ${DATE} and ${TIME} are consistent
Peter Kjellerstedt [Fri, 6 Sep 2013 15:53:20 +0000 (17:53 +0200)] 
bitbake: Ensure ${DATE} and ${TIME} are consistent

Due to the worker split the ${DATE} and ${TIME} variables could end up
with different values for different workers.

E.g., a task like do_rootfs that is run within a fakeroot environment
had a slightly different view of the time than another task that was not
fakerooted which made it impossible to correctly refer to the image
generated by do_rootfs from the other task.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: remove custom image from the images list when not needed
Cristiana Voicu [Wed, 4 Sep 2013 15:45:07 +0000 (18:45 +0300)] 
hob: remove custom image from the images list when not needed

Selected custom image recipes should be cleared from the combo the moment
you change your selection. The idea is to always perform the selection of
those images in the same way (i.e through the "Select from my image
recipes" option).

[YOCTO #5001]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: limit the description size when a custom image is saved
Cristiana Voicu [Thu, 5 Sep 2013 12:47:52 +0000 (15:47 +0300)] 
hob: limit the description size when a custom image is saved

[YOCTO #5003]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agonewbb.vim: Use 'git config' instead of git-config
Khem Raj [Thu, 5 Sep 2013 21:09:20 +0000 (14:09 -0700)] 
newbb.vim: Use 'git config' instead of git-config

Newer versions of git do not have the '-' concatenated command

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Move getVar expand cache handing to fix _remove operations
Richard Purdie [Fri, 6 Sep 2013 20:14:25 +0000 (20:14 +0000)] 
data_smart: Move getVar expand cache handing to fix _remove operations

DISTRO_FEATURES_remove = "opengl" wasn't working as expected. The reason
turned out the be the indirect reference to opengl and the fact _remove was
operating on unexpanded data.

This patch rearranges some code to ensure we operate on expanded data
by moving the expand cache handing into getVarFlags instead of getVar.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: remove PACKAGE_INSTALL variable setting from hob
Cristiana Voicu [Tue, 3 Sep 2013 07:28:01 +0000 (10:28 +0300)] 
hob: remove PACKAGE_INSTALL variable setting from hob

Before saving the packages for a custom images in a .bb file,
the packages were saved in bitbake memory. Now all the variables
are saved in conf file, so saving PACKAGE_INSTALL is not needed anymore.
Moved were LINGUAS_INSTALL is set, because both conditions are for testing
if a custom image is saved.

[YOCTO #5101]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-worker: ensure BUILDNAME is available during execution
Paul Eggleton [Mon, 2 Sep 2013 17:26:28 +0000 (18:26 +0100)] 
bitbake-worker: ensure BUILDNAME is available during execution

BUILDNAME is set from cooker by default, so since the worker split it
will not be set when executing functions. In OpenEmbedded this results
in /etc/version (which is populated from BUILDNAME) not having any
content. Pass this variable value through to the worker explicitly to
fix the issue.

Fixes [YOCTO #4818].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake/cooker: fix some calls of cookerdata.findConfigFile method
Cristiana Voicu [Mon, 2 Sep 2013 11:18:25 +0000 (14:18 +0300)] 
bitbake/cooker: fix some calls of cookerdata.findConfigFile method

Cookerdata.findconfigFile method has a new parameter. Changed some calls.

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agorunqueue: Fix scenequeue to pass file descriptors, not a float
Richard Purdie [Mon, 2 Sep 2013 08:15:19 +0000 (08:15 +0000)] 
runqueue: Fix scenequeue to pass file descriptors, not a float

This was missed off in a previous patch.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserver/xmlrpc: stop server on client exit
Alexandru DAMIAN [Sat, 31 Aug 2013 22:46:06 +0000 (23:46 +0100)] 
server/xmlrpc: stop server on client exit

If the server only expects a single client to connect (i.e.
no bind parameter set, so there is no way for the
clients to get the server port), stop the server after
the first client exits.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprserv/serv: Settle on two threads for optimal performance
Richard Purdie [Sat, 31 Aug 2013 22:44:42 +0000 (23:44 +0100)] 
prserv/serv: Settle on two threads for optimal performance

Using the threading mixin class resulted in large amounts of memory
being used by the PR server for no good reason. Using a receiver thread
and a thread to do the actual database operations on a single connection
gives the same performance with a much saner memory overhead so
switch to this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild: Fix profile file names
Richard Purdie [Sat, 31 Aug 2013 22:43:37 +0000 (23:43 +0100)] 
build: Fix profile file names

Using the basename of the .bb file is not unique, for example xxx-native
and xxx can overwrite each other. If this happens whilst running, you can
get odd backtraces as one file is parsed as another tries to write out
new data.

Avoid issues by using PN for the output filename instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserv/db: Don't use BEGIN/COMMIT
Richard Purdie [Sat, 31 Aug 2013 22:42:13 +0000 (23:42 +0100)] 
serv/db: Don't use BEGIN/COMMIT

Since we don't support using multiple servers on the same database file,
don't use the BEGIN/COMMIT syntax and allow writes to the database
to work ~100 times faster with no transaction locking.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserv/db: Take an excluside lock on the database
Richard Purdie [Sat, 31 Aug 2013 22:42:57 +0000 (23:42 +0100)] 
serv/db: Take an excluside lock on the database

We only support one server using the database at a time so take an exclusive
lock and avoid later lock overhead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserv/db: Fix looping upon database locked issues
Richard Purdie [Sat, 31 Aug 2013 22:41:35 +0000 (23:41 +0100)] 
serv/db: Fix looping upon database locked issues

If the database is locked we will get an immediate error indicating so,
there is no retry timeout. The looping code is therefore useless, the loop
count is near instantly exceeded.

Using a time based retry means we can wait a sensible time, then gracefully
exit.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserver/process, server/xmlrpc, runqueue: Use select.select() on fds, not time.sleep()
Richard Purdie [Sat, 31 Aug 2013 22:40:55 +0000 (23:40 +0100)] 
server/process, server/xmlrpc, runqueue: Use select.select() on fds, not time.sleep()

The existing backend server implementations were inefficient since they
were sleeping for the full length of the timeouts rather than being woken when
there was data ready for them. It was assumed they would wake and perhaps did
when we forked processes directory but that is no longer the case.

This updates both the process and xmlrpc backends to wait using select(). This
does mean we need to pass the file descriptors to wait on from the internals
who know which these file descriptors are but this is a logical improvement.

Tests of a pathaolgical load on the process server of ~420 rapid tasks
executed on a server with BB_NUMBER_THREAD=48  went from a wall clock
measurement of the overall command execution time of 75s to a much more
reasonable 24s.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprserv: Allow 'table is locked' matching for retry loop
Richard Purdie [Fri, 30 Aug 2013 16:52:20 +0000 (17:52 +0100)] 
prserv: Allow 'table is locked' matching for retry loop

Try and avoid errors like "ERROR: database table is locked: PRMAIN_nohist"
by retrying if we see the string "is locked".

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserver/xmlrpc: Increase timeout to 60s
Richard Purdie [Fri, 30 Aug 2013 16:41:16 +0000 (17:41 +0100)] 
server/xmlrpc: Increase timeout to 60s

This is a better value that the earlier infinite timeout yet still
allows for servers with high loads. It does mean the bitbake process
can hang at exit for the timeout period but that should never happen
and only happened for me in some test cases which wouldn't happen
in normal use.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocookerdata: Allow bblayers.conf to be found using BBPATH
Richard Purdie [Thu, 29 Aug 2013 13:27:29 +0000 (14:27 +0100)] 
cookerdata: Allow bblayers.conf to be found using BBPATH

It should be possible to run a build anywhere on the filesystem and have
bitbake find the correct build directory if its set somehow. The BBPATH
variable makes perfect sense for this usage. Therefore use any available
value of BBPATH to search for conf/bblayers.conf before walking the parent
directory structure.

This restores the option of being able to run bitbake from anywhere if
the user has set things up to operate in that environment.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocookerdata: Set TOPDIR when using bblayers.conf
Richard Purdie [Thu, 29 Aug 2013 13:26:53 +0000 (14:26 +0100)] 
cookerdata: Set TOPDIR when using bblayers.conf

By definition, bblayers.conf is at the top of the build tree. We'd like
to support running bitbake anywhere within that build tree but TOPDIR
gets set to wherever cwd is. Change the code to reset TOPDIR
to the top of the build directory.

This shouldn't break anything but does make the system more usable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprserv/serv: Multithread the server
Richard Purdie [Wed, 28 Aug 2013 16:10:09 +0000 (16:10 +0000)] 
prserv/serv: Multithread the server

This makes the PR server multithreaded and able to handle multiple connections
at once which means its no longer a build bottle neck when serving one connection
at a time. I've experimented and database connection for each thread seems to
cause the least issues, pushing the contention for sqllite to handle itself.

This means moving the db/table connection code into the actual function methods.
It doesn't abstract well as a function since we need the db object around for
the lifetime of the function as well as the table else we lose the connection.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprserv/db: Threading fixes
Richard Purdie [Wed, 28 Aug 2013 16:06:10 +0000 (16:06 +0000)] 
prserv/db: Threading fixes

Enabling threading for the PRServer causes a number of issues. Firstly is
the obtuse error:

sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type

which is due to the class not being derived from object. See:
http://docs.python.org/2/library/sqlite3.html#registering-an-adapter-callable

Secondly, we want to enable multithreadded access to the database so we do this
when we open it. This opens the way up to multithreading the PR server.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserv.py: Fix regression from 972bc43e6d5b
Jason Wessel [Wed, 28 Aug 2013 02:20:55 +0000 (21:20 -0500)] 
serv.py: Fix regression from 972bc43e6d5b

commit 972bc43e6d5b1207b944b3baa8f9805adb35dda7 (serv.py: Fix hang
when spawned dynamically with bitbake) introduced a regression,
because the wrong patch was submitted.  The syntax was incorrect in
the original patch.  The logger iterator must be used with a call to
getLogger().

[YOCTO #5059]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: allow removal of multiple words at once with _remove
Christopher Larson [Tue, 27 Aug 2013 23:27:41 +0000 (16:27 -0700)] 
data_smart: allow removal of multiple words at once with _remove

    FOO = "foo bar baz"
    FOO_remove = "foo baz"

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: use a split/filter/rejoin for _remove
Christopher Larson [Tue, 27 Aug 2013 23:27:40 +0000 (16:27 -0700)] 
data_smart: use a split/filter/rejoin for _remove

This is more idiomatic, and from the limited performance testing I did, is
faster as well. See https://gist.github.com/kergoth/6360248 for the naive
benchmark.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserv.py: Fix hang when spawned dynamically with bitbake
Jason Wessel [Tue, 27 Aug 2013 20:12:55 +0000 (15:12 -0500)] 
serv.py: Fix hang when spawned dynamically with bitbake

The PRServer has the possibility to hang indefinitely blocking on a
semaphore processing a xmlrpc request to send an event back to the
main bitbake instance.  This was observed during a "bitbake -e" on a
heavily loaded machine and the main bitbake instance and cooker exited
before the PRServer emitted its first log.

The stack trace is provided below as to show what happens every time a
logger.info() is executed in the PRServer.  Not only does it write to
the stream handler but it also tries to send the event to the main
event processor.

    self._notempty.acquire()
    self.queue.put(event)
    _ui_handlers[h].event.send(event)
    fire_ui_handlers(event, d)
    fire(record, None)
    self.emit(record)
    hdlr.handle(record)
    self.callHandlers(record)
    self.handle(record)
    self._log(INFO, msg, args, **kwargs)
    (self.dbfile, self.host, self.port, str(os.getpid())))
    self.work_forever()
    pid = self.daemonize()
    self.prserv.start()
    singleton.start()
    self.prhost = prserv.serv.auto_start(self.data)
    cooker.pre_serve()
    bb.cooker.server_main(self.cooker, self.main)
    self.run()
    code = process_obj._bootstrap()
    self._popen = Popen(self)
    self.serverImpl.start()
    server.detach()
    server = start_server(servermodule, configParams, configuration)
    ret = main()

It was never intended for the PRServer to send its logs anywhere but
its own log file.  The event processing is an artifact of how the
PRServer was forked and it inherits the event log handlers.  The
simple fix is to clean up and purge all the log handlers after the
fork() but before doing any of the typical PRServer work or logging.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: fixes for image combo box
Cristiana Voicu [Tue, 27 Aug 2013 10:27:37 +0000 (13:27 +0300)] 
hob: fixes for image combo box

When an image from scratch is selected, and recipes parsing
is canceled, the image shown by the combo box isn't correct.

[YOCTO #5000]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: add event handlers filtering in Hob
Cristiana Voicu [Tue, 27 Aug 2013 07:21:38 +0000 (10:21 +0300)] 
hob: add event handlers filtering in Hob

Create the _evt_list for hob; it is longer than the knotty
uses because it handles more events.

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake/event.py: UIhandler filter should work without a mask
Cristiana Voicu [Tue, 27 Aug 2013 08:00:33 +0000 (11:00 +0300)] 
bitbake/event.py: UIhandler filter should work without a mask

The default for the mask will be * (all the handlers)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocommand.py: Call updateCache for all states != running
Richard Purdie [Mon, 26 Aug 2013 12:41:03 +0000 (12:41 +0000)] 
command.py: Call updateCache for all states != running

updateCache handles the logic for shutting down the parsing so we need
to call it for all cases when we're not running.

This fixes hangs if Ctrl+C is pressed during parsing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Add _remove operator
Richard Purdie [Sat, 9 Mar 2013 12:47:21 +0000 (12:47 +0000)] 
data_smart: Add _remove operator

There are long standing complaints about the fact its very difficult
to remove a portion of a variable. The immediate request is for a -=
and =- operator. The trouble is that += and =+ are "immediate"
operators and are applied straight away. Most people would expect
-= and =- to be deferred to have the effect most people desire and
therefore implementing -= and =- would just make the situation more
confusing.

This deferred operation is much more similar to the override syntax
which happens at data store finalisation. The _remove operator is
therefore in keeping with the _append and _prepend operations.

This code is loosely based on a patch from Peter Seebach although it
has been rewritten to be simpler, more efficient and avoid some
potential bugs.

The code currently only works on space delimited variables, which
are by far the most commom type. If bitbake is ehanced to support
types natively in future, we can adjust this code to adapt to that.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: Add ui event handlers filtering
Richard Purdie [Fri, 23 Aug 2013 16:16:50 +0000 (16:16 +0000)] 
bitbake: Add ui event handlers filtering

Add functionality to allow UIs to update and change the types of events they
recieve. To do this we need to add a new command and also need to be able
to obtain the current event hander ID. In the case of xmlrpc, this is
straightforward, in the case of the process server we need to save the result
in a multiprocessing.Value() so we can retrive it. An excplit command
was added to the server API to facilitate this.

The same function can also be used to mask or unmask specific log messages,
allowing the UI to optionally differ from the standard set of message
filtering.

Based upon work by Cristiana Voicu <cristiana.voicu@intel.com>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserver/xmlrpc/prserv: Add sane timeout to default xmlrpc server
Richard Purdie [Sat, 24 Aug 2013 12:03:10 +0000 (12:03 +0000)] 
server/xmlrpc/prserv: Add sane timeout to default xmlrpc server

The standard python socket connect has long timouts which make sense for remote
connections but not local things like the PR Service. This adds a timeout
parameter to the common xmlrpc server creation function and sets it to a more
reasonable 5 seconds.

Making the PR server instantly exit is a good way to test the effect of this
on bitbake.

We can remove the bodged timeout in the PRServer terminate function which
has the side effect of affecting global scope.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprocess: Improve exit handling and hangs
Richard Purdie [Sat, 24 Aug 2013 11:56:31 +0000 (11:56 +0000)] 
process: Improve exit handling and hangs

It turns out we have a number of different ways the process server termination can
hang. If we call cancel_join_thread() on the event queue, it means that it can be left
containing partial data. This means the reading of the event queue in the terminate()
function can hang, the timeout and block parameters to Queue.get() don't make any
difference.

Equally, if we don't call cancel_join_thread(), the join_thread in terminate()
will hang giving a different deadlock.

The best solution I could find is to loop over the process is_alive() after requesting
it stops,  trying to join the thread and if that fails, try and flush the event
queue again.

It wasn't clear what difference a force option should make in this case, we're
gracefully trying to empty queues and shut down regardless of whether its a SIGTERM
so I've simply removed the force option.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoparse: Return IOError when including file with absolute path
Martin Jansa [Fri, 23 Aug 2013 17:06:26 +0000 (19:06 +0200)] 
parse: Return IOError when including file with absolute path

* resolve_file was behaving different when relative and absolute
  paths were passed to it

* include relative-path/non-existent-file.inc
  works correctly resolve_file throws IOError, BBHandler.py:handle()
  doesn't catch it, ConfHandler.py:include() catches IOError and shows:
  DEBUG: CONF file 'relative-path/non-existent-file.inc' not found
* include /absolute-path/non-existent-file.inc
  was failing, because resolve_file just returns fn,
  BBHandler.py:handle() calls bb.parse.mark_dependency(d, abs_fn)
  which throws:
  OSError: [Errno 2] No such file or directory: '/absolute-path/non-existent-file.inc'
  and parsing fails.
  Ad isfile() test for absolute fn and throw IOError to make
  resolve_file behavior consistent for both paths.

* I know we had some issues with -b relative-path-to-recipe.bb and
  absolute path, so consider this patch only as RFC and documentation of
  this problem

* Catch OSError too in ConfHandler.py:include() e.g. in case the file exists, but user
  cannot read it or something like that.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprserv/serv: Fix pid file removal
Richard Purdie [Fri, 23 Aug 2013 16:41:53 +0000 (16:41 +0000)] 
prserv/serv: Fix pid file removal

Mark Hatle spotted there were pid files being left around. This patch
fixes things so the removal function is called correctly, the code
contained a typo.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoevent/msg: Add primitive server side UI log record filtering
Richard Purdie [Fri, 23 Aug 2013 14:55:21 +0000 (15:55 +0100)] 
event/msg: Add primitive server side UI log record filtering

Currently one of the bigger bottlenecks in bitbake is passing all the
log messages over IPC to the UI. This is worthwhile if the UI is going
to use them, pointless otherwise. The memory resident bitbake suffers
from this performance issue particularly badly.

This patch filters the log events on the server side with the global
log levels and hence reduces the traffic. This speeds up parsing
(18.5s down to 17s) and bitbake general command overhead is reduced
(7.3s for a NOP to 6.2s).

What isn't added here is general event filtering or the ability to
change the log levels once set. Provision is made for adding this
in a follow up patch though.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild.py: create symlink for run.do_xxx scripts
Nicolas Dechesne [Fri, 16 Aug 2013 09:20:59 +0000 (11:20 +0200)] 
build.py: create symlink for run.do_xxx scripts

The 'courtesy' symlink for log.do_xxx are quite useful when debugging, so
with this commit, we now get similar 'courtesy' symlink for run.do_xxx
scripts.

We only create symlink for tasks, not individual functions.

The symlink is create right before the actual runfile is created, indeed
we cannot create the symlink right after running the task since a failure
or execption can happen, in which case the symlink wouldn't be created,
and symlink are particularely useful when the task failed!

Another option would be create the symlink after the runfile is created,
and before the script is executed, but that means we need to duplicate the
code in case of Shell vs Python task.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: changes to image combo box from image configuration page
Cristiana Voicu [Tue, 20 Aug 2013 13:30:22 +0000 (16:30 +0300)] 
hob: changes to image combo box from image configuration page

In some cases when a new machine is selected, the image combo
shows the same option. Fixed this issue, because the image
combo box should be reseted.

Fix the counter for the options in the combobox. This bug
was introduced by the templates functionality. The combo box had some
last changes, and I forgot about this counter.

[YOCTO #4858 & #5000]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agopropertydialog.py : Scrollable windows for long tooltips
Andrei Dinu [Wed, 15 May 2013 09:59:26 +0000 (09:59 +0000)] 
propertydialog.py : Scrollable windows for long tooltips

In some cases, the length of the description and the brought
in by field was too big. That led to the size of the property
dialog exceeding Hob's size. For long tooltips we use
scrollable windows now.

[HOB #4321]

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild.py: Provide useful diagnostics when exiting.
Peter Seebach [Wed, 10 Oct 2012 22:11:54 +0000 (17:11 -0500)] 
build.py: Provide useful diagnostics when exiting.

Running scripts with 'set -e' produces silent failures with no
diagnostic. Add an exit handler which produces diagnostics, including
details of what was running if the shell seems to be bash.

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/retrieveimagedialog: change labels
Cristiana Voicu [Fri, 16 Aug 2013 08:48:00 +0000 (11:48 +0300)] 
hob/retrieveimagedialog: change labels

Some labels needed to be changed in order to respect the convention.

[YOCTO #4999]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotaskdata: report close matches with NoProvider errors
Paul Eggleton [Fri, 9 Aug 2013 13:52:05 +0000 (13:52 +0000)] 
taskdata: report close matches with NoProvider errors

Assuming there is no known reason why an item is not provided, show
close matches on the assumption that it might have been a typo or
other mistake.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agorunqueue: report close matches for an invalid task name
Paul Eggleton [Fri, 9 Aug 2013 13:51:22 +0000 (13:51 +0000)] 
runqueue: report close matches for an invalid task name

Help to pick up mistakes such as "bitbake -c cleanstate xyz" (instead
of "bitbake -c cleansstate xyz".)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: Add missing file from previous commit
Richard Purdie [Mon, 12 Aug 2013 09:22:40 +0000 (10:22 +0100)] 
hob: Add missing file from previous commit

This should have been part of 'hob: implement the "retrieve image dialog" +
changes to image combo box' but got lost in the merge process. This adds
the missing file.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodepexp: fix typo in variable name
Ross Burton [Mon, 5 Aug 2013 15:39:47 +0000 (15:39 +0000)] 
depexp: fix typo in variable name

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodepexp: insert data instead of append/set, for speed
Ross Burton [Mon, 5 Aug 2013 15:22:11 +0000 (15:22 +0000)] 
depexp: insert data instead of append/set, for speed

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodepexp: make parse() a member function
Ross Burton [Mon, 5 Aug 2013 15:16:32 +0000 (15:16 +0000)] 
depexp: make parse() a member function

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/imageconfigurationpage: changes to image combobox
Cristiana Voicu [Thu, 25 Jul 2013 08:25:29 +0000 (08:25 +0000)] 
hob/imageconfigurationpage: changes to image combobox

Place the "Create your own image recipe" field to the
end of the image recipes list.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/imagedetailspage: add tooltip for save image recipe button
Cristiana Voicu [Thu, 25 Jul 2013 08:24:47 +0000 (08:24 +0000)] 
hob/imagedetailspage: add tooltip for save image recipe button

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: set focus on entry name when the name is not correct
Cristiana Voicu [Tue, 16 Jul 2013 14:17:10 +0000 (14:17 +0000)] 
hob: set focus on entry name when the name is not correct

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: save packages in IMAGE_INSTALL instead of PACKAGE_INSTALL
Cristiana Voicu [Tue, 16 Jul 2013 13:35:22 +0000 (13:35 +0000)] 
cooker: save packages in IMAGE_INSTALL instead of PACKAGE_INSTALL

Hob retrieves the list of recipes and packages using the IMAGE_INSTALL
variable, so a custom image should be saved using this variable.
Changed how the image is saved in a bb file

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: implement the "retrieve image dialog" + changes to image combo box
Cristiana Voicu [Tue, 16 Jul 2013 13:33:21 +0000 (13:33 +0000)] 
hob: implement the "retrieve image dialog" + changes to image combo box

Tha changes related to the image combo box are related to the
action done in the retrieveImageDialog. When the user wants to select
a customize image, but then he cancels the action, the combo box is set to
--select a base image--.
If the user selects an image using the new dialog, a new item with its name
is added to the combo box list and then it is activated.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: retrieve file name of an image
Cristiana Voicu [Thu, 25 Jul 2013 11:37:51 +0000 (11:37 +0000)] 
hob: retrieve file name of an image

The entire file name (with the path) is needed to know
if the image is located in the "build" directory or it comes
from layers. According to this information, the image is placed
differently in the combobox.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: changes to image combo box
Cristiana Voicu [Thu, 25 Jul 2013 07:50:33 +0000 (07:50 +0000)] 
hob: changes to image combo box

Added an item for the custom images.
Added a separator in the combo box.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/bitbake: when an image is saved, it should require an image from layers
Cristiana Voicu [Thu, 25 Jul 2013 07:45:28 +0000 (07:45 +0000)] 
hob/bitbake: when an image is saved, it should require an image from layers

Saving an image that requires another image will cause issues when
the second on is removed. So, we have agreed to "require" only the images
from layers.
The functionality is implemented in bitbake, in order to be more abstract,
and it is used by Hob when an image recipe is saved.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: the saved image should be editable
Cristiana Voicu [Tue, 16 Jul 2013 13:25:52 +0000 (13:25 +0000)] 
hob: the saved image should be editable

Also, the image can be saved when the a name is filled.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: change the name and description for the saveimagedialog
Cristiana Voicu [Thu, 25 Jul 2013 07:40:49 +0000 (07:40 +0000)] 
hob: change the name and description for the saveimagedialog

The image name and description should be saved for a future
save.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob & bitbake: append a value to a variable from hob throught bitbake
Cristiana Voicu [Mon, 29 Jul 2013 11:44:58 +0000 (11:44 +0000)] 
hob & bitbake: append a value to a variable from hob throught bitbake

It was necessary to append ${TOPDIR}/recipes/images to BBFILES.
Implemented the mechanism to append a value to a variable: a command and
the method in cooker.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: make changes in order to permit from UI to edit an image after saving it
Cristiana Voicu [Thu, 25 Jul 2013 07:37:34 +0000 (07:37 +0000)] 
hob: make changes in order to permit from UI to edit an image after saving it

Added the image name to the list model, in order to show the image name as
the user named it.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/bitbake: save the description of a custom image
Cristiana Voicu [Mon, 29 Jul 2013 10:02:24 +0000 (10:02 +0000)] 
hob/bitbake: save the description of a custom image

When an new image is saved, the dialog for this action has
a field for the description. Changed how an image is saved, by
appending the DESCRIPTION variable at the end of the .bb file.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/bitbake: create a template (a .bb file) from hob through bitbake
Cristiana Voicu [Mon, 29 Jul 2013 09:55:06 +0000 (09:55 +0000)] 
hob/bitbake: create a template (a .bb file) from hob through bitbake

Modified generateNewImage function from cooker, in order to be used to
save a template in Hob.
Created a command to ensure that some dirs are created. The templates
(recipes) will be saved in {TOPDIR}/recipes/images folder.
Called these methods from Hob.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: create save image dialog used to save a template
Cristiana Voicu [Thu, 25 Jul 2013 07:25:38 +0000 (07:25 +0000)] 
hob: create save image dialog used to save a template

Implemented a new dialog used by Hob. This dialog was desinged
in order to permit to save only in a particular directory.
Also, it has a field where the user can type a description
for the image.
Implemented in the handler a method to retrieve the topdir variable,
because the changes will be saved in {topdir}/recipes/images directory.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: labelling changes in Hob
Cristiana Voicu [Thu, 25 Jul 2013 07:21:06 +0000 (07:21 +0000)] 
hob: labelling changes in Hob

When the design document for templates in Hob was created, we've noticed
that some labels need to change.

[YOCTO #4193]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/packageslist: change image size label to estimated image size
Cristiana Voicu [Tue, 30 Jul 2013 12:00:08 +0000 (12:00 +0000)] 
hob/packageslist: change image size label to estimated image size

On the "Edit packages list" page, the image size may be computed before
building. We didn't find another way to give a more accurate size, so
we have agreed to inform the user that this an estimated size.

[YOCTO #4388]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/advancedsettings: change toolchain labels to sdk labels
Cristiana Voicu [Fri, 2 Aug 2013 14:57:55 +0000 (14:57 +0000)] 
hob/advancedsettings: change toolchain labels to sdk labels

In order to be easier for the user to understand, we have changed the
toolchain labels to sdk.

[YOCTO #3808]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-worker: import needed signal module
Valentin Popa [Tue, 30 Jul 2013 08:27:28 +0000 (08:27 +0000)] 
bitbake-worker: import needed signal module

bitbake-worker makes use of the signal module
but it doesn't import it. This patch fixes the issue.

[YOCTO #4750]

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: fix unpack of .xz files
André Draszik [Tue, 30 Jul 2013 12:56:22 +0000 (12:56 +0000)] 
fetch2: fix unpack of .xz files

If a file ends with .xz, it currently gets overwritten during unpack:
The decompress command for .xz files is:
  'xz -dc %s > %s' % (file, efile)
and as efile == file, we end up overwriting file (the source).

Fix this by adding .xz to the list of suffixes that that need to
be removed from a file name for an extract command, leaving the
bare file name. Now, for a given file foo.xz,
file == foo.xz and efile == foo, similar to how .gz .bz2 and .Z
files are treated.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: runqueue: add warning if invalidating invalid task
Petter Mabäcker [Wed, 24 Jul 2013 10:31:04 +0000 (10:31 +0000)] 
bitbake: runqueue: add warning if invalidating invalid task

Add a warning if 'bitbake -C' is executed with a task that does not
exist.

Fixes [YOCTO #4877]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: sstatemirror is standard also for file://.* regex
Cristiana Voicu [Mon, 22 Jul 2013 10:54:11 +0000 (10:54 +0000)] 
hob: sstatemirror is standard also for file://.* regex

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: changed the split of SSTATE_MIRRORS variable
Cristiana Voicu [Mon, 22 Jul 2013 10:54:10 +0000 (10:54 +0000)] 
hob: changed the split of SSTATE_MIRRORS variable

Until now the split made searching the string "file://", but
this is not ok when SSTATE_VARIABLE has the following form:
SSTATE_MIRRORS ?= "\
     file://.* http://someserver.tld/share/sstate/PATH \n \
     file://.* file:///some/local/dir/sstate/PATH"

In the documentation I've found that \n is the list separator.

[YOCTO #4857]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoproviders.py: print a debug message for dynamic pacakge
Robert Yang [Fri, 19 Jul 2013 03:07:51 +0000 (03:07 +0000)] 
providers.py: print a debug message for dynamic pacakge

We can't know the dynamic pacakge's name exactly, there might be a
problem, for example, when we use:

IMAGE_INSTALL_append += "ncurses-lib12344"

The ncurses-lib12344 matches ncurses' dynamic packages pattern:

PACKAGES_DYNAMIC = "^${PN}-lib.*"

so there is no errors before the rootfs creation though there is no
ncurses-lib12344.

We can warn this, but I think that we'd better not since there are many
dynamic packages, or there would be too many warnings, for example, the
perl and kernel modules, maybe we can print a debug message for it.

[YOCTO #4798]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoHOB:Proper handle of SIGINT
Valentin Popa [Wed, 3 Jul 2013 11:31:44 +0000 (11:31 +0000)] 
HOB:Proper handle of SIGINT

Modal dialogs doesn't run on the main loop so they cannot
catch any signal from the terminal. This patch makes sure
the dialogs are destroyed when a SIGINT is sent to HOB.

[YOCTO #3329]

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: save button from settings called a nonexisting method
Cristiana Voicu [Mon, 1 Jul 2013 08:09:52 +0000 (08:09 +0000)] 
hob: save button from settings called a nonexisting method

The method was removed when the process for saving configuration
in Hob was changed. Replace the call with the right function.

[YOCTO #4793]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocookerdata: Improve message if BBPATH is unset and bblayers.conf not found
Richard Purdie [Fri, 28 Jun 2013 09:32:56 +0000 (10:32 +0100)] 
cookerdata: Improve message if BBPATH is unset and bblayers.conf not found

If BBPATH isn't set and bblayers.conf isn't found, improve the message
shown to the user to help their understanding of what the problem might
be.

[YOCTO #3271]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
A

12 years agobitbake: python funcname can not include special character @
Li Wang [Tue, 25 Jun 2013 06:31:14 +0000 (14:31 +0800)] 
bitbake: python funcname can not include special character @

[YOCTO #4772]

When path:file change to python function, it maybe include '@' character.
So, add the special character to change to '_' for avoid error.

Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: adding a new comment should be placed on a new line
Cristiana Voicu [Tue, 25 Jun 2013 13:03:25 +0000 (16:03 +0300)] 
bitbake: adding a new comment should be placed on a new line

In this case, the comment is appended to the end of the file.
Some text editors, do not place  a '\n' to the end of the file
after saving it.

[YOCTO #4636]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Fix bug with overrides and weak default values
Richard Purdie [Fri, 21 Jun 2013 11:31:32 +0000 (11:31 +0000)] 
data_smart: Fix bug with overrides and weak default values

(aka pay the cookie monster for weak defaults)

If you have code like:

MYVAR = "a"
MYVAR_override ??= "b"

then MYVAR will get the value "a" even when override is in OVERRIDES. The
reason is that the value of ??= is set as a flag not a value and the cookie
monster isn't paid.

The fix is to ensure appropriate payment is made for a defaultval varflag
matching the usual setVar case.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Ensure variable flags are accounted for in config data hash
Richard Purdie [Thu, 20 Jun 2013 20:53:14 +0000 (21:53 +0100)] 
data_smart: Ensure variable flags are accounted for in config data hash

Currently if the flags set against a variable in the base data store
change, it doesn't automatically trigger a reparse when it really
should. For example with the blacklist class setting:

PNBLACKLIST[qemu] = "bar"
PNBLACKLIST[bash] = "foo"

will not trigger a reparse if only one entry is changed and a
blacklisted recipe can still be built.

I did consider using BB_SIGNATURE_EXCLUDE_FLAGS in here however it
doesn't make sense, we want to trigger a reparse when any of the
flags change too (which is different to the sstate signatures which
we wouldn't want to change in those cases).

[YOCTO #4627]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: save variables in conf/ directory
Cristiana Voicu [Thu, 20 Jun 2013 14:21:17 +0000 (17:21 +0300)] 
hob: save variables in conf/ directory

Until now the variables were saved in bitbake configuration,
now they are saved in configuration files, in order to be read by
bitbake-worker. This helps to assure the consistency for the rest
of the variables.

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: replace the init cooker with reset in order to keep the history
Cristiana Voicu [Thu, 20 Jun 2013 14:21:16 +0000 (17:21 +0300)] 
hob: replace the init cooker with reset in order to keep the history

When the cooker initialization is called, the variables history is lost.
It need a reset, in order to load the configuration files.
Also, concatenated the value for INHERIT variable.

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: call the initConfiguration when reparsing
Cristiana Voicu [Thu, 20 Jun 2013 14:21:15 +0000 (17:21 +0300)] 
bitbake: call the initConfiguration when reparsing

As it is implemented now, when parsing the configuration files is
needed, it also needs an initialization.
Also, implemented a function to create an extra configuration files
which can be used as postfile/prefiles when parsing.

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: Ensure configuration matches variable tracking state
Richard Purdie [Thu, 20 Jun 2013 13:07:18 +0000 (13:07 +0000)] 
cooker: Ensure configuration matches variable tracking state

When we reset, the current tracking value may change unexpectedly. This
patch ensures that the default value is preserved over a datastore reset.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild.py: Cleanup data store references
Richard Purdie [Thu, 20 Jun 2013 13:00:59 +0000 (13:00 +0000)] 
build.py: Cleanup data store references

Clean up a number of old style accesses to the datastore.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: remove the function for reparse because it does nothing
Cristiana Voicu [Wed, 19 Jun 2013 14:23:28 +0000 (17:23 +0300)] 
bitbake: remove the function for reparse because it does nothing

The command for reparse does nothing, so I have managed to remove it,
because it can be misleading. When a reparse is needed, it can be used
the parse function.

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoCorrect a typo
Peter Kjellerstedt [Thu, 20 Jun 2013 09:35:49 +0000 (11:35 +0200)] 
Correct a typo

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>