Commit Graph

1092 Commits

Author SHA1 Message Date
Liping Ke b3c41b1f46 Introduce new param caches_array into Cache impl.
When using hob ui interface, we need extra cache fields.
We will save ui required extra cache fields into a separate
cache file. This patch introduce this caches_array parameter.
It will be used in the extra cache implementation (following patch).
Caches_array at least contains CoreRecipeInfo. If users need extra
cache fields support, such as 'hob', caches_array will contain
more relevant elements such as HobRecipeInfo.

(Bitbake rev: d50389ae692377c957afec7c846fc2ce2c070a09)

Signed-off-by: Liping Ke <liping.ke@intel.com>
2011-06-07 22:39:52 +01:00
Liping Ke 43eb7d9563 Introduce extra cache class for image creator
Extra RecipeInfo will be all defined in this file. Currently,
Only Hob (Image Creator) Requests some extra fields. So
HobRecipeInfo is defined. It's named HobRecipeInfo because it
is introduced by 'hob'. Users could also introduce other
RecipeInfo or simply use those already defined RecipeInfo.
In the following patch, this newly defined new extra RecipeInfo
will be dynamically loaded and used for loading/saving the extra
cache fields.

(Bitbake rev: 75d9add923560af9fdd772a363c68337d2c9a97d)

Signed-off-by: Liping Ke <liping.ke@intel.com>
2011-06-07 22:39:12 +01:00
Liping Ke 8df355140c cache.py: Refactory Current Cache implementation
This patch is for refactorying current cache implementation, the
main reason is for introducing extra cache fields requests for
image creator as well as other users. The refactory parts include:
Move cache data retrieve methods out of Cache Data Fields
Definition. Since this retrieve methods will be shared for
both CoreRecipeInfo as well as the new introduced extra RecipeInfo
in the following patches.

(Bitbake rev: f0f53506926a3f79181796dde177f11f0a396b75)

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-07 22:38:32 +01:00
Chris Larson 911e8bb56a siggen: don't choke with traceback when data is None
Given we use bb.error, not bb.fatal, here, it seems this was intended to be
non-fatal, yet we'd end up trying to concatenate None. Fix this by setting an
empty task to the empty string, for the purposes of hashing. Also str() the
value we get from the datastore, just in case something other than a string
was stored there.

(Bitbake rev: ec8a5a495b72e061a1e8d7c7449afb26581872c0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-07 22:29:25 +01:00
Chris Larson 3eed3aac4c parse: pass a useful (if mangled) key to bb.data.expand for :=
(Bitbake rev: 8e1be0ca414d9d26e013ae212abdd9c39fa8df26)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-07 22:29:25 +01:00
Chris Larson 6b5d323b6c event: don't catch systemexit from handler execution
This means that anyone firing an event can get a systemexit and result in
their process exiting, which isn't ideal, but behaves the way it used to (in
particular, ensures that a sanity check failure will halt the build). This
should be revisited in the future.

(Bitbake rev: d6a0ffdd583be3df734171d7e91d334f798a79ce)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-02 23:58:05 +01:00
Richard Purdie fdead2bfc0 data_smart: Adding overrides of zero length is pointless so lets not
(Bitbake rev: 67434496108efc3aba9cb1e3640bc712658b1408)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-01 14:08:40 +01:00
Paul Eggleton 58bdecbc43 bitbake: use layer priority when applying bbappends
If the priority of a layer has been specified with BBFILE_PRIORITY_ then
use that to sort the list of BBFILES entries, which will affect the order
in which .bbappend files are applied.

