Age | Commit message (Collapse) | Author |
|
Trying to expand a variable which isn't a string doesn't make sense.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If a file no longer exists, drop it from the cache silently instead of
generating a traceback. This was visible in some cases when a recipe was
deleted when bitbake was resident in memory.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We've had a long-standing bug where a legitimate error reading a file (IOError
or OSError) is always suppressed as though it was a 'file not found' case. As
a concrete example, if you do a `chmod 000 conf/local.conf`, it'll silently
not parse local.conf, rather than erroring to let the user know about the
problem.
Fix this by handling the ENOENT case specifically.
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Rather than just use d.getVar(X), use the more explict d.getVar(X, False)
since at some point in the future, having the default of expansion would
be nice. This is the first step towards that.
This patch was mostly made using the command:
sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Memory resident bitbake has one current flaw, changes in the base configuration
are not noticed by bitbake. The parsing cache is also refreshed on each invocation
of bitbake (although the mtime cache is not cleared so its pointless).
This change adds in pyinotify support and adds two different watchers, one
for the base configuration and one for the parsed recipes.
Changes in the latter will trigger a reparse (and an update of the mtime cache).
The former will trigger a complete reload of the configuration.
Note that this code will also correctly handle creation of new configuration files
since the __depends and __base_depends variables already track these for cache
correctness purposes.
We could be a little more clever about parsing cache invalidation, right now we just
invalidate the whole thing and recheck. For now, its better than what we have and doesn't
seem to perform that badly though.
For education and QA purposes I can document a workflow that illustrates this:
$ source oe-init-build-env-memres
$ time bitbake bash
[base configuration is loaded, recipes are parsed, bash builds]
$ time bitbake bash
[command returns quickly since all caches are valid]
$ touch ../meta/classes/gettext.bbclass
$ time bitbake bash
[reparse is triggered, time is longer than above]
$ echo 'FOO = "1"' >> conf/local.conf
$ time bitbake bash
[reparse is triggered, but with a base configuration reload too]
As far as changes go, I like this one a lot, it makes memory resident bitbake
truly usable and may be the tweak we need to make it the default.
The new pyinotify dependency is covered in the previous commit.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In the depths of time we were rather confused about naming. bb files
are recipes, the event to skip parsing them should be SkipRecipe,
not SkipPackage. This changes bitbake to use the better name but
leaves the other around for now. We can therefore start removing
references to it from the metadata.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The file inheritance logging has been here since the dawn of time. It
duplicates output many times over and logs to debug level 2. When running
with the debug option, its understandable the user may want to see the
paths of files included in the build.
These changes remove pointless/duplicate output and print the
include paths clearly at debug level one in a form which
users should be able to more easily parse.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It doesn't really make sense to set PN from .conf files, for example.
More concretely, this avoids the config hash changing unnecessarily
within Hob due to PN effectively changing (since bblayers.conf is
parsed first and then .hob.conf).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently bitbake only adds files to its dependency list if they exist.
If you add 'include foo.inc' to your recipe and the file doesn't exist,
then later you add the file, the cache will not be invalidated.
This leads to another bug which is that if files don't exist and then
you add them and they should be found first due to BBPATH, again the
cache won't invalidate.
This patch adds in tracking of files we check for the existence of so
that if they are added later, the cache correctly invalidates. This
necessitated a new version of bb.utils.which which returns a list of
files tested for.
The patch also adds in checks for duplicate file includes and for now
prints a warning about this. That will likely become a fatal error at
some point since its never usually desired to include a file twice.
The same issue is also fixed for class inheritance. Now when a class
is added which would be found in the usual search path, it will cause
the cache to be invalidated.
Unfortunately this is old code in bitbake and the patch isn't the
neatest since we have to work within that framework.
[YOCTO #5611]
[YOCTO #4425]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* 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>
|
|
This code adds inclusion history to bitbake -e output, showing
which files were included, in what order. This doesn't completely
resolve timing questions, because it doesn't show you which lines
of a file were processed before or after a given include, but it
does let you figure out what the path was by which a particular
file ended up in your build at all.
How it works: data_smart acquires a .history member, which is an
IncludeHistory; this represents the inclusion of a file and all its
inclusions, recursively. It provides methods for including files,
for finishing inclusion (done as an __exit__), and for
dumping the whole tree.
The parser is modified to run includes inside a with() to push
and pop the include filename.
RP Modifications:
a) Split Include and Variable tracking
b) Replace deepcopy usage with dedicated copy function
c) Simplify some variable and usage
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The data returned by get_file_depends() may me used in contexts like
checksums where order is important. The current usage of sets means
that some of the checksums can change in circumstances they should not.
This patch changes to use lists, thereby removing the problem.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Added new variable BBINCLUDED indicating the file dependency
information. It exposes the internal variable '__base_depends' and
'__depends'.
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Ensure that a file and line number are reported for ParseError where
possible. This helps particularly in the case of inherit and require
which previously did not report either of these upon failure.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
(From Poky rev: affd0907253387cee0ba0c7e9f92bcc109895446)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* poky-sync:
build: kill unneeded environment setup bits
parse: save python functions into the metadata
Include exported variables in task process env
runqueue: start implementing quieterrors
Overhaul environment handling
runqueue: resurrect use of file objects for pipein/pipeout
runqueue: clean up message log levels
runqueue: use correct task ID when checking validity of setscene tasks
Add support for 'noexec' tasks
runqueue: implement cache checking from metadata
runqueue: pass task hash information to tasks
runqueue: avoid unnecessary delays
Implement task signatures
data: Add emit_func and generate_dependencies
codeparser: Implement persistent cache
data_smart: track variable references
codeparser: add module for parsing shell/python
runqueue: implement scenequeue
fetch: add SRC_URI checksum
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
Includes functionality to find out what changes between two different
signature data dumps.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
We use a custom Logger subclass for our loggers
This logger provides:
- 'debug' method which accepts a debug level
- 'plain' method which bypasses log formatting
- 'verbose' method which is more detail than info, but less than debug
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
to make updating depends easier/more intuitive/eventually faster
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <clarson@kergoth.com>
|
|
Do not attempt to open the file in the resolve_file method
(a lot like bb.which... maybe bb.which can be used). This way
we don't need to open/close a file which we have already parsed.
|
|
Evaluate the statements after having parsed one file. This is
referred to as "entwirren" and we can remove the direct evaluation
and postpone a bit, in the future we can use a cached copy instead
of parsing the original.
|
|
Signed-off-by: Chris Larson <clarson@mvista.com>
|
|
Signed-off-by: Chris Larson <clarson@mvista.com>
|
|
When parsing we will collect a number of statements
that can be evaluated...The plan is to be evaluate
things twice (old+new) and then compare the result,
it should be the same.
|
|
|
|
breakage (from poky)
|
|
BitBake trunk is now GPLv2 only, no mix of
MIT,FreeBSD License is left.
Update GPL headers to point to the correct
address of the FSF
Update the list of authors. Uli Luckas,
Seb Frankengul and Tim Amsell contributed to
the sourcecode as well
|
|
|
|
Bug 895. __depends is a single string with "filename@time" the
string gets splitted by ' ' as it is assumed that
"filename@time filename2@time2" is true. Basicly on PPC/Darwin
we have "PowerPC Macintosh.conf" splitting by space leads to the
error observed by koen.
Resolution:
As we use __depends only as a list, save it as a list. This
avoids the int->str->int, and split, append, join operations.
bitbake/lib/bb/cache.py:
__depends is now a list, change the version of the cache and
simplify the method.
|
|
parser: move import bb and import os out of the commands (import in a function that's called often has a performance penalty)
lib: increase revision
shell: add 'reparse' and 'fileReparse' commands, courtesy Justin Patrin
|
|
I wonder what would happen if I only commit after getting
enough donations for a file...
Currently it defaults to the python implementation
|
|
For now import bb.parse will function the way it used to work
|
|
understood by any handler, rather than quietly returning None
|
|
|