Commit Graph

1976 Commits

Author SHA1 Message Date
Richard Purdie ce682323a9 bitbake: ast: Extract text variable in PythonMethodNode
(Bitbake rev: 2e98f740b4a57a3467b1a00b1ebc1aaee33a8ff0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie 9e8ba3036d bitbake: ast: Rename PythonMethodNode define variable to modulename
It was hard for me to understand what the define variable was, modulename
is hopefully a bit better.

(Bitbake rev: 79f9f46319de85f85613ebe248c327f5852225ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie c8cce4e0d6 bitbake: methodpool: Clean up the parsed module list handling to be slightly less insane
This removes some dubious functions and replaces them with a simpler, cleaner
API which better describes what the code is doing. Unused code/variables are
removed and comments tweaked.

(Bitbake rev: f1e943aebfb84e98253f3f21646d6765c4fa1d66)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie 43cbd5afce bitbake: methodpool: Remove unused check_insert_method function
(Bitbake rev: 4664333e55ffc9d618f2c2f074200923209fd6c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:43 +01:00
Richard Purdie ae71aa0fbb bitbake: cooker: Add explict handling of BBHandledException for parsing failures
This removes some unnecessary tracebacks

(Bitbake rev: db0ff7b4d47fce8322dd2350a2b1a6f60ef61d25)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:43 +01:00
Richard Purdie 4f3d48653a bitbake: cooker: Ensure parsing failures stop the build
Currently parsing failures still allow bitbake to continue on and try
and execute a build. This is clearly a bad idea and this patch adds in
more correct error handling and stops the build.

The use of sys.exit is nasty but this patches other usage in this function
so is at least consisent and its better than the current situation of
trying to execure a half parsed set of recipes. There are probably better
ways this could be improved to use to stop the build.

(Bitbake rev: 22756e9c0f1da33ba2c6e881b214577a610b7986)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:43 +01:00
Richard Purdie 999ee044b9 bitbake: utils.py: Once we've printed errors messages, suppress the backtrace
Adding a generic backtrace to better_compile and better_exec is pointless,
therefore reraise the exception as a bb.BBHandledException so the
generic code doesn't confuse the user even more.

(Bitbake rev: b3d97130e1e70fe969399277dcd7cccd888103d6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:42 +01:00
Richard Purdie 64c002875f bitbake: utils.py: Try harder to extract good traceback information by querying the datastore
Currently as soon as execution passes outside the code fragment being
executed by better_exec, we don't get any good traceback information,
just a likely obscure reference to some function name which may
or may not be identifiable.

This patch adds code to query the datastore if present, allowing a more
meaningful back trace to be displayed in many cases.

[YOCTO #2981]

(Bitbake rev: 0edf8431f9ff52581afe0d3ef525c59909af02ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:42 +01:00
Paul Eggleton fddc16989d bitbake: cooker: fix traceback when using -b with skipped recipe
If a recipe is skipped during parsing for whatever reason, check and
report this as an error rather than trying to use the data that is sent
back and failing.

Fixes [YOCTO #2976].

(Bitbake rev: a324df40243fa55ccc89fd5970d46f25330d0a0d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:42 +01:00
Richard Purdie 21773a997a bitbake: event/ast: Use better_exec instead of simple_exec
This improves the stacktraces dumped by bitbake when for example anonymous
python functions fail.

Also default to passing code strings to better_exec to match the behaviour of
simple_exec to aid the transition.

(Bitbake rev: 7e8205929ae953731a6854ea80b197847cff5771)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:57 +01:00
Konrad Scherer 1a7069e97b bitbake: ui: Improve error message if bitbake cannot import python curses module
On some SuSE systems, the curses python module is not installed by default.
Instead of a python failure, we want a nicer error message.

(On SuSE systems the package is typically python-curses.)

(Bitbake rev: 65a5845ac942d0aa6838c295e41b656f9d2a98bb)

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>

Reword commit message, rebase to latest bitbake.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:57 +01:00
Paul Eggleton 1426e14747 bitbake: bitbake-layers: use parsable title for show-appends
Print title text surrounded by === as we do with other subcommands so
that you can filter it out in scripts. (You will also want to filter out
lines starting with "WARNING:" if you just want the list).

(Bitbake rev: ba15ba16a5d863886bcfd5b3f0bdfff2a6de11a0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:56 +01:00
Paul Eggleton 5d09fb0346 bitbake: bitbake-layers: avoid full parse for show-layers subcommand
We don't actually need to parse all recipes just to show the configured
layers, so just parse the configuration instead.

(Bitbake rev: 406477cbae066b6379873e266cb79801e545a61c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:56 +01:00
Paul Eggleton a46fac74c3 bitbake: bitbake/cooker: minor refactor of parseConfiguration()
All calls to parseConfiguration set self.status and call
self.handleCollections() afterwards, so just do this inside
parseConfiguration() itself.

(Bitbake rev: 3c2322d8a6ce15e20adb07a61aa321d884a9bcca)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:56 +01:00
Ross Burton 980d658f3f bitbake: data_smart: skip all interal (underscored) flags in getVarFlags
(Bitbake rev: 9f631e29a2eebb96a8291839dd8b39aa9126a10e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:56 +01:00
Ross Burton 49bc007c80 bitbake: data-smart: rename the 'content' internal variable to '_content'
(Bitbake rev: 684cf09aed09ec82c8afb99895f92d73cd0519df)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:55 +01:00
Cristian Iorga 164083d31f bitbake: Hob wizard-like reorganization
Hob is now more context-sensitive regarding
user changes/options. Also, the workflow have been
streamlined and resembles more of a wizard.
Beautified some hardcoded values.
Fixed typo.
New streamlined Image Configuration page.
Build and/or Edit image buttons presence
is context sensitive.
Recipes and packages tabs selected automatically
based on custom image or pre-defined target image
(included or all).
Context sensitive Back button.

Fixes [YOCTO 2165]

(Bitbake rev: b48cd7dcf57b1abc8c5b46ced11d4f57bf06e557)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:55 +01:00
Paul Eggleton 2a6818eea1 bitbake: bitbake: hob: create console log directory before writing
The default value of BB_CONSOLELOG in OE-Core now points to a directory
that might not exist prior to the first build, so ensure it is created
first.

(Bitbake rev: 660821769b9dfb89086291ffc835e9b5444509be)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:55 +01:00
Richard Purdie 96ece9ad1a bitbake: build.py: Correct package to recipe in TaskBase events to use consistent terminology
(Bitbake rev: e5045429bce15b66c4355be214db3982ac7761f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-18 16:21:45 +01:00
Richard Purdie a86bd42264 bitbake: fetch2/git: Work around git confusion between foo.git and foo repositories
If you have foo and foo.git in GITDIR, the two can end up being confused
by git with some horrible union of the two being cloned. This adds
a workaround to avoid this happening until git 1.7.9.2 onwards is
common enough for this to be removed. We use a symlink to hide
the directories we don't want git to know about.

(Bitbake rev: bbf1f6fe594c721a296ca09ee7c583d4a205c591)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-18 16:21:44 +01:00
Richard Purdie 3c0451ec95 bitbake: really remove knotty2
(Bitbake rev: 587ce3bd76b5338c538dc9a5b9f06d42cb5ae3eb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 15:25:14 +01:00
Richard Purdie e781fb6250 bitbake: bin/bitbake: Remove knotty2 from the list of valid interfaces
(Bitbake rev: e0f91faf195be63803d39fb42fcd115ad558c79f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 11:33:20 +01:00
Andrei Gherzan af847d3637 bitbake: bitbake: build.py: Add stampdir argument to cached_mtime_noerror
After commit 2718537b4b (bitbake:
build.py: Only execute mkdirhier if stampdir doesn't exist) build
failes as cached_mtime_noerror needs an argument - stamp dir. This
argument was forgotten.

(Bitbake rev: e69103c4f7e45c24f1fbe9df0383f39e877abcb4)

Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 12:27:41 +01:00
Richard Purdie 1fa112b632 bitbake: knotty: Fold knotty2 into knotty and make it the default
There is no good reason knotty2 shouldn't be the default now. If you need
the old behaviour, just pipe the output through cat as non-interactive
terminals get the old output.

(Bitbake rev: b97d50618b2187bcfd7d25f64d1444482ca62ef7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:03 +01:00
Richard Purdie c49a2529bf bitbake: knotty2: Handle long lines of text and terminal window size changes
Long lines of text which wrapped on the terminal corrupted the output shown by
knotty2. This patch catches such errors by becomming aware of the terminal size.

It also catches terminal window size change events and adapting to those
changes using a signal handler.

Based on a patch from Jason Wessel with several tweaks and enhancements
such as use of chained signal handlers and covering all output messages.

(Bitbake rev: 9afc9e4d14abec5ac326851d4bb689c1e8d45a43)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:03 +01:00
Richard Purdie 2718537b4b bitbake: build.py: Only execute mkdirhier if stampdir doesn't exist
I noticed this was showing up on profile logs as a sigificant time user
in "bitbake bash" when bash was already built. It reduces the time from
5.2 to 4.5 seconds in my test environment.

We make use of the parser's mtime cache as once a directory exists,
we can assume it continues to exist and this avoids syscalls.

(Bitbake rev: 769b694eeb617bb793bd79d0d7b29c43d2646ece)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:02 +01:00
Richard Purdie e2d023ff5f bitbake: bb/ui/uihelper.py: Ensure task current and total numbers are updated for setscene events too
This avoids task (0 of 0) type messages being displayed during setscene by knotty2.

(Bitbake rev: 53efa01720a61da2cb344cbb7e977baa28deba3b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:02 +01:00
Richard Purdie 4c4f714612 bitbake: knotty: Chain the WINCH signal handler in progressbar so any other handler is preserved and called
(Bitbake rev: 7753e075dbeee471b9ceb34f1e3165aa656932ed)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:02 +01:00
Richard Purdie 9df0a20d95 bitbake: data_smart: Fix unanchored regexp causing strange parsing issue
If this regular expression is unanchored, it would accept strings like:

do_install_append1
do_install_appendsomelongstring

and treat them like they were do_install_append. Clearly this isn't desirable.
Only one instance of this type of issue was found in OE-Core and has been fixed
so correcting the regexp should be safe to do.

(Bitbake rev: 23bd5300b4a99218a15f4f6b0ab4091d63a602a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-03 10:25:10 +01:00
Richard Purdie 71cc9de357 bitbake: Fix script location after mishandled merge
(Bitbake rev: 0f3293c2196a30bc52bf1eebfae87d8477880572)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-03 09:04:22 +01:00
Martin Jansa cecf2b48be bitbake: cooker: fix OVERRIDES in BB_SIGNATURE_HANDLER (to override value from DISTRO.conf from local.conf)
We really need to pass the finalised data store into the parser init function
(and hence the siggen init function). This ensures any value changes get
passed into the correct code.

(Bitbake rev: 19efc6081c15a59bb8f5aaf8478650a2732cafe8)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:04:27 +01:00
Richard Purdie 6ffb679c07 bitbake: fetch2/local: Add search paths to the debug log to improve log usefullness
(Bitbake rev: 2054c7d99933c1523d4b5c7f65d37c69b8472e47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:04:27 +01:00
Richard Purdie 43a25fff55 bitbake: fetch2/local.py: Provide better debug output when fetch of a local file fails
When a fetch failure occurs for a local file, this patch ensures we print the
locations searched making it easier for the user to debug the problem.

(Bitbake rev: a461adbc5f09b41c771a7603370f6f2d1299ae8e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:04:27 +01:00
Richard Purdie 67bfb37475 bitbake: runqueue.py: Clean up runqueue exception catching in the normal task failure case
(Bitbake rev: a0bc58031d4eb31f8587171e870ecad059af5098)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:01:35 +01:00
Robert Yang 9461854a3c bitbake: contrib/dump_cache.py: dump recipe -> packages mapping from bb_cache.dat
Add the dump_cache.py to dump the "recipe -> packages" mapping for
target recipes form bb_cache.dat:

* Usage:
  dump_cache.py bb_cache.dat

* The format is:
    recipe_path pn pv packages
  For example:
    /path/to/gzip_1.5.bb gzip 1.5 gzip-dbg gzip-staticdev gzip-dev gzip-doc gzip-locale gzip

* Only save the mapping for the target recipe

* We can extend this to dump other informations when needed.

* Put this script to bitbake/contrib/ (not to oe-core) is because it
  needs the bb.cache.

[YOCTO #2741]

(Bitbake rev: 75a7caf6f2d9f4399c95b9249db1b3bc5a48dc61)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:07:21 +01:00
Paul Eggleton 94f57a169e bitbake: bitbake-layers: fix help for show-overlayed to match behaviour
show-overlayed actually lists the same recipe in multiple layers
regardless of priority, so change the help description to match.

(Bitbake rev: 17217ff707e41780cb473b9cdd2621dd18b982c2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Liming An 8a3ae43815 bitbake: Hob: change the Build failure scenario as ui design
As ui design 'build-fail-spec.pdf' to change the GUI

[YOCTO #2183]

(Bitbake rev: f9b81e44b2e71b4de6729bd2c69b25fd619b5fed)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Liming An 94e2a104ec bitbake: Hob: log for Hob and allow users to show logs after successful build
If users build images in Hob, record logs and allow users to retrieve the lo
after successful build.

The logs are generated if and only if:
      - users do "just bake"
      - users do "build image" after "build packages"
      - users do "build packages" only

[YOCTO #1991]

(Bitbake rev: 291289787bb042b99f0599babc2d67c220aadb87)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Martin Jansa 5d952ba4a0 bitbake: fetch2: print checksums when they are different then expected
* in form which can be copied into a recipe without modification
* like oe-classic did since:
  http://git.openembedded.org/openembedded/commit/?id=68abc465559a68e9201c9525be3c4acc6297eaed
* it shows them in right form when they are missing completely, but in
  more verbose form when different
* it needs to print that only when checksums were requested, e.g.
  fetching from sstate mirror sets both md5mismatch and sha256mismatch,
  but your checksums shouldn't be shown

(Bitbake rev: 9eb34fc866775fd8310759a0111f232a9dc98981)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Christopher Larson 420891731f bitbake: fetch2: handle broken symlinks in local mirror handling
If a file:// mirror is being used, the fetcher will create a symlink to the
local file. However, if the local file gets removed, that link will be dead,
and os.path.exists() returns False in that case, so it tries and fails to
recreate the link. Now we unlink such a dead link if it exists.

(Bitbake rev: 229ed3857e826e3e215e843cb51f729c1e13ed37)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Martin Jansa f1417a1349 bitbake: knotty: ensure that directory for BB_CONSOLELOG exists before using it
(Bitbake rev: 1e06d8012868ba5a31503dc99cbf18570be629d9)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Mark Hatle 9fb5c34750 bitbake: fetch2/__init__.py: Add NoChecksumError exception
Without the new exception, when the system is configured to use premirrors,
but not allow network access (via BB_NO_NETWORK), when a recipe was lacking a
checksum the wrong error message(s) were being generated.

Instead of complaining about trying to perform network access, if the system
was able to find the item in the premirror, it should inform the user of the
lack of checksums, and the two SRC_URI fields they should use to update their
recipe.

(Bitbake rev: cb10e9c03a3f96d94e27e18330009616dde5e2b3)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:05 +01:00
Kang Kai 6a293985b2 bitbake: hob: deal event DiskFull
Part of [Yocto #2168]

When bitbake runqueue is teminated by disk monitor, it will send event
DiskFull. Update to handle it.

(Bitbake rev: a691de10d8b8de552628b277e78d47c607ee3a46)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 15:28:40 +01:00
Kang Kai b2a959a0ce bitbake: monitordisk: fire event DISKFULL when terminate build
Part of [Yocto #2168]

Add a event DiskFull to descript the termination by disk monitor.

Update check() to fire the event DiskFull when terminates the build.
This could help UIs to deal this scenario and show more information to
end user.

(Bitbake rev: 0a0fca3d94a1db6458ae21501a66461a334410ed)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 15:28:39 +01:00
Richard Purdie 8febf64b1d bitbake: fetch/local: Allow preservation of path components in relative file:// urls
This enhances the fetcher to allow preservation of the path component in urls
like: file://xxx/yyy/somefile.patch.

(Bitbake rev: e49a656a499355a5c6e7eb00bf5b8f1795e8dddb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:22 +01:00
Richard Purdie c74f3d44c6 bitbake: runqueue.py: Wipe out the stamp cache between setscene and main task execution
The stamp files can change during setscene and the cache should be cleared to
account for this.

(Bitbake rev: 5ec12f586a50fce675b268965b3dc487aaa96c43)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:22 +01:00
Richard Purdie 0984853ced bitbake: runqueue.py: Allow the setsceneverify function to have a list of tasks that are invalid and need to run
There was some odd behaviour if some task was run from setcene whilst there were
existing valid stamps for a depepdency. For example, do_populate_sysroot might
be installed at setscene time but if there were other tasks not installed from
setscene such as do_populate_lic which depend on do_configure, the setsceneverify
function would think that do_configure needed to be rerun and would hence void the
do_populate_sysroot and force that to rerun too.

The setsceneverify function needs to know which tasks are going to be rerun, not just
what the overall task list is and what setscene functions have run. This patch adds
that information and maintains backwards compatibility in a slightly ugly but effective
way. The metadata needs updating to take advantage of this change.

(Bitbake rev: 1423aafff97f17169e95ec3ba973eb002ff98c1c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:22 +01:00
Richard Purdie b22592af81 bitbake: runqueue.py: Ensure one setscene function doesn't mask out another which needs to run
The scenequeue code could result in one setscene function masking out another
which had been marked as notcovered. This change ensures the notcovered list
is taken into account when deciding which tasks need to be run, ensuring
that tasks that should be run do get run.

(Bitbake rev: 95b31127d8ba12ccb061d67481ece134c18c39f2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Richard Purdie 58f0d04f78 bitbake: runqueue.py: Optimise the hashvalidate call to only process tasks we may actually want
Currently we call the hashvalidate for anything without a valid setscene stamp.
This improves the code to account for existing stamp files so that we only process
setscene hashes for things we might actually end up using. This avoids hash processing
and makes things slightly more efficient and the logs less confusing.

(Bitbake rev: 2e71a65bd910e8be894b8284eb0a50de7270c081)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Richard Purdie dfdb2eb33e bitbake: runqueue.py: Gracefully exit if an exception occurs in the runqueue execution code
There was a bug where an exception in the runqueue code would cause an infinite loop
of debug messages. The exception would get reported but would loop since runqueue was
still registered as an idle handler.

This patch adds an exception handler to ensure in the case of errors, the system
more gracefully shuts down and doesn't loop.

(Bitbake rev: 99467c7e387f6e71358b40b8afae450d72cd68e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Richard Purdie 46d8d04d51 bitbake: runqueue.py: Fix a stamp comparision bug
We check the stamp cache before comparing t2 and t3 which means that we can miss
a level in the stamp file chains. The result of this is that a stamp can be accepted
as valid when in fact it isn't. Some weird behaviour alerted me to this in a local
build.

This patch also fixes to only uses the cache in recurse mode, there was a corner
case where stamps not in recurse mode could get added to the cache which could cause
an issue potentially.

(Bitbake rev: 7a5f776d325c0e37f58003424beda7cae2695325)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Nitin A Kamble 444ad513c0 bitbake: bitbake wget fetcher: add parameter: downloadfilename
this allows wget fetcher to store the downloaded file in a specified custom filename in ${DL_DIR}

Exmaple:
SRC_URI = "https://edc.intel.com/Download.aspx?id=6190;downloadfilename=LIN_IEMGD_1_14_GOLD_2443.tgz"

This fixes bug:
[YOCTO #2570]

(Bitbake rev: ceb5871007f221c4d86a7bee421d4dd8d9100aaf)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-24 10:35:33 +01:00
Martin Ertsaas 8a978eeda0 bitbake: Change bzr fetcher to use branch instead of co. Fixes: bzr: ERROR: No pull location known or specified.
This problem occurs when fetching a different revision of the same source. Which mean every time you update a bzr package.
Using branch sets the pull location, and are the preferred way of cloning/branching a repository in bzr.

(Bitbake rev: 877a04d0b3cea9d5dbdf3c54fe0feb54cb997dda)

Signed-off-by: Martin Ertsaas <mertsas@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-24 10:35:33 +01:00
Richard Purdie 897d7d171e bitbake: cooker.py: Ensure we track parser errors and only show bbappend issues on complete parse
Currently if any parsing failure occurs, there can be a long list of
bbappends that are "dangling" based on the fact that recipes were not
parsed. This change firstly ensures the error counter is incremented
and secondly that the bbappends list is only shown on a completed
parse list.

(Bitbake rev: 358952f0d874b869d361bbd72a5ea317bf939cd3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-24 10:35:33 +01:00
Richard Purdie 26ace2c081 bitbake: Update version to 1.15.3
(Bitbake rev: befbb5c9428eaf98b2ff9c4b36b0b3f2dce7fe07)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Richard Purdie 798415bd21 bitbake: bitbake: Warn upon finding tab indentation in python functions
Mixed spacing in python functions can cause subtle issues and
generally confuses users. We've standardised on 4 space indentation,
adding this warning helps ensure consistency and avoid bugs. It
also makes _prepend and _append operations on python functions slightly
less risky.

(Bitbake rev: c51cfaf48d3b12a19b01e824b6ba4230376bcad4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Martin Jansa d5fb11747a bitbake: fetch2/svn.py: Use protocol parameter to get the protocol
* it was send in v1 of proto -> protocol changes but then wasn't in V2
  http://patchwork.openembedded.org/patch/31617/
  where warning about proto= was moved to shared __init__

(Bitbake rev: b2017f493ab730d804ae44ec5a168d464626d046)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-18 12:43:50 +01:00
Kang Kai 4bd0338972 bitbake: hob2: add elf to hcc supported image types
[Yocto #2709]

OE Core Commit c9b01af84b add elf image
type. This will cause hob build image failed.
Add elf to hcc supoorted image types to fix this issue.

(Bitbake rev: a93a58b7cea2ddb9596cb4d718c0801db5d1a295)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:54:07 +01:00
Jeffrey C Honig 4b8f43aaa6 bitbake: siggen.py: Insure .siginfo files writes into shared sstate cache are atomic
Use tempfile.mkstemp to create a temporary file in the sstate dir and move it
   into place after closing.  The previous code would fail in the chmod() if two
   users were running jobs that touched the same signature file.

(Bitbake rev: ff11e9ac5eba2d957917664a7b91b1277d8ad548)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:54:07 +01:00
Richard Purdie 05e5ec2be8 bitbake: runqueue.py: Improve error output to be more useful when non-existent tasks are found
(Bitbake rev: 9be584272a63f48d8dc7c9f05b017d11250aa247)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:54:07 +01:00
Andrei Gherzan a3a697c425 bitbake: fetch2/__init__.py: Warn user if SRC_URI is using "proto" and not "protocol"
As well, if "proto" is used, get the associated value as "protocol"

(Bitbake rev: 53e6b630f0463d2d07cdaa9c9eb36794dc9b6b69)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:26 +01:00
Andrei Gherzan c26f6b2b94 bitbake: fetch2/bzr.py: Use "protocol" parameter to get the protocol
(Bitbake rev: 630876b40ed181312e84f902c4cfb97361afbe81)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Andrei Gherzan bd8d18f742 bitbake: fetch2/hg.py: Use "protocol" parameter to get the protocol
(Bitbake rev: f4a780a7f50fdd8f2bd75888dad790bcfe95b873)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Andrei Gherzan cf599d12d3 bitbake: fetch2/osc.py: Use "protocol" parameter to get the protocol
(Bitbake rev: 01040efce82cfbaa76f46d9f95c984be8f9ea810)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Wenzong Fan 6a210e88b7 bitbake: bitbake: Abort build if runtime dependency conflict
Currently if there are multiple preferred providers available for
a runtime dependency, bitbake will print an Error message and let
the build go on. Anyways the build should abort while any Errors
occured.

[YOCTO #2734]

(Bitbake rev: 5f81a714f4fca785780bef555b419f0250e5ec1c)

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Richard Purdie 029e3cea52 bitbake: fetch2/wget: Use FETCHCMD_wget to provide the commandline and options
This also changes to use  -t 2 -T 30 as the defaults which are more sane for
a modern fetcher and already specified in OpenEmbedded metadata.

(Bitbake rev: bf0e5dddf0f63cdb0648fb6d872af5ceef6fbfb0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-10 14:25:38 +01:00
Richard Purdie 254488f089 bitbake: fetch2/cvs.py: Switch to use FETCHCMD_cvs and handle parameters in the fetcher itself
This brings the cvs fetcher more into line with the others and allows consistent usage
of the FETCHCMD variable and option handling.

(Bitbake rev: 390ad59739356422852e976fa246375abc6aba08)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-10 14:25:38 +01:00
Robert Yang 041a0e8dff bitbake: bitbake/cooker: Print which pkgs would be built in -g output
This is for giving the user a clear list to show which pkg would be
built, we have the "bitbake -g", but it is not easy to read for people,
it is for "dot". Improve the "bitbake -g" to also save a pn-buildlist:

$ bitbake -g core-image-sato
...
NOTE: PN build list saved to 'pn-buildlist'
[snip]

The contents of pn-buildlist:

busybox
shadow-native
pth
sysfsutils
qemu-helper-native
curl-native
ncurses-native
gdbm
xserver-xorg
linux-libc-headers
[snip]

[YOCTO #2404]

(Bitbake rev: 18aff925aece774d0172894e25584353519ca03f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-09 17:19:32 +01:00
Robert P. J. Day 5051e9837f bitbake: usermanual: Fix missing markup
(Bitbake rev: 68af2b09315ba35eae24933a599014a662789c2c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-06 09:41:56 +01:00
Richard Purdie 136751122a bitbake: data_smart: Fix multiple override interaction with append and prepend operators
Variables which used multiple overrides and the append/prepend operators were
not functioning correctly. This change fixes that.

This fixes the testcase:

OVERRIDES = "linux:x86"
TESTVAR = "original"
TESTVAR_append_x86 = " x86"
TESTVAR_append_x86_linux = " x86+linux"
TESTVAR_append_linux_x86 = " linux+x86"

[YOCTO #2672]

(Bitbake rev: dc35a2e506e15fb7ddbf74c3b3280e9e83ab33bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-05 12:36:45 +01:00
Richard Purdie 3051f36444 bitbake: runqueue.py: Fix recursive task pruning to only prune self referencing tasks
(Bitbake rev: 4962a59793504b26b06cf058dda600a07fbbd951)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 17:40:38 +01:00
Richard Purdie dd5f6ae551 bitbake: fetch2/svn: Enhance to cope with subversion 1.7 upgrade
svn changed working checkout formats between 1.6 and 1.7. Its convoluted to
detect what format a given working copy is in so the simplest solution is simply
to run "svn upgrade" within the working copy.

The base svn command variable is relocated slightly to enable this new code to
work effectively.

(Bitbake rev: ebd3ecdb5f3c6d3fe1fad27cbed4d80f4277e92e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:15 +01:00
Richard Purdie 852266d0bc bitbake: usermanual: Improve task dependency documentation to match reality
(Bitbake rev: f67c0606fc681359fb0c68be55cfc9f11d410f17)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:15 +01:00
Richard Purdie 3488966926 bitbake: runqueue.py: Allow recrdeptasks that have self references
In some cases we want to pull in DEPENDS and RDEPENDS of recrdeptask
dependencies but we need a way to trigger or avoid this behaviour
depending on context. The logical syntax to trigger such behaviour
would be a self referencing recrdeptask:

do_a[recrdeptask] = "do_a do_b"

The dependency chains already recurse this kind of expression correctly, the
missing piece is to avoid any circular reference errors. Since the dependencies
have already been recursively resolved, simply removing any recrdeptask
references is enough to break the circular references.

This patch therefore removes any circular references using the set
difference_update() operator. There will be metadata tweaks required to
add any references needed to the extra taskname.

(Bitbake rev: a5324da9b8a0c9307a6c511ea9009f34be70c92b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:14 +01:00
Liming An 5d79175b87 bitbake: Hob: fixed some variables not clean bug in detail page
[YOCTO #2679]

(Bitbake rev: 73801f571e040dcdfeb15a15b9a484cbefaae70c)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:14 +01:00
Enrico Scholz 86aeee98cf bitbake: git: do not execute 'git remote prune'
'git remote prune' at this location does not make much sense because
the following 'git remote rm' will prune stale and non-stale branches.

The 'prune' can cause trouble because it will access the network
bypassing the no-network code in bitbake. When this operation fails and
throws an exception, the next command (--> 'git remote rm') will be
skipped.  This in turn, will make all the following operations fail,
because they assume that the remote does not exist yet.

(Bitbake rev: 2ba23df5fad4b94d38a6aed97f7822226d72eb89)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:14 +01:00
Liming An a5b2c1e4ce bitbake: Hob: change 'run image' and 'deploy' Gui and work flow for building detail page
In build detail page, the response action of clicked the 'run image'
or 'deploy' button will accroding to below as ui design:
1)if there has one file in building result, it will responsed the
'run image'(now, we only support the qemu) or 'deploy' directly
2)if there has more than one file, it will popup a dialog with listed
created files type, they are has same action attributes 'deploy'
or 'runnable'.
Note: because the qemu image (runnable file) can't be deployed and
we can't generated a image that has the two attributes now, can be run
or can be deployed,  so the code will not deal with this case.

[YOCTO #2155]

(Bitbake rev: 0d24b1e85a11b68c8464cf15b49d3fc78f216818)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-29 14:46:47 +01:00
Richard Purdie 4129d5dc7c bitbake: runqueue.py: Handle multiple rdeptask entries
I'm not sure why we don't currently allow multiple entries in rdeptask when
we do in deptask. This makes the handling match between the two since
its trivial to fix.

(Bitbake rev: 19c84fe8854639768c874cc1449963a9867ad397)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie 18e3b500b9 bitbake: fetch2: Revert the regexp removal for the type field and instead anchor regexp
People are using regexps in the url type field so we need to preserve
this bitbake behaviour. To address the issues with https:// urls mapping
badly to file:// urls we anchor the regexp if its not already anchored.
There should be no expressions in the wild which would break with this
change.

(Bitbake rev: ce0579dc256251e523c6330641f98b9f5a0e5761)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie c525c131a6 bitbake: test/fetch: Switch the comparision order to make test failures slightly clearer
(Bitbake rev: 2b1311e21172847b6a86cfb21a84fd00e4ab1ac5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie b13951f96d bitbake: test/fetch: Ensure cwd is valud for the git clone
(Bitbake rev: 60b1a9f52dfec98e55a879a637f7142b0175b452)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie 5fa6036d49 bitbake: runqueue: Reimplement recrdepends so it works more correctly
Currently, recrdepends is extremely greedy. For example:

do_foo[rdepends] = "somedep:sometask"
addtask foo

which adds foo with *no* dependencies, will suddenly start appearing
as a dependency in every task which uses recrdepends. So far this has
been mildy annoying but we now have use cases where this makes no sense
at all.

This reworks the recrdepends code to avoid this problem. To do this we
can no longer collapse things into lists just based on file ID. The problem
is this code is extremely performance sensitive. The "preparing runqueue"
phase spends a lot of time in these recursive dependency calculations so any
change here could negatively impact the user experience.

As such, this code has been carefully tested on convoluted dependency trees
with operations like "time bitbake world -g". The net result of this change
and the preceeding changes combined is a net speed up of these operations in
all cases measured.

Tests were made comparing "bitbake world -g" task-depends.dot before and after
this patch. There *are* differences for example -nativesdk do_build dependencies
on -native recipes are no longer present. All removed dependencies appear to
be sensible improvements to the system. The "rdepends" cross contamination
issue above is also fixed.

(Bitbake rev: 82d73423c57569b984ee0ae3d93e3c3bd5dc5216)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie be22b92627 bitbake: runqueue.py: Convert depends variable to use sets
This gives some small performance gains and sets the scene for other
improvements by removing the need for duplicate detection code.

(Bitbake rev: 6fd723479e8d49227fd58040b3485c1d5afc4bc5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie edfb2ba32c bitbake: taskdata: Add gettask_id_fromfnid helper function
This is like gettask_id but doesn't require translation of fnid -> fn
first which the function then translates back. This gives a sizeable
performance improvement since a significant number of lookups are avoided.

(Bitbake rev: 3190cb83e2af195a464f669c5aa8aedbf795160e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Cristian Iorga 2e4bd35df8 bitbake: Fix for Hob bug #2323
Removed unnecessary button from Recipes screen and
replaced the button that diplayed packages size and total image size
from Packages screen with a label.

(Bitbake rev: e6ff1d4bab43fdcd8af1230f1d54615f53c1978e)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:17 +01:00
Kang Kai b224ed2065 bitbake: hig.py: use module tempfile to create temp file
I am sorry that use os.tmpname which casue a security warning.
Follow Darren's suggestion to use tempfile.NamedTemporaryFile instead.

(Bitbake rev: fe514a130579302312f68821536d108c8ceb4363)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:17 +01:00
Richard Purdie 72f04e760d bitbake: fetch2: Ensure star character doesn't end up in mirror tarball names
If '*' does end up in mirror urls accidently, some strange things
can break since supports_checksum() looks for this, ud.localpath can
then get ignored and this can lead to empty directories being downloaded
"successfully". '*' is a special case for file urls only at this point
so remove any entries that accidentlly make it in through url mapping.

(Bitbake rev: 1369bec2404d942acc3618a8d005ec6868dcfd41)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:17 +01:00
Paul Eggleton bd3fd17fc5 bitbake: lib/bb/utils.py: remove unnecessary preserved variables
_ and LANG no longer need to be preserved from the external environment.
The value of _ changes between non-pseudo-wrapped and pseudo-wrapped
invocations (e.g. between "bitbake -p" and "bitbake target") and this
will currently trigger a full reparse in the absence of a whitelist
entry in BB_HASHCONFIG_WHITELIST, which is not ideal.

LANG used to be preserved in order to ensure the C locale was being
used for tools invoked by bitbake, however we now set LC_ALL in
bitbake.conf to take care of this.

Second part of the fix for [YOCTO #2600].

Acked-by: Jason Wessel <jason.wessel@windriver.com>
(Bitbake rev: 1c531dff2fb055ecab2d462027eecec3fabc2a44)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie 9334b0d002 bitbake: fetch2: Add new mirror syntax to simplify mirror specifications
When writing mirror specifications, the current regexp syntax can be awkward
and hard to get it to do what you want. For example, extracting the 'basename'
of a repository:

PREMIRRORS = "git://.*/([^/]+/)*([^/]*) git://somewhere.org/somedir/\\2;protocol=file"

can now become:

PREMIRRORS = "git://.*/.* git://somewhere.org/somedir/BASENAME;protocol=file"

which is much clearer. A MIRRORNAME substitution is also added which contains
an encoded form of both host and path. One of the problems with the existing
regexp syntax is you couldn't access HOST information from PATH and vice-versa
which is an issue this patch also addresses.

Tests for the new syntax are also added.

(Bitbake rev: c6b1acbad7b3d2698530eb8b5249adb4ab95da21)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie e63dada732 bitbake: fetch2: Handle errors orruring when building mirror urls
When we build the mirror urls, its possible an error will occur. If it
does, it should just mean we don't attempt this mirror url. The current
code actually aborts *all* the mirrors, not just the failed url.

This patch catches and logs the exception allowing things to continue.

(Bitbake rev: c35cbd1a1403865cf4f59ec88e1881669868103c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie a87aa7b7af bitbake: process: Improve _logged_communicate buffering
There are two problems with the _logged_communicate that are both
caused as a result of buffering I/O issues:

1) log truncation when python fails

2) While a bitbake task is running it is impossible to see what is
   going on if it is only writing a small incremental log that is
   smaller than the buffer, or you get only a partial log, up until
   the task exists.  It is worse in the case that stderr and stdout
   are separate file handles, because previous code blocks on the read
   of stdout and then stderr, serially.

The right approach is simply to use select() to determine if there is
data available and also flush the log before exiting.

This is based on a patch from Jason Wessel <jason.wessel@windriver.com>
with some changes to flush upon exit, abstract the non blocking file
descriptor setup and drop the buffer size parameter.

(Bitbake rev: 361fb71e907aa84c28ecec79fefc6ca39c39172f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie 15a31a93ba bitbake: taskdata.py: Add support for rdepends task flag
Currently its not possible to add arbitrary RDEPENDS to a specific task.
This can be useful and this patch adds functionality equivalent to the
'depends' task flag.

(Bitbake rev: db65080a6199baecc5c422294a4c4a9fd12dc29e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie be98c1fc29 bitbake: utils.py: Add function to set nonblocking operation on a file descriptor
(Bitbake rev: ab6d71ebfcfb7bedc064b25f84647c8815096e5a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie e05b423cc6 bitbake: git.py: Remove -l option, its not necessary
If -l is specified and the source and destination are not on a common
filesystem an error occurs. The -l option is however the default for
git for local paths which the fetcher already now ensures in the
file:// case.

We can therefore safely drop the -l option.

(Bitbake rev: 3aeb268b2aaab4bb8b1cfff1450e0b76aa8ce855)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Paul Eggleton df929f4d37 bitbake: lib/bb/siggen.py: log when tainting the signature of a task
Log a note when applying a taint to a task signature (e.g. when using
the -f or -C command line options) so that the user knows this has been
done.

(Bitbake rev: 0fd960fdea83874eedb541cbc2920257e0f3fb81)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Paul Eggleton 25441f47ca bitbake: bitbake: tweak help text for -C slightly
What is specified is a command (or "cmd" as in the help text for -f)
rather than a task - i.e. you specify compile, not do_compile, so change
the sentence to reflect that and reorder it slightly so it makes sense.

(Bitbake rev: 9ab269410ef5cd4753fe11ec74759f421685bb7b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:15 +01:00
Jason Wessel fa7c2b0743 bitbake: fetch2/git.py: Optimize clone fall back when it is local
A file:// url should use "clone -l" to greatly speed
up the clone in the case of a kernel when it is local.

(Bitbake rev: 2bab2cc3ffe67ee2a308074a6e4c2c7be5636d2f)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:21:23 +01:00
Kang Kai dee397af90 bitbake: ui/depexp.py: use the new progressbar in Hob
[Yocto 2149]

Use the new progressbar in Hob, so that we can reduce the maintenance
burden of the multiple GUIs.

(Bitbake rev: 6c0da26adbdcaa0c56737bacddb61678a9095e32)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:21:23 +01:00
Richard Purdie df0059b465 bitbake: fetch2: Update replace_uri to handle uri types explicitly
For mirror mapping, we never use regexps for the type component of
the url. Doing so causes various slightly bizarre behaviour such as
https:// urls being translated to files:// urls which we have no handler
for. This patch forces the type matches to be direct, not regexp based
and gives the expected bahvriour.

(From Poky rev: 695d8aca0999d2d61970b990e83c3132ba6f12cb)

(Bitbake rev: 604df1b25cf114e083f52917df2df64e01279c25)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:34 +01:00
Richard Purdie dd249ebe67 bitbake: test/fetch: Add a couple of extra test cases
(From Poky rev: 01d8220ef8580ca980a14c05d500765ca2d37e2c)

(Bitbake rev: 0d0a12fa0e4dabf01c1c24370aff54d26690a6dc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:34 +01:00
Richard Purdie ad8d1d3a15 bitbake: test/fetch: Add in unit tests for uri_replace() and git premirrors
(From Poky rev: 4be81b5cadb7813d37152411c23764501f5869d3)

(Bitbake rev: f91b4c2e3a2b3029d653a18de7ae2b0ecd7e2536)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:34 +01:00
Richard Purdie a627fe5afe bitbake: fetch2: uri_replace() only consider ud.localpath where its a file
Using ud.localpath as a basename when it points at a directory causes
problems. The supports_checksum() method gives a good indication of whether
ud.localpath can be used in the way we need.

(From Poky rev: 933ec8a44634e33f92f6f76de3a34094c3d63aa6)

(Bitbake rev: dcd79ae20ab2c72c3312b2251c2b6dc4cabe988e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie 548465141a bitbake: fetch2: uri_replace() improve mirrortarball handling
We only consider mirror tarballs when the source and target urls are of
differing types. We also should clear all url paramters when handling
mirror tarballs.

(From Poky rev: da140b8b0b3dda5429f9eee68829ef5247cdfe12)

(Bitbake rev: 7619dcad29a6c2405b15a8fbadfa11e81b399ae1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie 83bbfa07ab bitbake: fetch2: uri_replace() remove what amounts to a null operation and add some comments
(From Poky rev: 6d67200d052ba72258f5a0a178542ef99500a9cc)

(Bitbake rev: e67af4d12f390ce6083965509ca9ea85a76dc351)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie 196982a803 bitbake: fetch2: Add parameter handling to uri_replace()
This means that parameters in the source expression are used as part of the
match. Parameters in the destination are used explicitly in the final
url.

(From Poky rev: c465cb0c5c927dd41d96ad6d6fa1566349574bb7)

(Bitbake rev: 3c468ac3ed6d045561afce19b85ae9dd18d87cea)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie bf8501897b bitbake: fetch2: Remove basestring test and simplify uri_replace
(From Poky rev: d5657883d34bfef6beec594ac8d799f617b6b3ad)

(Bitbake rev: 84ffc261f376429b3a6b5d7bf2f6217cd10ca12a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie a7d5c57006 bitbake: fetch2: Simplify some looping constructs in uri_replace()
(From Poky rev: c6bd25150a842a530f958d7233b15ae50d42c6c8)

(Bitbake rev: 075296f3e5e5e3662290a888a6ba11229a36b95a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie 20649e95ed bitbake: fetch2: Improve mirror looping to consider more cases
Currently we only consider one pass through the mirror list. This doesn't
catch cases where for example you might want to setup a mirror of a mirror
and allow multiple redirection. There is no reason we can't support this
and the patch loops through the list recursively now.

As a safeguard, it will stop if any duplicate urls are found, hence
avoiding circular dependency looping.

(From Poky rev: 0ec0a4412865e54495c07beea1ced8355da58073)

(Bitbake rev: e585730e931e6abdb15ba8a3849c5fd22845b891)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie 3f441765a7 bitbake: fetch2: Explicitly check for mirror tarballs in mirror handling code
With support for things like git:// -> git:// urls, we need to be
more explicity about the mirrortarball check since we need to fall
through to the following code in other cases.

(From Poky rev: 28e858cd6f7509468ef3e527a86820b9e06044db)

(Bitbake rev: a2459f5ca2f517964287f9a7c666a6856434e631)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie f3fb4dc40f bitbake: fetch2: Split try_mirrors into two parts
There are no functionality changes in this change

(From Poky rev: d222ebb7c75d74fde4fd04ea6feb27e10a862bae)

(Bitbake rev: db62e109cc36380ff8b8918628c9dea14ac9afbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Richard Purdie 927565c3b1 bitbake: fetch2: Ensure when downloading we are consistently in the same directory
This assists with build reproducuility. It also avoids errors if cwd
happens not to exist when we call into the fetcher. That situation
would be unusual but I hit it with the unit tests.

(From Poky rev: 86517af9e066c2da1d580fa66b7c7f0340f3403e)

(Bitbake rev: b886c6c15a58643e06ca5ad7a3ff1f7766e4f48c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Richard Purdie 3c8a561a90 bitbake: fetch2: Only cache data if fn is set, its pointless caching it against a None value
(From Poky rev: c2df30bf6d1f8c263a38c45866936c1bf496ece5)

(Bitbake rev: f4b59cc6e1c3ddc168a1678ce39ff402ea1ff4cc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Richard Purdie 4a0dc38da6 bitbake: fetch2: Fix error handling in uri_replace()
(From Poky rev: 1bfba28a583cb167f60e05ecdf34d0786dc1eec5)

(Bitbake rev: aa7467a764ddcbc7d65af99e88cf093b6ec6d24e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Richard Purdie 85dc355580 bitbake: fetch2/__init__: Make it clearer when uri_replace doesn't return a match
(From Poky rev: dc9976331c5cbb0983adb54f6deb97b9203bacbc)

(Bitbake rev: eb96609864dec95a516e6e687dd6a2f31d523acf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Paul Eggleton c072fa8400 bitbake: bitbake: add -C option to invalidate a task and rebuild the target
This new command line option forces the specified task and all dependent
tasks up to the default task to re-run. This means that the following
single step:

bitbake -C compile somerecipe

is equivalent to the following two steps (with the recent change to -f):

bitbake -c compile -f somerecipe
bitbake somerecipe

Note that to work this option needs full hashing enabled (i.e.
BB_SIGNATURE_HANDLER must be set to a signature handler that inherits
from BasicHash). If this is not the case, -C effectively does nothing.

Based on a previous implementation of this option by Jason Wessel
<jason.wessel@windriver.com>.

Implements [YOCTO #2615].

(Bitbake rev: 2530e0faada5775897cfd1b93aba6925826dca73)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Paul Eggleton 5bd11a9bf3 bitbake: bitbake: ensure -f causes dependent tasks to be re-run
If -f is specified, force dependent tasks to be re-run next time. This
works by changing the force behaviour so that instead of deleting the
task's stamp, we write a "taint" file into the stamps directory, which
will alter the taskhash randomly and thus trigger the task to re-run
next time we evaluate whether or not that should be done as well as
influencing the taskhashes of any dependent tasks so that they are
similarly re-triggered. As a bonus because we write this file as
<stamp file name>.taskname.taint, the existing code which deletes the
stamp files in OE's do_clean will already handle removing it.

This means you can now do the following:

bitbake somepackage
[ change the source code in the package's WORKDIR ]
bitbake -c compile -f somepackage
bitbake somepackage

and the result will be that all of the tasks that depend on do_compile
(do_install, do_package, etc.) will be re-run in the last step.

Note that to operate in the manner described above you need full hashing
enabled (i.e. BB_SIGNATURE_HANDLER must be set to a signature handler
that inherits from BasicHash). If this is not the case, -f will just
delete the stamp for the specified task as it did before.

This fix is required for [YOCTO #2615] and [YOCTO #2256].

(Bitbake rev: f7b55a94226f9acd985f87946e26d01bd86a35bb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Richard Purdie 4ff6160d90 methodpool: Improve method already seen error message
The current error message is confusing, this improves it to explain the problem
and the possible ways to resolve it.

[YOCTO #2530]

(Bitbake rev: d316f28ed725ff40daa8771c1aa224ac46d5b224)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:20:51 +01:00
Richard Purdie 1faf02599a fetch2/local: Ensure quoting is handled correctly from the url
The commit 420eb112a4f (fetch2: quote/unquote url paths) caused a regression
since local file urls containing quoted characters are no longer being handled
correctly. This fixes things so the url is dequoted correctly, fixing various
fetcher failures with recipes like "gtk+".

[YOCTO #2558]

(Bitbake rev: 95c0595d66b3f8a5f0716662ba2a878600f312ea)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:18 +01:00
Jason Wessel d43d3b007e fetch2: Fix missing output from stderr in fetcher logs
There are actually two problems to fix

1) The exception for bb.process.ExecutionError must be processed first
   because it is a derived from the bb.process.CmdError class and
   we never reach the ExecutionError otherwise.

2) The stderr needs to be printed as well as stdout to determine
   the root cause of a fetch failure.

The example I have is that I got a log that looked like:

--
ERROR: Function failed: Network access disabled through
  BB_NO_NETWORK but access requested with command
   /usr/bin/env wget -t 5 -nv --passive-ftp --no-check-certificate -P
   /localds 'http://downloads.yoctoproject.org/[...CLIPPED...] url None)
--

That really didn't tell me much, but with this patch I get error above
plus the following:

--
STDERR: /net/[...CLIPPED...]kernel-tools.git: Read-only file system
--

(Bitbake rev: af2133a04e1f4b22b181adf9c71f89c439bb88cf)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:18 +01:00
Liming An ad78e3c189 Hob: fixed issue about 'select a base image' combo not sensitive
The combo view is not sensitive, after select recipes come back.
so fixed this issue.

[YOCTO #2500]

(Bitbake rev: debcea9c063f7bddcba1d4ed47edbe173ef1d9cf)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:18 +01:00
Liming An 2295ef1dc3 Hob: fixed an issue about no 'set_page' function in hob failed page show
Due in mistake deletion in previous patches, if building failed, will report
the error of no 'set_page', so add that function.

(Bitbake rev: b046f4316ee7f2afaa0bb723e4216714d9cb87a0)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:18 +01:00
Kang Kai 79df63514d image-writer: tweak some strings
Tweak some strings in accord with the script name 'image writer', and
remove extra noun 'button'.

(Bitbake rev: d2d65335e8fc2417ebd3910f645cc00a4abfbeaa)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:17 +01:00
Kang Kai d2bdfe0e66 ui/crumbs/hig.py: simplify subprocess call
According to Darren's suggestion, subprocess.call() will wait until the
subprocess complete. So simplify the code, use subprocess.call() to wait
command complete.

(Bitbake rev: 3dea9d5a5af82d99d337238981807a4cb1bd5b93)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:17 +01:00
Kang Kai a87ce4308e ui/crumbs/hig.py: tweak strings
Add comments for DeployImageDialog 'standalone' part of codes to make it
easy to read.
And tweak some strings.

(Bitbake rev: b0e604d3d6dbfcaeac0a2e0e4399aeb4327f8cbc)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:17 +01:00
Kang Kai 0612cf3fcb hob2: create a standalone deploy image tool
[Yocto 2388]

Create a deploy image tool using the existing dialog including
DeployImageDialog and ImageSelectionDialog.

This tool writes bootable images to USB devices, and it can be run
directly without hob.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:43 +01:00
Kang Kai 7828e9eee2 hob2: update DeployImageDialog for seperated tool
Part of [Yocto 2388]

Update class DeployImageDialog to get ready for a standalone deploy
image tool. The standalone tool can be run directly without hob, and
add a button to select image file. So adjust the layout of
DeployImageDialog.

(Bitbake rev: 399cfbaf36ccd4b934e25f915e64b87f32a3eb82)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:17 +01:00
Kang Kai 87ce7bdfd5 ui/crumbs/hig.py: check deploy process return value
Update function response_cb of DeployImageDialog to get deploy process
return value. According the return value tell user that deploy image
successfully or not.

(Bitbake rev: f78f6d43a68e0f1dc4d3e4164eed453fcb9c22a8)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:17 +01:00
Kang Kai 0c9927865c ui/crumbs/hig.py: remove extra spaces
Remove extra spaces at the end of line or blank line.

(Bitbake rev: 70b75a05a806fecf8be15b9ba66fec2eb87dcce4)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:16 +01:00
Kang Kai 0b6bb93558 ui/crumbs/hig.py: fix run time error
Commit 094742bed2 re-implement the
function popen_read(). If there is no USB device, it crashes with
"ExecutionError: Execution of 'ls /dev/disk/by-id/usb*' failed with exit
code 2:"

Replace popen_read() way with glob module to get the USB devices.

(Bitbake rev: 0c43fe72e3c6a12ac19173d8cbbad81af21c2d85)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:16 +01:00
Kang Kai ac7b96420a ui/crumbs/utils.py: import module bb
When I try to call function which_terminal() of utils.py directly,
it complains NameError: global name 'bb' is not defined

So import module bb

(Bitbake rev: 9e370d9b1022112be2ac8f73feb182b1bba179b0)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:16 +01:00
Liming An 574b5ecfa5 Hob: fixed the index issue when set actived item for base image combo
The combo item index dosn't be increased as the insert a dummy item, when
execute the upadate base image combo operation.

[YOCTO #2500]

(Bitbake rev: 59e19634a84fcb4c34b92cdcf7a9ea807c9abb63)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:16 +01:00
Liming An e91f1e28bc Hob: Change 'run image' work flow and image detail screen as ui design
Added the qemu_image_kernel selection view box to image detail screen GUI, and
changed the 'run image' button clicked work flow.

[YOCTO #2155]

(Bitbake rev: d548eb8a03cfba5c64c018898972bc0a0bdb280c)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:15 +01:00
Shane Wang c0b92702d3 Hob: Interpret some special characters for label markup
Interpret some special characters for label markup, such as &, <, >, etc.
Otherwise, the message dialog can't show them, and worsely, it makes the
whole message blank.

[Yocto #2492]

(Bitbake rev: fb82f6eb5405274f702bd6d64cbe995fd4b74145)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:15 +01:00
Shane Wang 25785d8ddf Hob: add versions for compatibility check between Hob and templates
If a user uses a very old version of Hob and does some work,
later on he/she upgrade to the latest version of Hob, because
Hob may change the settings (add more config option into the Adv.
Settings dialog or remove some), then the old templates are not
loadable and workable for the new Hob.

Even though the user hasn't save any template before, the Hob could
remember the settings between Hob sessions as a default template,
(Remember we have a bug to ask Hob remember between sessions?),
the new Hob will also load the default template.

By adding versions, we can easily to fix the issue. If the versions
don't match, Hob will remove the old default template first and
initiate a new build, which has very very little impact on the user.
(Just can't remember from the previous session after the user upgrades
to a new and incompatible Hob)

[Yocto #2492]

(Bitbake rev: d5dd9a7af9d35c588528f9937430d1ef5de216c6)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:15 +01:00
Shane Wang efd977010e Hob: lower the limitation for PyGTK
(Bitbake rev: d44af0185985cc46ba07a82875bbb4cd4a6d3dec)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:15 +01:00
Liming An 9703dcb398 Hob: fixed a definition not match issue when click choose directflb in package page
[YOCTO #2526]

(Bitbake rev: 3c285d386a4ca0a86798feb0c506673a2a312727)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:14 +01:00
Liming An c8c8d75f23 Hob: fix entry of recipe page can't be edited in case after clicked clear button
cancel some inviable code and fixed this issue

(Bitbake rev: d2e2c917e4a93ec7fd344a2c703d526ce7b690cf)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:14 +01:00
Liming An 6ac1545453 Hob: clear the repeated function get_kernel_file_name
there are a repeated function in builder.py and imagedetailspage.py,
so combine them to one.

(Bitbake rev: 4bada20cd244a2dd6d72acd38f0cadc90453e60b)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:14 +01:00
Paul Eggleton 534f31903b bitbake: include varflags in checksums
Add a dependency to each variable on a filtered list of its varflags.
This is intended to catch things such as SRC_URI checksums, varflags
controlling extra functionality from classes (e.g. the recently updated
update-alternatives class in OE-Core), etc. and ensure their values
influence the sstate checksums.

There is an exclusion list which needs to be set via bitbake.conf
(BB_SIGNATURE_EXCLUDE_FLAGS), if this is not set then the functionality
is disabled. The existing vardepsexclude mechanism can also be used to
exclude undesired varflags, but they must be fully specified, e.g.:

do_patch[vardepsexclude] += "do_patch[someflag]"

Implements [YOCTO #2517].

(Bitbake rev: 56c1ab18fcaf4ac245dcb412ed55e8e0af07883b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:32 +01:00
Paul Eggleton 43551f513d lib/bb/fetch2: ignore remote URIs when doing file checksums
Skip evaluating remote URIs when doing local file checksums, because we
don't need to process them and doing so will trigger a parse failure if
SRCREV is not fully specified. Whilst this is just delaying a check
until runtime (when do_fetch runs for the recipe) we're only validating
this here accidentally and if we did wish to check it during parsing it
ought to be done explicitly.

Fixes [YOCTO #2512]

(Bitbake rev: 99feb77c2de707f2d825566cf48371c48f450e3e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:32 +01:00
Paul Eggleton bb81db6f61 cooker: report recipe being parsed when ExpansionError occurs
When an ExpansionError occurs during parsing it is useful to know which
recipe was being parsed when it occurred.

(Bitbake rev: a2a8e8c9f5a1a30aacab696fd2b434939ee2c4e2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:31 +01:00
Paul Eggleton f0809ed788 cooker: fix UnboundLocalError when exception occurs during parsing
Fix a recent regression where we see the following additional error
after an error occurs during parsing:

ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/paul/poky/poky/bitbake/lib/bb/command.py", line 84, in runAsyncCommand
    self.cooker.updateCache()
  File "/home/paul/poky/poky/bitbake/lib/bb/cooker.py", line 1202, in updateCache
    if not self.parser.parse_next():
  File "/home/paul/poky/poky/bitbake/lib/bb/cooker.py", line 1672, in parse_next
    self.virtuals += len(result)
UnboundLocalError: local variable 'result' referenced before assignment

(Bitbake rev: 1ae0181ba49ccfcb2d889de5dd1d8912b9e49157)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:31 +01:00
Paul Eggleton 64f88bf5d9 lib/bb/data_smart.py: don't report variable in ExpansionError if not set
If the variable name is not specified then don't confuse the error message
by starting off with "Failure expanding variable None...".

(Bitbake rev: 9cb16f3c73751e7cf6d495586a6193f06eb97b1f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:31 +01:00
Paul Eggleton 5a975239ea hob: handle sanity check failures as a separate event
In order to show a friendlier error message that does not bury the
actual sanity error in our typical preamble about disabling sanity
checks, use a separate event to indicate that sanity checks failed.

This change is intended to work together with the related change to
sanity.bbclass in OE-Core.

Fixes [YOCTO #2336].

(Bitbake rev: 24b631acdaa143a4de39c6e1328849660c66f219)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:31 +01:00
Liming An c8d78b2186 Hob: add the 'build new' be as the primary action for 'Image detail' page
As ui design, we should set at least one primary action for 'My Image' and
'Image detail' screen as the differnt selected image. if no 'run image' or
no 'save as template' or no 'deploy image' we should set 'build new image'

[YOCTO #2326]

(Bitbake rev: d848af637e9a14b627533bee65bf16f680dff854)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:30 +01:00
Liming An 6609a813bb Hob: Fixed a compatible issue for indicator icon view
Because some screen not support the alpha visual channel, so the function
'screen.get_rgba_colormap()' will return None, it's a compatible issue, so
change it by another way.

(Bitbake rev: e58ba1ad944ea1ba95a5ada80d4c88f0165bd1ca)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:30 +01:00
Robert Yang cc3da1236c HOB: 'str' object has no attribute 'close'
For builddetailspage.py:
  The "f" was a stream in the past, it is a string now, so it doesn't
  need f.close(), and change its name to "branch".

  And we don't need the "2>&1" since bb.process.run() can handle it, it
  will raise exception when error occurs, we should handle the exception
  ourselves if we want to ignore the error.

For hig.py:
  Use bb.process.Popen() since it doesn't need the return value. If we
  use bb.process.run(), the parent process will wait for the child process
  to terminate to get the result.

[YOCTO #2511]

(Bitbake rev: ab10f3da1976581c371c43cdb88f405cf6fbcd95)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:30 +01:00
Kang Kai 9b6d3f48d2 hob2: set beginning folders for FileChooserDialog
Set begining folders FileChooserDialog for the select images and
some local directory configurations. That may make user feel more
convenient.

(Bitbake rev: 047ad35c0c869883509557aeb982e0b784ad2e71)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:29 +01:00
Kang Kai f28209d9d3 cooker.py: terminate the Parser processes
[Yocto 2142]

Force to exit HOB when hob is parsing recipes, the bitbake doesn't stop.
It hangs on function BitBakeServerConnection::terminate in file
server/process.py:
    else:
        self.procserver.join()
It is waiting for the children process quit.

In stage of parse recipes BBCooker spawns Parser processes as many as
cpu numbers. When quit the Parser processes they make their internal
Queue to call cancel_join_thread() to avoid block but don't work at
this time.
So force to terminate the Parser processes.

(Bitbake rev: bebef58b21bdff7a3ee1fa2449b7df19144f26fd)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:39:33 +01:00
Paul Eggleton b52dfa23e1 lib/bb/fetch2: fix comments for verify_checksum
This function no longer returns a value, it raises errors instead, so
update the comments to reflect this.

(Bitbake rev: 8b61b9584a8b00378f9fd8f165dbd65dcfd3c14e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:15:12 +01:00