Fixes [YOCTO #1125]

(Bitbake rev: a8ab0af776ba20c83832215054180fbd15c274c0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-01 14:08:32 +01:00
Richard Purdie dc65caa889 providers.py: Correct PREFERRED_VERSION handling
Overrides on the right are the highest priority and in this case, pn-PN
and PN should take priority over any other override so fix the code to
do this.

Also, since overrides will have been processed by bitbake, we shouldn't
then be specifically looking up PREFERRED_VERSION_${PN} but just using
PREFERRED_VERSION.

This patch corrects the behaviours to match what the code is expected
to do.

(Bitbake rev: 606f1acc6fb8ccec45d6a52ed6ae6dc128011402)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-01 14:08:25 +01:00
Richard Purdie 24f8f691cf bitbake/runqueue.py: Move BB_WORKERCONTEXT to a place where anonymous python can see it
Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
2011-05-31 09:01:59 +01:00
Darren Hart 183ef127f5 fetch2/git: ensure network check log matches actual command
The git command string logged via check_network_access() does not match
the actual command executed in a few places. Ensure that it does.

(Bitbake rev: 10f3ca52dc274cd8b240987cfd7cd003aeda7ab1)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 18:27:19 +01:00
Darren Hart 5a4b8cef20 fetch2/git: use logging.debug() and clarify messages
Replace a call to print() with logging.debug() and flesh out the
message to clarify the state being reported.

(Bitbake rev: 9a28f7744e2f4224e7c097b8c4c1d49731b9a47e)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 18:27:18 +01:00
Richard Purdie fd00566144 bitbake/codeparser: Improve cache handling
The current codeparser cache handling hurts performance badly even
over a couple of cores and certainly on many core systems, it can
spent huge amounts of time in the codeparser cache save functions.

This patch reworks the cache handling so that each parsing thread
saves out its own "differences" file compared to any existing core
cache and then the main bitbake thread picks these up and merges
things back together.

This was tested on systems with small and large numbers of cores
and was found to perform orders of magnitude better in all cases
despite the more complex code.

(Bitbake rev: 9f27563d66523f5af1028f173d53ee75e0877d46)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:51 +01:00
Richard Purdie c373727bd0 bitbake/runqueue.py: Ensure existing setscene stamp files are taken into account
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.

(Bitbake rev: 0a4d857aabc86b973170ba9ce32b6b449a4e2165)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:51 +01:00
Richard Purdie 5573852a82 bitbake/utils.py: Add option to lockfiles to return immediately rather than wait
There are usecases where we don't want to block waiting for a lockfile
so enhance the lockfile handling functions to support this.

(Bitbake rev: 97e8adf03e5fab1fd40c3d53c48f7b333bc2e145)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:51 +01:00
Richard Purdie 00c71132d5 bitbake/cooker.py: Ensure BBFILES is processed in order
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>
(Bitbake rev: c12dd868368bdc3a4f800e075a30c67edca28d47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:50 +01:00
Richard Purdie 65b5553278 bitbake/cooker.py: Fix -b option regexp handling
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.

(Bitbake rev: 6e9119c42d3f4cb3dab3d25856eee8b4bf4ad94f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:50 +01:00
Yu Ke a667251041 fetch2/git: enhance the unpack by using "git checkout"
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]

(Bitbake rev: c0eb89054aef4957966f98b44e7f3cce14fb337a)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:50 +01:00
Yu Ke 3466f2193a fetch2/git: add document for git fetcher supported options
(Bitbake rev: d424ecd751f80a7aecec26e1a0cbd2a1b38e076b)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:50 +01:00
Yu Ke 086479f386 fetch2/git: unify the nocheckout option format
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

(Bitbake rev: bd51659f5ee521cb8e6631d5f26792ab573e6b30)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:50 +01:00
Yu Ke 8a12fad293 fetch2/git: change default protocol from rsync to git
(Bitbake rev: e912122706b402f99848d50f721f179491644d0e)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:49 +01:00
Lianhao Lu ecdbd6ab03 Add PR service deamon to bitbake
Added the initial implementation of the server side PR service.

(Bitbake rev: 4d0e79e5591ff58ce35c7fb96f6e9217ddc27466)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:49 +01:00
Richard Purdie 42076dc9b6 cooker.py: Don't show spurious warnings for collections of .bbappend files
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.

(Bitbake rev: 48899fe7b3791dd897968f44c317e98bad14e146)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-25 23:47:22 +01:00
Richard Purdie fe5f742865 build/siggen: Ensure a task signature file is generated for each task that 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]

(Bitbake rev: 139b8a625818225c358a1b8363518d7ed6913188)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-25 23:39:37 +01:00
Otavio Salvador 32a4e74627 codeparser.py: fix syntax error in exception handling
Commit 036cf3cd11b3a6836b77f5ffa760ceee6b71b1ef missed the needed
brackets to handle more then a type of exception.

(Bitbake rev: abecbb4c0af83c6b4ee248b0f03b779f84b13390)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-24 17:16:47 +01:00
Yu Ke df2a37abd0 git fetcher: add support for rebaseable git repo
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.

(Bitbake rev: 92701d4c5372db48847c70da4ebd0736d79fd54b)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-17 15:19:36 +01:00
Joshua Lock 5251d9d9a5 bitbake/ui: Fix Gtk+ GUI's after recent cache changes
(Bitbake rev: 2bc8f405ec552ae0f1a79790569b2d044a35d3ba)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-16 20:48:34 +01:00
Richard Purdie 477934e5be codeparser.py: Ignore incomplete cache files
(Bitbake rev: 036cf3cd11b3a6836b77f5ffa760ceee6b71b1ef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-12 23:39:20 +01:00
Richard Purdie 506241c914 bitbake: Add missing file
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-07 08:49:28 +01:00
Chris Larson 0788081ac7 Enable some DeprecationWarnings
We'll be skipping the Pending Deprecation step given our release process.

(Bitbake rev: 67a55a6b45fec300bea42c18be41cf0a2f931072)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:24:13 +01:00
Richard Purdie 0cc52efc8c bitbake: Sync fetch back with upstream
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:18:59 +01:00
Christopher Larson d2c925f8a9 fetch.git: fix a remnant wrt persist + keyerror
(Bitbake rev: 7492233f5249d348024bc3daa113a96b765f94db)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:16:13 +01:00
Richard Purdie f1c0c97f4d bitbake/persist_data: Sync file with upstream bitbake
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:07:23 +01:00
Chris Larson 754d1c6983 persist_data: implement comparison, same as dict
(Bitbake rev: 1190406c526c7bb7cf415867be83e0403812a7dd)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:05:11 +01:00
Chris Larson 824acff967 persist_data: don't allow non-string keys/values
(Bitbake rev: 28958cd55e592853c68f5f2ba79381d1b8dcfb8f)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:50:29 +01:00
Chris Larson d43e7a91f2 persist_data: add has_key
(Bitbake rev: 7942833ca0685cf4f3b243dde6203499ef97420c)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:50:14 +01:00
Chris Larson 7fc020aa15 persist_data: raise KeyError on missing elements
(Bitbake rev: a4f62433845c29f98c6a9746d5d2847bf9506ea5)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:49:17 +01:00
Chris Larson fc801b9073 event: improve output for syntax errors in handlers
Note: this includes IndentationError, which is a subclass of SyntaxError.

(Bitbake rev: 156ea134e82d873ca4b5343261da2291a2b32ef6)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:48:34 +01:00
Chris Larson 37cb4cc02b event: improve output when eventhandler exec fails
- 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.

(Bitbake rev: faf682dfc23b7ef2ece04f7d50f9741224bb3bb0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:48:22 +01:00
Chris Larson 8cf28d706b event: register event handler functions, not code objects
(Bitbake rev: be647dac9d458ee4b289ff5f66ed95b311d398d8)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:47:55 +01:00
Chris Larson 2d73cd1d32 build: fix dir removal traceback
This one is to cover the case where the current directory vanishes out from
under us, so os.getcwd() raises an OSError.

(Bitbake rev: 7a29ab534388c0095f7f826b16c5cff343927d10)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:46:03 +01:00
Chris Larson 8b938dc82c build: in exec_func, mkdirhier ${T}
This should fix the -c clean traceback people are seeing.

(Bitbake rev: 416d24912fcef1d82ce2c02855accd86a29e76b2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:42:54 +01:00
Chris Larson 88dbb0523c Initial work on getting bitbake working under pypy
- use os.chmod, not os.fchmod, as the latter is missing under pypy
- rearrange our imports a bit
- don't die if sqlite3 is missing shared cache support

(Bitbake rev: f229824dc9c453adf6067500e2bf6761536e4f2f)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:42:03 +01:00
Chris Larson 628bd54d93 cooker: fix -b with BBCLASSEXTEND
(Bitbake rev: 58bdaeb679d3c84cda827a33d09ce543547c45b4)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:37:39 +01:00
Bernhard Reutner-Fischer 607432947c bitbake manual: fix typo
"is used signify" -> "is used to signify"

(Bitbake rev: c3dd4fd5c9fe106f7fae8c088e75cfb70f20e107)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:34:18 +01:00
Richard Purdie 72875493b8 bitbake/codeparser: Correctly handle a missing/empty cache file
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 19:27:46 +01:00
Richard Purdie 001a555c2f bitbake/cache.py: Ensure skipped recipes make it into the cache to avoid reparsing
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 15:53:09 +01:00
Richard Purdie c8928e93dd bitbake/cooker/codeparser: Ensure the code parser cache is saved for each 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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 15:52:53 +01:00
Richard Purdie 9211fd9c37 bitbake/ast.py: Only run finalise() for the specified variant
Allows the heavy finalise function to only be run for the case we're
interested in when running tasks, saving some processing time.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 15:52:36 +01:00
Richard Purdie 8b32d40896 bitbake/runqueue.py: Remove old log file handling remnants
These lines date from earlier code and are no longer required.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 15:52:24 +01:00
Yu Ke a2030c8d1a git fetcher: make tag back to work, fix Yocto bug 972
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>

Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-05-03 12:16:52 +01:00
Saul Wold 28e7041a9c universe target: add a new target to collect all recipe targets
This new universe target is not intended to be used for
compiling or building everything, it use is for sanity checking
and other tasks that need to find all targets. This does not
exclude any broken or virtual targets.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-05-03 12:10:53 +01:00
Richard Purdie c4371138f7 bitbake/fetch2: Fix the problems introduced by the git fetcher AUTOREV fix
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-20 02:13:26 +01:00
Richard Purdie 2d2d07275c bitbake/fetch2/git: Fix a bug where AUTOREV and the git fetcher interact badly
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'

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-19 23:48:41 +01:00
Darren Hart 2ee0be82d0 bitbake: correct typo in ??= documentation
??= is a lazy version of ?=

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-18 09:40:37 +01:00
Richard Purdie 2b70d0cdd1 bitbake/runqueue.py: Ensure fakeroot env variables make it to the child process
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-31 17:21:44 +01:00
Chris Larson c564fb0909 runqueue: simplify fakeroot environment handling
(Bitbake rev: 88f0d1db88bdba95e488fba34f40dc0b72a85c33)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-31 12:26:40 +01:00
Chris Larson 31521d7484 More 'is' fixups
(Bitbake rev: 967cd1aa2c59f15d805862bd9935f507c635c762)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-31 12:23:24 +01:00
Chris Larson 67fac77e10 Fix more incorrect usages of 'is'
(Bitbake rev: a26a2f548419af0e971ad21ec0a29e5245fe307f)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-31 12:23:23 +01:00
Chris Larson 626b96e255 codeparser: use ==, not 'is' to compare strings
(Bitbake rev: 8f5cf3a9975d8e6878e403be0e6edc22cc44f396)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-31 12:23:19 +01:00
Chris Larson af0163c2b6 bb.siggen: import os
(Bitbake rev: cd274f653c677daa69b2e15ffed803b7b1d25a43)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-31 12:21:55 +01:00
Chris Larson 8fae39c6a1 utils: fix typo in lockfile
(Bitbake rev: 53a10b6793c5bdb45854483abe5da791058dfd84)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-31 12:21:53 +01:00
Chris Larson d38968c4fc lockfile: ask for forgiveness, not permission
Create the lockfile directory if it doesn't exist, rather than erroring out if
it doesn't exist (was also racy).

Also improve the wording of the error message shown when the lockfile's
directory is not writable.

Note for the future, this function should be improved, particularly with
regard to its exception handling. It should be catching the *exact*
exception(s) it will encounter when the file is locked, and continuing in that
case only. If it did that, there'd be no need for the proactive directory
writability check, as bb.utils.lockfile() would raise an appropriate IOError
for that case.

(Bitbake rev: 238151441c74db53d6e4d4753f4f96c32f6f13b6)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-31 12:21:52 +01:00
Chris Larson 77513ee5f0 goggle: exit quietly on ^C
(Bitbake rev: bdd10e9b357417774f30cc52e89e3fa83bbbbfc0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-31 12:20:54 +01:00
Paul Eggleton b4268c08c3 bitbake/runqueue: fix clash when setscene & real tasks done in same build
If a build causes a real task to be run when the setscene task has already
run then it was possible for dependent packages to be rebuilding at the same
time as a rebuild of the packages they depended on, resulting in failures
when files were missing. This change looks in the setscene covered list and
removes anything where a dependency of the real task is going to be run (e.g.
do_install is going to be run even though the setscene equivalent of
do_populate_sysroot has already been run).

As an additional safeguard we also delete the stamp file for the setscene
task under these circumstances.

Fixes [YOCTO #792]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-03-29 14:01:56 +01:00
Richard Purdie e41671ea1d Revert "bitbake/gcc: Enable a shared common source tree"
This reverts commit 12b163dbd8 as it
was an unintended change for master
2011-03-29 00:34:11 +01:00
Richard Purdie 12b163dbd8 bitbake/gcc: Enable a shared common source tree
This patch is a quick proof of concept to show how source code could
be shared between recipes which use ${B} to have a separate build
directory compared to source directory ${S}.

Issues:

a) gcc uses sed and creates config files against ${S} which means
the directory should not be shared. Need to change the way that works.

b) Could be extended to cover eglibc except there is a patch applied
against nativesdk versions which again makes the source incompatible.

c) Need to clean up the layout in work-shared and make a directory level deeper
to ensure patch separation.

d) clean task does not remove stamps

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-28 15:09:50 +01:00
Darren Hart b26640f30a bitbake docs: use dblatex to build the pdf bitbake manual
Fix [BUGID #593]

The current manual build fails for printing formats which use latex as an
intermediate format. This bug has been reported in multiple locations and I
haven't found a solution posted to any of them.

Using --with-dblatex uses dblatex to make the conversion and successfully
generates the pdf. It adds a dependency on dblatex and its dependencies.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Joshua Lock <josh@linux.intel.com>
2011-03-16 16:09:46 +00:00
Paul Eggleton 9d9c68e353 bitbake/runqueue: show correct task name for setscene task failure
If a setscene task failed previously it was showing an incorrect task
name in the error line. This patch ensures we show the correct name, also
including the "_setscene" suffix.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-03-15 13:18:47 +00:00
Joshua Lock 7da9f27c37 bitbake/xmlrpc: only use BBTransport for affected Python versions
Upstream have fixed the xmlrpclip.Transport() bug from Python #8194 for
the Python 2.7.2 release, therefore as we know which versions of the
standard library are affected we can only use our copy/paste class when
it's needed.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-03-14 20:48:37 +00:00
Joshua Lock e58b3a4804 bitbake/bitbake-layers: fix to run with recent changes
This patch marks the bitbake-layers script as executable and fixes the
instantiation of the BBCooker to match recent changes in the BitBake
libraries.

I've also added a brief header which demonstrates the intent and usage
as taken from Chris Larson's original commit message.

Note: this fix is not upstreamable, it's only required in Poky because of an
outstanding difference between BitBake master and Poky's BitBake.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-03-14 20:48:27 +00:00
Joshua Lock ff3e326269 bitbake/hob: fix cancel button
An accidental logic inversion (aka thinko) had the cancel button only
cancel a build when the user didn't confirm the cancellation (i.e. clicked
no)...

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-03-14 20:48:14 +00:00
Joshua Lock 3c113f355b bitbake/cooker: don't error in prepareTreeData for unbuildable targets
Set abort to False in prepareTreeData so that unbuildable targets do not
raise an exception.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-03-14 20:48:02 +00:00
Richard Purdie 4f28cd2d18 bitbake/fetch2/local: Fix inverted update required logic
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-09 11:01:35 -08:00
Richard Purdie a778fb3115 bitbake/fetch2: Allow local file:// urls to be found on mirrors
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-08 11:23:34 -08:00
Chris Larson 05d1ac23aa bitbake-layers: drop 2.6 from #!, per Joshua Lock
(Bitbake rev: 898f557cbd443cdeff137fd926aac06f2aaee6c4)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-03 22:51:35 +00:00
Khem Raj 54e10127c4 fetch, fetch2: Get rid of DeprecationWarning notice
* This patch fixes a cosmetic issue currently we get with master

WARNING: /home/kraj/work/bitbake/lib/bb/fetch2/__init__.py:733:
DeprecationWarning: Call to deprecated function bb.mkdirhier: Please use bb.utils.mkdirhier instead.  bb.mkdirhier("%s/%s" % (rootdir, destdir))

(Bitbake rev: 36fe59ce314c295d239b76de34c8714def2c32d5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-03 22:51:33 +00:00
Chris Larson c07a153e72 build: add missing newline
(Bitbake rev: a7aa0415bdaa458a941004bf8dd8bbfeddd6ef5a)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-03 22:51:28 +00:00
Chris Larson 043b70419e build: switch to old cwd handling
We want this to ensure the user can run the run. script from anywhere.

(Bitbake rev: a600b79ecefc95eeb266c3f362c7160fa8c948c1)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-03 22:48:39 +00:00
Richard Purdie 1b08a7eb8b bitbake/cache/runqueue.py: Move workload for recipe parsing to the child process
Parsing the recipe in the parent before forking off the child worker
can mean the parent doesn't hit the idle loop and becomes a bottleneck
when lauching many short lived processes.

The reason we need this in the parent is to figure out the fakeroot
environmental options. To address this, add the fakeroot variables
to the cache and move recipe loadData into the child task.

For a poky-image-sato build this results in about a 2 minute speedup
(1.8%).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-28 20:48:08 +00:00
Joshua Lock 7738e86e8b bitbake/hob: only show one progress dialog when changing machine
Remove a spurious signal emission which resulted in two progress dialogs
being shown after changing the machine.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-25 15:24:32 -08:00
Richard Purdie 9166b9e32f bitbake/utils.py: Only try and add read access to a file if we don't have it
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-25 17:24:34 +00:00
Richard Purdie 2069a29a82 bitbake/utils.py: Allow join_deps to return a list that isn't comman separated
Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
2011-02-25 16:34:38 +00:00
Joshua Lock 92d5e6c07f bitbake/codeparser: fix raising of ShellSyntaxError
To raise the ShellSyntaxError we need to import it's module and reference it
by namespace.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-25 15:38:29 +00:00
Joshua Lock 08c7a59b5a bitbake/cache: bump cache version after recent changes
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 16:02:13 +00:00
Joshua Lock f258cedfe8 bitbake/progress: make progress dialog modal for parent window
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:53 +00:00
Joshua Lock 6dbceb0be9 bitbake: Add new UI hob, a prototype Gtk+ GUI for creating images
Hob is a first stab at implementing an interactive GUI for BitBake.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:53 +00:00
Joshua Lock c2814caa5d bitbake/cooker: don't drop possible_world ref count
We need this if we want to run the buildWorldTargetList function more than
once, for example in a UI where we can change the MACHINE and DISTRO as much
as we like before triggering a build.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:53 +00:00
Joshua Lock fb62c54e13 bitbake/progress: add method to pulse the progress bar
When we're running a long operation with indeterminate duration it's useful
to use the gtk.ProgressBar's pulse method to show that something is happening
but we don't know how long it will take.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:53 +00:00
Joshua Lock 7f8aa691c5 bitbake/crumbs: update documentation header
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:52 +00:00
Joshua Lock b14cda62d0 bitbake/event: fix some whitespace issues
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:52 +00:00
Joshua Lock 9b43eaff99 bitbake: introduce crumbs.TaskListModel a gtk.ListStore subclass
Provide a gtk.ListStore subclass which includes a function,
populate(), which takes as input the data emitted by
bb.event.TargetsTreeGenerated and fills the ListStore model
appropriately.
Furthermore convenience functions are provided by which the caller can
get gtk.TreeModel subclasses which provide filtered views of the data.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:52 +00:00
Joshua Lock a13304e1c6 bitbake/[cooker|cache]: cache summary, license and group. Add to targets tree
Add summary, license and group metadata to RecipeInfo and the cache.
Unfortunately this impacts parse speed but gives us a much richer set of
metadata to expose through UI's which can be accessed via the
generateTargetsTree command.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:51 +00:00
Joshua Lock 3c1a3b0724 bitbake/cooker: reduce code duplication
Move runqueua and taskdata initialisation into a new function,
prepareTreeData(), so that generateDepTreeData() and
generateTargetsTreeData() are not duplicating the same logic.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:51 +00:00
Joshua Lock dcfc5ae7b1 bitbake/cooker: add generateTargetsTree method
The generateTargetsTree() command needs to return a model which includes more
metadata than the one generated by generateDepTree().

This patch adds a new method generateTargetsTreeData() to the cooker, based
on generateDepData(), and switches generateTargetsTree() to use it.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:51 +00:00
Joshua Lock 3939a216a5 bitbake: implement command to find configuration files for a config variable
Some configuration variables (MACHINE, MACHINE-SDK and DISTRO) set which
confguration files bitbake should use.
The added command , findConfigFiles, enables a UI to query which files are
suitable values for a specified parameter.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:51 +00:00
Joshua Lock 1b3eb0c35f bitbake: implement command to get all possible targets and their dependencies
Add a new command generateTargetsTree() which returns a dependency tree of
possible targets (tasks and recipes) as well as their dependency information.

Optional parameter 'klass' also ensures any recipes which inherit the
specified class path (i.e. 'classes/image.bbclass') are included in the model

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:50 +00:00
Joshua Lock 920c402342 bitbake/cache: store a list of inherited files in the cache
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2011-02-24 15:54:50 +00:00
Paul Eggleton edd64c7e86 bitbake/server/none: fix getEvent() to return events
In the none server, events don't get processed unless the idle_commands
function gets called, which previously wasn't happening with getEvent();
thus UIs that use this to get events were not working.

Fixes [BUGID #561]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-02-24 15:53:58 +00:00
Paul Eggleton febb7f2632 bitbake/server/none: remove leftover XMLRPC bits from none server
Remove some comments, imports etc. to do with XMLRPC (inherited from xmlrpc.py
which this file was based upon.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-02-24 14:32:01 +00:00
Richard Purdie 91c0b3a2e6 bitbake/build.py: Fix TaskFailed parameters
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-23 15:06:34 +00:00
Richard Purdie 101b599110 bitbake/data_smart: Improve Variable expansion error handling
If expanding a variable triggers an exception the caller currently has no
way to supress the error message or otherwise handle the siutation. An
example of where this is a problem is "bitbake -e" showing tracebacks and
errors for variables like SRCPV in OE/Poky.

Secondly in a chained expansion fails, log mesages are recorded for
every step of the expansion, not just the innermost error which is
where the real failure occured.

To fix this we introduce a new exception ExpansionError which callers
can handle as appropriate.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-23 13:13:31 +00:00
Richard Purdie 6ea24f04cd bitbake/data_smart: Improve the way lazyassignment works
Currently, if a variable has been set with ??= and the code looks it up
before the data finalisation phase, no value is found. This is causes
serious problems for anonymous python functions which manipulate data, or
for the fetcher revision handling code where revisions can be set with
??=.

There is also a significant performance implication for processing lazy
assignment in finalise.

Moving the check for a default value into getVarFlag addresses both
the timing issue and the performace. This change gives a 7% real time
performance improvement to parsing the Poky metadata. The cost of the
check at this point is minimal since we have all the data flags available.

This should also fix Yocto bug 752.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-23 11:48:01 +00:00
Richard Purdie 707132c60a bitbake/fetch2: Ensure SRCREV_pn-PN is checked for a revision when the SRC_URI is unnamed
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-23 11:47:50 +00:00
Richard Purdie 56a92105fe bitbake/cooker: Fix parsing failure zombie problem
When parsing if a SystemExit event is triggered, it causes the parsing thread to
exit and the main process hangs waiting for it to finish indefintely. Add code to
catch BaseExceptions and raise these with the main process gracefully instead
of just hanging indefinitely with zombie processes.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-23 11:09:07 +00:00
Richard Purdie c0f0a8ee0c bitbake/BBHandler: Improve handling of multiline comments and warn users of the change
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-22 21:45:28 +00:00
Richard Purdie 4b6de47e73 bitbake/runqueue: Drop PATH override. This was needed for the exec() change but not now we use fork()
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-21 17:26:18 +00:00
Chris Larson 05c4692320 siggen: add bb.data, bb.parse imports
(Bitbake rev: 8eafb12208fcd073f930c0c74f25831d02c02198)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-21 13:49:56 +00:00
Chris Larson c538800fd5 uihelper: import bb.build, kill commented lines
(Bitbake rev: 718448e96d714adf8aaecedac5cb77c7f36b9cdb)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-21 13:49:04 +00:00
Chris Larson 5f73918d99 runqueue: simplify RunQueueStats.copy
(Bitbake rev: 778571f155139fcf43d0e30e875c39d6592ae03f)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-21 13:48:52 +00:00
Chris Larson 0f42f6b640 runqueue: pass a copy of the RunQueueStats to events
This avoids cases where the stats are modified after the event is fired but
before it's dispatched to the UI.

(Bitbake rev: 1954f182687a0bd429175dda87f05d8a94bb403a)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-21 13:48:39 +00:00
Richard Purdie 359a4d8bf7 bitbake/runqueue.py: Move SIGCHLD handler to wrap none server sleep call
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-18 11:54:28 +00:00
Richard Purdie 3ef2d39dbf bitbake/fecth2: Ensure BB_FETCH_PREMIRRORONLY being set as false is handled correctly
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-16 12:35:35 +00:00
Richard Purdie 7e4c694c9f bitbake/runqueue.py: Ensure child has the default SIGCHLD handler restored
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-16 12:33:40 +00:00
Richard Purdie 974ea1a190 bitbake/runqueue: When we successfully fork off a task and there are more processes we can start do so immediately
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-15 23:20:54 +00:00
Richard Purdie 5a178b547b bitbake/runqueue: When we have successfully collected a pid value return True to ensure we don't sleep in the main loop
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-15 23:20:20 +00:00
Richard Purdie 03d40a4a7b bitbake/runqueue: Add a SIGCHLD handler to ensure we wake from sleeps for SIGCHLD events
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-15 23:19:43 +00:00
Richard Purdie 579ecccc22 bitbake/cooker: Ensure delays are accurately transfered to the idle loops from runqueue
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-15 23:18:39 +00:00
Richard Purdie 6cb8fd6def process.py: Avoid deprecation warning
bitbake/lib/bb/process.py:15: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-14 16:32:07 +00:00
Richard Purdie b9a97e07b4 bitbake/fetch2: Revert part of the unpack change until the issues with it are resolved
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-13 00:05:06 +00:00
Mark Hatle 3faa635fd4 fetch2: unpack revision
Revise the unpack function to have a way to disable the unpack.  This is
based on the work from "Andreas Oberritter <obi@opendreambox.org>", see
http://cgit.openembedded.net/cgit.cgi/openembedded/commit/?id=2bdfe8519eda8067845019a699acdf19a21ba380

In addition, the to_boolean function comes from the work of
"Chris Larson <chris_larson@mentor.com>", see
http://cgit.openembedded.net/cgit.cgi/openembedded/commit/?id=900cc29b603691eb3a077cb660545ead3715ed54

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-12 00:30:29 +00:00
Richard Purdie 029f19bd3d bitbake/fetch2: Add explict network access exception and handling to give users usable error messages
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11 22:08:21 +00:00
Richard Purdie 4a226460d5 bitbake/fetch2: Fix message about md5 checksums when sha256 is incorrect
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11 21:59:23 +00:00
Richard Purdie 132ec8d3b7 bitbake/fetch2: Fix patch merge error
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11 16:24:26 +00:00
Richard Purdie a72d49478e bitbake/fetch2: Add some debug output so its clear when PREMIRRORS, upstream and MIRRORS are being used
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11 16:16:51 +00:00
Richard Purdie 20afb21a37 bitbake/fetch2: Ensure network access status is reset for each loop iteration in download()
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11 16:15:36 +00:00
Richard Purdie 05d8b6422d bitbake/fetch2/wget: Fix missing string parameter reference
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11 12:16:44 +00:00
Richard Purdie ea70c4362f bitbake/fetch2: Ensure failed fetch attempts are logged in the debug logs
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11 12:14:20 +00:00
Richard Purdie 7f30131faa bitbake/fetch2: Correctly handle git mirror tarball fetching
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11 12:06:44 +00:00
Richard Purdie 20ab1cb0ca bitbake/fetch2: Pass over malformatted (empty) mirror url lines
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11 12:04:59 +00:00
Richard Purdie b42ba2f95c bitbake: Remove bad commit hunk from old cvs fetcher
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 23:53:17 +00:00
Saul Wold 14dea89521 fetch2: Correct the clean() mechanism for the fetcher2 code
This create a clean() method in each of the fetcher modules
and correctly cleans the .done stamp file and lock files

Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-02-10 23:49:25 +00:00
Javier Martin f1bbea4ab0 Export KRB5CCNAME variable
This allows fetching git repositories using Kerberos authentication.

(Bitbake rev: d761cf98284b02eb3d3a1f879782c501c284b698)

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 22:35:44 +00:00
Javier Martin aacbe3f35e Fix comparison with SRCREVINACTION constant
Use '==' instead of 'is', otherwise it will always return
true since 'rev' and "SRCREVINACTION" are not the same object.

(Bitbake rev: f30b3af975a071d1584817054a2996f08a3aba4f)

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 22:35:28 +00:00
Chris Larson c68c5f6e31 persist_data: kill unreachable break line
(Bitbake rev: 7486b38603f2766adaf976a9f95e9276c83abe31)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 22:35:12 +00:00
Chris Larson afdbb02693 bitbake-layers: fix bug with env vars leaking in
I forgot that bin/bitbake is what does the environment filtering based upon
BB_ENV_WHITELIST, etc.

(Bitbake rev: 2cc6b6951bd17832866ec710029d119d2df31ba4)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 22:34:24 +00:00
Chris Larson 882ac1afea cache: fix docstring usage
Use comments instead of docstrings where appropriate in CacheData.

(Bitbake rev: 088d516e02bb2b4ce8a50bbaa967e944c46e620b)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 22:34:10 +00:00
Chris Larson 68bd406962 Add initial bitbake-layers script
This script has subcommands which operate against your bitbake layers, either
displaying useful information, or acting against them.  Currently, it only
provides a show_appends command, which shows you what bbappends are in effect,
and warns you if you have appends which are not being utilized.

Currently, a bug exists when using this due to the DataContext stuff, but I'm
not certain as to the root cause, it appears to be the bb package relying
implicitly on the way the bitbake script does things.  A fix for that issue
will be forthcoming, as will further subcommands.

(Bitbake rev: 78b6d4cb26cec3321f8eec9889205a6b93b2ee18)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 22:33:43 +00:00
Chris Larson 1385162cd2 persist_data: loop on database lock for table creation
(Bitbake rev: d93fcbd64ab5d806288424170f55323b4297e7d6)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 22:32:12 +00:00
Richard Purdie 59a08262ab bitbake/fetch2/git: Write mirror tarballs if enabled and they don't exist, also set a default value for mirror tarball generation
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 15:24:31 +00:00
Richard Purdie 296866c38e image-swab: Convert to attach strace to the process to obtain the required swabber data
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 11:51:48 +00:00
Richard Purdie 29ed2c6e9a bitbake/fetch2: Fix negated if check for BB_FETCH_PREMIRRORONLY
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-09 01:23:56 +00:00
Mark Hatle 906285ff00 fetch2: Add SRPM knowledge
Enable the fetcher to be able to unpack and SRPM.  By default the system will
unpack the contents of the SRPM into the WORKDIR.

A new syntax "unpack=file" was developed for the SRC_URI, to allow for a
recipe to extract a specific file within an SRPM.  An unpack operation will
then be executed on the extracted file.

In order to apply extracted patches (or unpack files not specified with
unpack), you must specify the path using WORKDIR, i.e.:

file://${WORKDIR}/mypatch.patch

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-08 18:01:35 +00:00
Saul Wold 07088f7711 bitbake/utils.py: add glob name matching to remove
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-02-08 17:35:49 +00:00
Richard Purdie aa45760702 bitbake/fetch2: Ignore UnboundLocalError in exception handler in try_mirror
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08 17:30:45 +00:00
Richard Purdie ee1a9c0476 bitbake/fetch2: Move symlink handling into try_mirror where is belongs instead of the main download function
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08 14:02:16 +00:00
Richard Purdie c4e66a7fe0 bitbake/fetch2: When using BB_FETCH_PREMIRRORONLY, set BB_NO_NETWORK after premirrors as there could be data processing needed by the real fetcher
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08 14:02:16 +00:00
Richard Purdie 91eeb9b0d3 bitbake/fetch2: Ensure we only remove files, not directories when fetch failures occur
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08 14:02:16 +00:00
Richard Purdie 0713fb6b99 bitbake/fetch2: Ensure original ud is preserved in try_mirror
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08 14:02:16 +00:00
Richard Purdie a235c67479 bitbake/fetch2/git: Fix broken variable reference
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08 12:05:35 +00:00