Chris Larson [Thu, 16 Jul 2009 17:49:49 +0000 (10:49 -0700)]
cache: only invalidate for non-existent depends if they used to exist.
Previously, if a file listed in the cached __depends did not exist, it would
always invalidate the cache. Now it only does so if the cached version
existed, and the current does not. In this way, we can support storing
entries in __depends for files which may or may not exist, and ensure that
creating such a file results in cache invalidation. Specifically, this is for
the amend.inc implementation.
Chris Larson [Thu, 10 Sep 2009 18:49:50 +0000 (11:49 -0700)]
Only print python exception tracebacks if debugging is enabled.
Uses sys.excepthook to replace the toplevel exception handler with a version
that obeys the debug level of the 'default' messaging domain. A non-zero
value there will result in displaying the full traceback.
Chris Larson [Thu, 27 Aug 2009 19:20:10 +0000 (12:20 -0700)]
daemonize: Kill the forcing of umask to 0 in our children.
It forces the daemon umask to the module level UMASK variable, which defaults
to 0, so the bitbake daemons end up with a umask of 0. Fixed by setting UMASK
to None and making it only run umask when it's not None, so our children will
inherit the parent umask
Chris Larson [Thu, 23 Jul 2009 17:44:55 +0000 (10:44 -0700)]
Update the minimal base.bbclass & bitbake.conf.
I could argue in favor of the removal of these entirely, as their usefulness
is limited, and I've yet to see anyone use bitbake for anything without using
OE as a base. It's something to consider, anyway, but this at least makes
them parse without complaining.
At present there is a bottleneck in runqueue in the
get_recursive_tdepends() function which bothers me as we never used to
have it. It appeared when we fixed some correctness issues with the
dependency tree and the code in this area has grown adhoc for too long.
As an example the above function was getting called 500,000 times in my
main test case of building an image. Its particularly problematic in
builds with many recursive dependencies such as 'bitbake world'.
This commit rewrites the problematic function entirely with the
following benefits:
* Replaces the most illegible code in that function with code thats
easier to understand
* Builds the dependency tree per filename, not per task since we don't
need it per task which is a performance win
* Improves the documentation in places
* Much faster execution
* Reuses the main dependency tree data, doesn't make its own.
The code functions very differently to the original. Previously the
recursive dependency tree and the main dependency tree were separate. In
this implementation we use the main tree to build the recursive tree
after the main tree has been completed, then inject the dependencies.
Compared with the original this actually inserts small numbers (4 in my
test cases) of additional dependencies into the task graph such as
image_recipe:do_rootfs -> image_recipe:do_package_write_ipk which is
arguably an bug in the existing implementation. I've checked into this,
understand why its happening and believe none of the additional
dependencies should cause any complications.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Richard Purdie [Thu, 23 Jul 2009 16:53:32 +0000 (17:53 +0100)]
cooker.py: Improve server idle handling (from Poky)
This patch:
* Uses the xmlrpc timeout controls added in python 2.6 removing the need to
hack the class instead. The hacking didn't work for 2.6.
* Converts the parsing function to parse a file per call to the function
* Allows checking for xmlrpc commands between parsing files allowing the user
to interrupt parsing.
* Starts to teach the command queue about command properties such as whether
they require the cache.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Chris Larson [Fri, 17 Jul 2009 22:26:45 +0000 (15:26 -0700)]
taskdata: fix a possible infinite loop when multiple eligible providers aren't buildable
The code which removes providers which aren't buildable from the eligible list
modifies the list while iterating it, resulting in skipping some entries. If
the list contained two failed providers in sequence, it left the second behind
in the eligible list.
Fixed by replacing the block with a list comprehension that constructs a new
eligible list without the failed entries.
Richard Purdie [Fri, 19 Jun 2009 10:30:15 +0000 (10:30 +0000)]
Merge the BBCLASSEXTEND code from Poky. This allows once recipe to provide mutliple targets (e.g. -native and -sdk) and has been discussed on the OE mailing list
Richard Purdie [Mon, 11 May 2009 21:49:13 +0000 (21:49 +0000)]
data.py: Make sure allowed variables inherited from the environment are exported again (from Poky)
shell.py: When running a stage task in bbshell, run populate_staging, not the stage task (from Poky)
Is anyone still using svk? I don't want to mess with this code
when it might work (due a global) but I might break it... my guess
is that is supposed to be ud.date.
Chris Larson [Fri, 17 Apr 2009 23:14:05 +0000 (23:14 +0000)]
bb.fetch.go: iterate over SRC_URI, not urldata.
urldata can contain urls other than just what's in SRC_URI. The urls of
mirrors, premirrors, stashes, etc can end up in there as well, and we don't
want bb.fetch.go to be fetching those things directly.
Chris Larson [Wed, 8 Apr 2009 17:35:38 +0000 (17:35 +0000)]
Make the bbpath change for includes temporary rather than permanent.
We currently modify BBPATH so that an include/require looks in the current
working directory before it looks elsewhere. Modifying it permanently
doesn't gain anything, just polluting it with locations that don't need to
stay there.
Richard Purdie [Sat, 6 Dec 2008 12:37:35 +0000 (12:37 +0000)]
fetch/__init__.py: export more variables to the fetcher commands to allow ssh checkouts and checkouts through proxies to work better. Also allow user and pswd options in urls globally and improve proxy handling when using mirrors (from Poky)
Richard Purdie [Sat, 6 Dec 2008 11:50:02 +0000 (11:50 +0000)]
Add tryaltconfigs option to control whether bitbake trys using alternative providers to fulfil failed dependencies. It defaults to off, changing the default since this behaviour confuses many users and isn't often useful (from Poky).
Svn tries to be smart about revisions. So, when you check out an older revision of a file it goes to the latest revision (HEAD) and tries to go back to the old file. In this case it was impossible, since the whole thing was moved outside of svn's scope, so svn can't find the file in the HEAD revision.
Svn treats this situation as an exception and provides the "peg-revision"-syntax for that. So where you would normally do
svn co -r1337 http://url/to/somewhere/module module
you would now have to do
svn co -r1337 http://url/to/somewhere/module@1337 module,
the @1337 telling svn to go start looking at revision 1337 instead of HEAD.
[fetch] Always add PN to the _revision_key we get from the fetcher
This is extending r1101 to always append something to the
_revision_key of the fetcher. alphaone spotted that it was missing
for the latest_revision case.
[git] Do not run git-rev-list everytime to increase the speed
Cache the result of git-rev-list for a repo and hash. This
speeds up do_package of the linux kernel tremendously.
[git] Optionally use git-rev-list to get a sortable revision
With setting BB_GIT_CLONE_FOR_SRCREV="1" you can get a sensible
and global (per repository with only fast forwards) revision. The downsides
are you will have to have a repository at parse time which means you will
git-clone certain trees you don't even use. This is also the reason why
this is optional. This also means you might need to download your git
checkouts to get this feature working.
[git] Disable downloading of checkouts.
Instead of calling try_mirror check if we have a local checkout
already. This code fetched a new checkout even if you had a local
repository which is rather bad if you don't have internet but a full
repository. And the overhead of a full checkout vs. repository is not
too big anyway.
Make the revision key unique by adding the PN
If two different recipes (e.g. linux-openmoko and linux-openmoko-devel)
use the same git repository but with different SRCREVs the count just
incremented on each parsing. By adding PN to the key we keep the count on
a per package level. Spotted by Graeme.
Richard Purdie [Tue, 30 Sep 2008 21:08:24 +0000 (21:08 +0000)]
bin/bitbake: Add better environmental variable handling. By default it will now only pass certain whitelisted variables into the data store. If BB_PRESERVE_ENV is set bitbake will use all variable from the environment. If BB_ENV_WHITELIST is set, that whitelist will be used instead of the internal bitbake one. Alternatively, BB_ENV_EXTRAWHITE can be used to extend the internal whitelist.
Richard Purdie [Tue, 30 Sep 2008 20:28:11 +0000 (20:28 +0000)]
cooker.py: Rename __depends to __base_depends after configuration parsing so we don't recheck the validity of the config files time after time. Also bump the cache revision to match the format change (from poky)