summaryrefslogtreecommitdiffstats
path: root/lib/bb
AgeCommit message (Collapse)Author
2011-05-27bitbake/runqueue.py: Ensure existing setscene stamp files are taken into accountRichard Purdie
JaMa reported issues where bitbake would rebuild things instead of using the existing built tasks. This was tracked to a case where: a) rm_work is uses b) A depends on B c) B has a version change (e.g. PR bump) and A *and* B would then rebuild. It turns out that rm_work was correctly turning stamp files into the correct _setscene varients but bitbake was then ignoring them during setscene processing. If the correct sstate checksumed files didn't exist, everything would seemingly rebuild. The fix is to check for existing *_setscene stamps and if present, honour them. If "basichash" is enabled, the hash is included with the stamps so everything should then function as intended. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27bitbake/utils.py: Add option to lockfiles to return immediately rather than waitRichard Purdie
There are usecases where we don't want to block waiting for a lockfile so enhance the lockfile handling functions to support this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27bitbake/cooker.py: Ensure BBFILES is processed in orderRichard Purdie
The files found by collect_bbfiles should be processed in order but due to being processed using python's set(), the order was not being preserved. Use a list instead as whilst the code is slightly more ugly, order is preserved. Addresses [YOCTO #1100] Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27bitbake/cooker.py: Fix -b option regexp handlingRichard Purdie
bitbake -b core-image was showing no matches when it should list all targets containing the fragment "core-image". This patch only calls os.path.abspath() on things that look like paths and passed the path around more consistently to various functions to get this use case working again. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27fetch2/git: enhance the unpack by using "git checkout"Yu Ke
current git fetcher unpack method only checkout index and working tree, but did not did not update the git branch in ref/heads, so user may not get right info in ${S} by using git. this patch enhance the unpack by using git checkout to fix this issue. Fix bug [YOCTO #1089] Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27fetch2/git: add document for git fetcher supported optionsYu Ke
Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27fetch2/git: unify the nocheckout option formatYu Ke
make the nocheckout option format to be: default is "0", use nocheckou=1 to set this option with this patch, the format will be consistant with other bitbake options like rebaseable Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27fetch2/git: change default protocol from rsync to gitYu Ke
Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27cooker.py: Don't show spurious warnings for collections of .bbappend filesRichard Purdie
Seeing warnings like: WARNING: No bb files matched BBFILE_PATTERN_yocto '^/xxx/meta-yocto/' are not encouraging to users and we shouldn't show these if we found .bbappend files (but no .bb files). This change stops these warnings from appearing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-25build/siggen: Ensure a task signature file is generated for each task that ↵Richard Purdie
is executed Tracing down signature changes and dependencies is hard unless the complete task chain can be evaultated. Since we have the data available at task exeuction time, writing it to disk makes sense. This change is suboptimal internal knowledge stamp_internal() has leaks into make_stamp() and the concepts used by this code need revisiting but the change brings enough usability benefit to warrant its inclusion despite that. Addresses issue [YOCTO #1074] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-17git fetcher: add support for rebaseable git repoYu Ke
Some upstream git repo may rebase in the future, which means current revision may disappear from the upstream repo after the rebase. current git fetcher can not handle this case, because the git mirror tar ball is per repo, and may also change in the rebase and lost the current revision info. To fix this issue, this patch - add rebaseable tag in the SRC_URI - for rebaseable repo, make git mirror tar ball per revision, in this case, even upstream rebase, the git mirror still has the current revision info. - for rebaseable repo, generate mirror tar ball by default, since the repo may change in the future. Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-05-16bitbake/ui: Fix Gtk+ GUI's after recent cache changesJoshua Lock
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-05-16Shift exception formatting into the UIChris Larson
Now we use bb.exceptions to pass pickleable traceback entries to the UI, and the UI is free to do whatever it wants to do with this information. By default, the log formatter for the UIs formats it with bb.exceptions. This also means that all exceptions should now show 3 lines of context and limit to 5 entries. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-16cooker: don't show a traceback for ParseErrorChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-16cooker: don't show a useless traceback for SyntaxErrorChris Larson
Note: we rely on the fact that better_compile has already output information about the exception, so don't do it ourselves. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-16cooker: use logger.exception for config file parse errorsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-16cooker: pass traceback back from parsing threadChris Larson
Uses bb.exceptions to get a traceback back from the parsing thread to the main thread, where it is then formatted. Also enables 3 lines of context for the formatted traceback, and limits the number of entries displayed to 5. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-16cooker: show a useful message for ParsingFailureChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-16bb.exceptions: don't show a repr of 'self'Chris Larson
Rather than treating self like an ordinary argument, showing a repr of its value in the function spec when formatting the traceback entry, now we show the class name for the method as a part of the function name. Example: Old: bar(self=<some repr of Fooclass>, f=5) New: Fooclass.bar(f=5) Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-16codeparser.py: fix syntax error in exception handlingOtavio Salvador
Commit 036cf3cd11b3a6836b77f5ffa760ceee6b71b1ef missed the needed brackets to handle more then a type of exception. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2011-05-16codeparser.py: Ignore incomplete cache filesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-16bb.exceptions: handle tb entries without contextChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-16bb.exceptions: add to_string convenience functionChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-16bb.exceptions: add code to create pickleable traceback entriesChris Larson
This lets you get as much useful information as possible from traceback entries while staying pickleable. In addition, it has improved traceback formatting. It shows the values of the arguments for the functions, lines of context from the file for the code, and has an optional formatter to do things like syntax highlighting for the code lines. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-16bb.namedtuple_with_abc: add useful util from activestateChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-13codeparser.py: fix syntax error in exception handlingOtavio Salvador
Commit 036cf3cd11b3a6836b77f5ffa760ceee6b71b1ef missed the needed brackets to handle more then a type of exception. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2011-05-12codeparser.py: Ignore incomplete cache filesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06bitbake/utils.py: Only try and add read access to a file if we don't have itRichard Purdie
A file we're copying might be on a readonly filesystem so if we can already read it, don't try and add read permission. Fixes BUGID #771 in Yocto. (From Poky rev: 9166b9e32fd6f618f9597b07d88cef09a88916a1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06bitbake/fetch2/local: Fix inverted update required logicRichard Purdie
(From Poky rev: 4f28cd2d1854df8e6f56544fe509fb2e3ddce9aa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06bitbake/fetch2: Allow local file:// urls to be found on mirrorsRichard Purdie
With the current implementation, file:// urls as used by sstate don't access the mirror code, breaking sstate mirror support. This change enables the usual mirror handling. To do this, we remove the localfile special case, using the basename paramemter instead. We also ensure the downloads directory is checked for files. The drawback of this change is that file urls containing "*" globing require special casing in the core. (From Poky rev: a778fb311540580476976e43f9c0576284f8dc38) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06bitbake/fetch2: Fix the problems introduced by the git fetcher AUTOREV fixRichard Purdie
The ordering constrains on the urldata_init functions are not straight forward. To avoid further problems, create a helper function to setup the source revisions which the init functions can all at the appropriate point. (From Poky rev: c4371138f7444ecaa1fdd2b1ee4949fbc819f886) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06bitbake/fetch2/git: Fix a bug where AUTOREV and the git fetcher interact badlyRichard Purdie
Fix a bug where ud.branches were being referenced before it was set by the git fetcher when using AUTOREV. To do this some ordering needed to be changed. This fixes errors like: ERROR: Error parsing /recipes-kernel/linux/rt-tests_git.bb: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception AttributeError: 'FetchData' object has no attribute 'branches' (From Poky rev: 2d2d07275c8a2d652a221c1cd74d28c2f6f226d5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06build.py: Fix ordering bug introduced in ↵Richard Purdie
7a29ab534388c0095f7f826b16c5cff343927d10 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06git fetcher: make tag back to work, fix Yocto bug 972Yu Ke
In current git fetcher, tag does not work due to commit http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=5920e85c561624e657c126df58f5c378a8950bbc. Tag is not in sha256 form, so it will be treated invalid, and silently replaced by latest revision. To fix it, this patch treat tag name as branches name, thus it will be handled correctly later. Thanks Richard for reviewing and proposing the better approach. Fix [YOCTO #972] CC: Richard Purdie <richard.purdie@linuxfoundation.org> (From Poky rev: a2030c8d1a58c79428cba80158982aea4d2d9f6d) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06bitbake/codeparser: Correctly handle a missing/empty cache fileRichard Purdie
(From Poky rev: 72875493b8bbb5d6793380ee71c6bca4f438ca04) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06bitbake/cache.py: Ensure skipped recipes make it into the cache to avoid ↵Richard Purdie
reparsing (From Poky rev: 001a555c2f755d4f8a69b113656d9307ca7ee597) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06bitbake/cooker/codeparser: Ensure the code parser cache is saved for each ↵Richard Purdie
parsing process Before this change, the codeparser cache was only being saved for the main server process. This is suboptimal as it leaves code being re-evaluated at task execution time and increases parse time. We use the multiprocess Finalize() functionality to ensure each process saves out its cache. We need to update the cache save function to be multiprocess friendly with locking. (From Poky rev: c8928e93dd8a08d6768623f6491c9ba31d0aa06f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06bitbake/ast.py: Only run finalise() for the specified variantRichard Purdie
Allows the heavy finalise function to only be run for the case we're interested in when running tasks, saving some processing time. (From Poky rev: 9211fd9c375489c73924fd43f1f8a0da2c4290bb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-08build: run fakeroot if FAKEROOT is setChris Larson
FAKEROOT contains the fakeroot command to be run. This should not be set for those using pseudo + FAKEROOTENV, but should be set for people like upstream OE, and its value should be 'fakeroot' for them, for compatibility with the old mechanisms. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-04-06fetch.git: fix a remnant wrt persist + keyerrorChristopher Larson
Signed-off-by: Christopher Larson <kergoth@gmail.com>
2011-04-05persist_data: implement comparison, same as dictChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-04-05persist_data: make SQLTable a context managerChris Larson
This can be used for more control over the underlying transactions. Unlike the context manager of, say, a file object, we can still use the object even after the end of a given with block, as the context manager exit only ensures we've committed to the database, not that we have closed the database. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-04-05persist_data: don't allow non-string keys/valuesChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-04-05persist_data: add has_keyChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-04-05persist_data: raise KeyError on missing elementsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-04-04cooker: fix -b with BBCLASSEXTENDChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-04-04event: improve output for syntax errors in handlersChris Larson
Note: this includes IndentationError, which is a subclass of SyntaxError. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-04-04event: improve output when eventhandler exec failsChris Larson
- Name the event handler by its actual name, so the traceback shows it rather than 'tmpHandler'. - Rather than immediately aborting when encountering an event handler error, display an error message and try to continue. - Show a traceback for ordinary exceptions, skipping the first entry in the traceback, so it only shows the useful information. - Show an error, but no traceback, for SystemExit with a code other than 0. - For for SystemExit with a code of 0, simply continue silently. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-04-04event: register event handler functions, not code objectsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-04-01build.py: Merge fakeroot changes from PokyMark Hatle
Changes imported from poky repository, master branch as of commit: bcc817ee058bbab91d6e88a3e1e867a4ff09aeca In Poky fakeroot processing is handled exclusively by FAKEROOTENV. The fakeroot binary itself is never invoked directly. (This is due to Poky using pseudo, a fakeroot replacement that is more efficiently run by setting environment variables.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Chris Larson <chris_larson@mentor.com>