Commit Graph

401 Commits

Author SHA1 Message Date
Chris Larson 9d32ff0c87 Make the file not found error actually useable.
(Bitbake rev: 1cfcbee014478eb129ed382c13622317412b036e)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:35 +01:00
Bernhard Reutner-Fischer 85ca18f60a fetch: commentary typo fix in fetcher_init()
(Bitbake rev: b786f1f60fb50565295e7c8e979b471327d924f3)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:35 +01:00
Bernhard Reutner-Fischer 6c37c32773 cache: fix typo in error message of cacheValidUpdate()
(Bitbake rev: 9937d5992d72104c670e069f4c46cc62a490e18f)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:35 +01:00
Bernhard Reutner-Fischer a7ad7cfb2f fetch: documentation typo fix
s/initilize/initialize/

(Bitbake rev: 1497dd0d5bc0cca0de7d0ee9d314287000a0c34d)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Khem Raj f7e6c5ad2b fetch: Check for existence of tar file along with md5 signature
(Bitbake rev: a5b1c0605328660de15bb8127b6f7d798c664d32)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson 50006b49fc Revert "In expand, drop the unnecessary second regular expression match"
This reverts commit 05462fa7908fc22988b3dc9d376798d0a46ccb5a.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson d217bedd32 Don't emit vars starting with __, as those are internal
(Bitbake rev: 211f44ce0e15c7c419606e9ef3568d9cea6775b7)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson d00b54b948 In expand, drop the unnecessary second regular expression match
(Bitbake rev: 05462fa7908fc22988b3dc9d376798d0a46ccb5a)

Signed-off-by: Imran Mehmood <imran_mehmood@mentor.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson e07a5b1909 Simplify _findVar a bit
(Bitbake rev: b017acd39b811a00305002a8044e7d02e79f41d7)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson 66d66cb487 Fix major bug that slipped in when moving update_data
The root cause is, I was testing the use of renameVar() from finalize, in
order to get flags copied over when an override is applied, but renameVar
removes the original, whereas the old code did not do so.  Going back to the
old method, will revisit the override/flags later on.

(Bitbake rev: 2f7c498abcf675e5b8de197d8056a0581670c2bd)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson 4802a9d07a Move a var definition in cooker.parse_next
(Bitbake rev: 1b378ddf3dc9b2aa5384e8b28945b63fc623a6a4)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson 8bc7ebb4ae Enhance the expansion exception message
(Bitbake rev: 1cc11164a85a5b30d6b9184cb5a8f7f7ac1aaff2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson 1e7a03cb58 For ${@}, run str() on the result
(Bitbake rev: cf1a51eab11f645c95e5fa278221f78c129b9dd1)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson 15248f3e7d Allow emission of non-string objects in emit_var, instead running str() on it first
(Bitbake rev: 5b09e28cb4a2c6c99ad58e71fb803160922a7e1e)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson 9d3f301423 emit_env: clean up, iterate once
(Bitbake rev: db718ec6f67c7c0d0efb4ba0b5b24384f707dcf5)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson c3eae29efa Don't try to expand non-string values
(Bitbake rev: fe36a726b9f930bbd6fd758c0aee78559e95f02b)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson 214d1f7433 Move the python version check into the python package
This ensures the check is run for anyone using the package, including
setup.py, though it's sad that it's necessary, since all it really wants is
__version__.

Ideally, we'd avoid the version check entirely in favor of checking for
functionality, but that's rather difficult with language constructs like
context managers, so this'll do for now.

(Bitbake rev: f936f1c0edf70860ea0f39ec1a500ba43b56f289)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson bdbeaf4760 Bump version to 1.11.0
(Bitbake rev: 6c89c332664a7789d02a701e7e530838ab778264)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:34 +01:00
Chris Larson c04cee7ce8 Search up the directory tree for bblayers.conf
(Bitbake rev: 1c6b31c649474b4c2b63ef9d9311e61de20bc8c2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson 3238125138 Add a hack to avoid the req that all vars using LAYERDIR be immediately expanded
See the comment in the code for details.

(Bitbake rev: 849dbd63244cbc4eaca0f1beedbb67baca024629)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson dc39ebe91e Move the unset BBPATH sanity check after the bblayers processing
This way we can fully utilize bblayers, you can do everything in bblayers.conf
and avoid setting any environment variables at all.

(Bitbake rev: 5def1c8c31432968349f9b29d6333d7962260a8b)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson 22a2179905 Kill unnecessary usages of the types module
types.IntType -> int
types.StringType -> basestring
...

Also moves our ImmutableTypes tuple into our own namespace.

(Bitbake rev: 83674a3a5564ecb1f9d2c9b2d5b1eeb3c31272ab)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson 1180bab54e Apply some 2to3 transforms that don't cause issues in 2.6
(Bitbake rev: d39ab776e7ceaefc8361150151cf0892dcb70d9c)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson 5b216c8000 Add __contains__ to COWDictMeta
(Bitbake rev: b3b314aade1f0a04e888361e1ac946e5195e1509)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson d5927a70bb Drop unused bb.data.expandData function
(Bitbake rev: 188af3ef5fdb5cd86b74147bf5eafc085ac489be)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson bcd9c57a96 Switch some references to moved functions
(Bitbake rev: ddea2978cb969cf1381cfee5c055de0c9e56a4e3)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson c770c62fdc Add a missing import of print_function
(Bitbake rev: 30ae747cc5c733512e417c61fca23c0cd15b0e44)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson ad543e2e41 Apply the 2to3 print function transform
(Bitbake rev: ff2e28d0d9723ccd0e9dd635447b6d889cc9f597)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson 978b5c9466 Deprecate the usage of certain objects via certain modules
As an example, this displays a deprecation warning for the use of
"bb.encodeurl" when you should be using "bb.fetch.encodeurl".  It includes a
convenience function for this purpose.  It should be of use when moving
objects between modules permanently, changing the API the user sees.

(Bitbake rev: 78f56049ba863b2e585b89db12b32697eb879bbc)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson cbc8140c77 Exception handling fixups
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson cf58d41af8 Add some missing docstrings
(Bitbake rev: 20b6f2d1d2d4541e612e8cffbdf1ca4822a3e394)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson 0b4ad7062b Drop __all__ usage
(Bitbake rev: b4983cc7bfe5300c1d2904f34fb03d4fb2f41d90)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson 266f416446 Drop some unused functions
(Bitbake rev: eb83df5bc7077685f314df01949cf06850e4693c)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson bbc565e825 Drop some unused classes
(Bitbake rev: 5cc47a49518c69c94f8b78e9dda6d542ba17b1e8)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 51f5346f29 Drop some unused vars
(Bitbake rev: b79ca5f1cc2d262de877047769ce25279ba26672)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 1c74fd768f Import fixups
(Bitbake rev: 4fa052f426e3205ebace713eaa22deddc0420e8a)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 7acc132cac Formatting cleanups
(Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson bbf83fd988 Drop doctest, as we aren't utilizing it
We should add back in some proper unit testing.  Doctest is rather limited,
and we haven't actually made use of it since the original implementation of
the datastore when the project started, as far as I'm aware.

(Bitbake rev: 3a11c2807972bbbddffde2fa67fc380d159da467)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 8306ba50db Don't run metadata event handlers for bb.msg events
(Bitbake rev: 297305b3742323d09d9ca58e958c4f18e945a148)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 6623d79ada Stop using functions via 'bb' that were moved from there to other modules
(Bitbake rev: 03a6c26f8da226f442c3cab557e4733f7cd6eeac)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 1569c1ac85 Add a function to get the debug level, without poking into debug_levels manually
(Bitbake rev: 6ccc01a1a72ec354de52fef2bf5620384b8461ce)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson c8498f59ec Fix invalid logging domain warning
(Bitbake rev: 8441fab6f27191fcc3c153a10753871e6aef08b1)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 350c3126e1 Make the default domain a proper domain, not a string
This lets you do -l Default on the commandline to bump the debug level of
messages with no domain, without bumping the level of everything else.

(Bitbake rev: bef33dfc36713d8c93e38e63ddac2e4f9858e787)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 943ece8610 Implement bb.msg.domain as a named tuple, drop the Enum class
Also fixes some bb.msg references from within bb.msg.

(Bitbake rev: db95af590f742c8186e84046ad9704fae1733720)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 9f2d7d816c Fix an error in the ncurses UI
(Bitbake rev: 90c68238cb62afa1c39e1d4fff1f418c9ec047e5)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 146046bcda Immediately display messages if no UI handlers are installed yet
(Bitbake rev: 17c414d0c050c42d4beb3f1dd84573020aacb392)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson 8c5108fa21 Fix the task event handling in the ncurses UI
(Bitbake rev: 50b7b817d418532583da3bad62a36fcefe3637a2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson 87f62d7c8d Ensure we always utilize the correct messaging domains
(Bitbake rev: 92a2e2e90981c0615171abe03645a772d84f6986)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson ac170b0c34 bb.event: NotHandled and Handled are on the way out
(Bitbake rev: ed35b30f8e09b0bfc15102fa6483c55d6b7d61de)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson 0d25a516b4 Rename the finalise method for consistency
Apparently the finalise spelling is becoming less common in British English.

(Bitbake rev: 47449b2fc433e5725839ca4f7e9bca931a475838)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson c9c230b14a Move update_data into the DataSmart class as a finalize() method
(Bitbake rev: ff801397785567cb84b3615de86bff764d65decf)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson a21841fb75 Drop doctest, as we aren't utilizing it
We should add back in some proper unit testing.  Doctest is rather limited,
and we haven't actually made use of it since the original implementation of
the datastore when the project started, as far as I'm aware.

(Bitbake rev: 3a11c2807972bbbddffde2fa67fc380d159da467)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Enrico Scholz ca9a956abc Made '-b' work with BBCLASSEXTEND
When BBCLASSEXTEND is set, '-b' builds usually failed with messages
like

| ERROR: Parsing error data_fn virtual:native:<recipe>.bb and fn
<recipe>.bb don't match
|
|   File ".../bb/providers.py", line 47, in sortPriorities
|     priority = dataCache.bbfile_priority[f]
| KeyError: 'virtual:native:<recipe>.bb'

This patch fixes it and allows to specify the alternative class in a
way like

| ./bitbake -b virtual:native:<recipe>.bb

This patch was written to be so minimal as possible; variables should be
probably renamed to reflect their new meaning.

(Bitbake rev: f1c7fe9fc12161ceb3fe201cde370b929b208729)

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson a7f05ea4af Resurrect the old bb.vercmp as bb.utils.vercmp, and its deps
This is just for compatibility.  We may drop it in the future, or rewrite it,
as it's not particularly pythonic.

(Bitbake rev: c4e31d7fe1d15a1e3ef2a453e7c7812d403d22cb)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson 2cd161171a Pass the config metadata into the Cache constructor rather than the cooker
Cache only uses the config metadata from the cooker, no need for the cooker itself.

(Bitbake rev: bf58d43444642d31293a341ce72292003ca5c162)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson c926e87f47 Resurrect merged anonfunc execution
(Bitbake rev: 0c2ed40277e157406ea25c858f14c3cebb73c21b)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson 3995546222 Add & utilize a simple_exec utility function
(Bitbake rev: 5ead16f14f996bcbb2fb14277b8ce5a9317b8160)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson 94b60d1247 Consolidate the exec/eval bits, switch anonfunc to better_exec, etc
The methodpool, ${@} expansions, anonymous python functions, event handlers
now all run with the same global context, ensuring a consistent environment
for them.  Added a bb.utils.better_eval function which does an eval() with the
same globals as better_exec.

(Bitbake rev: 424d7e267b009cc19b8503eadab782736d9597d0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson eb16773704 Pass an empty locals dict in expansion, since list comprehensions apparently leak their '_' helper variable
(Bitbake rev: 97da0cebbaf4dd1b46e58bd2e80cab6c007ae7c9)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson d8c8612d92 Two minor changes to the way python snippet expansion happens
- Use a single dictionary for the context, both global & local, since for some
  reason it chokes wanting a global "d" rather than a local in the metadata.
- First compile the string into a code object before running eval, so we can
  include the variable name in an evaluation error.

(Bitbake rev: 49534d928a37e0804ca84eed186cd22363023b2e)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Richard Purdie 8a02043265 bitbake: providers.py: Fix typo
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-01 22:24:26 +01:00
Richard Purdie 9a543b75ca bitbake: Add bb.utils.join_deps to handle creation of dependency strings with versions
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-06-30 09:47:36 +01:00
Jeff Dike f9d7e9e3be bitbake: Move the logger initialization from cooker to utils
In order to move the environment cleaning, which wants to log a
message, before cooker creation, the logging facility initialization
needs to happen earlier.  So, it is now in init_logger in utils.py and
called from bitbake before the creation of the data object.

It also seems more correct to initialize a global facility like this
from a more global context than the creation of an object, of which
there could theoretically be many.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-06-29 13:32:04 +01:00
Joshua Lock 43f0d63237 bitbake: allow fakeroot functionality to be provided by an alternative program
If the variable FAKEROOT is set its value will be used, otherwise we default
to fakeroot.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-06-25 14:54:51 +01:00
Nitin A Kamble c3682bf89b bitbake decodeurl: fix the file:// url handling
Without this patch decoding a url of this kind file://dir/filename gives
path=/filename host=dir.
With the patch it decodes as path=/dir/filename host=""

Probably nobody stumbled on this issue yet because nobody used
file:// urls with directory names in the path.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2010-06-07 16:05:00 +01:00
Richard Purdie d3d36d9f44 bitbake/event.py: Run class eventhandlers in the task context but ensure UI handlers run in the server context
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:33:41 +00:00
Richard Purdie 871f731e57 bitbake/cooker.py: Finishing the command needs to happen after the BuildCompleted event else the cooker can shutdown first
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:31:23 +00:00
Richard Purdie fb245be03d cache.py: Bump the cache version after the BBVERSIONS update
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:28:34 +00:00
Richard Purdie 881caec450 bb.manifest: Drop, its unused and obsolete. No point in having dead code around
(Bitbake rev: 69374497b557a5e99ffc7cbe5e075d63e2d9cfaa)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:26:30 +00:00
Chris Larson 19d5f2b067 BBFILES: use a set to remove duplicates when collecting.
(Bitbake rev: b1b06133da4ca379a60775552d481f7fbf77e999)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:26:02 +00:00
Chris Larson adbfce3958 bb/command was importing bb and accessing some of its own classes indirectly as bb.command.<class>
(Bitbake rev: 4b2a268ce8dad63d21619c1b9acc1de86d222d93)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:26:00 +00:00
Chris Larson 1e2f64abc7 Why is bb/__init__.py importing bb?
(Bitbake rev: 3eb01a20cbbb2e7a2f6278089bcc9bb70021738f)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:25:59 +00:00
Chris Larson 964085f701 data_smart: be explicit about what we make available to eval'd python code
(Bitbake rev: 6a73dda60f50e9b3e5513795d1ec7207d1446de2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:25:58 +00:00
Chris Larson 6028daedcb Fix 7 references to undefined variables, as spotted by pyflakes
(Bitbake rev: e1e4ccf203e38070eeafd31a622671996cff61a1)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:25:56 +00:00
Chris Larson c6940a9795 bb.utils: remove old portage remnants
The following utility functions were removed.  Note that in this particular
case we're bypassing a proper deprecation process, as these functions are
clearly not utilized, are obvious remnants of old ways of doing things, and
some of which do not even function properly.

- tokenize
- evaluate
- flatten
- relparse

- ververify
- isjustname
- isspecific
- catpkgsplit
- pkgsplit
- pkgcmp
- dep_parenreduce
- dep_opconvert

(Bitbake rev: 62983ad9b151ee8d51e8cf9a31c736c7813edf16)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:25:54 +00:00
Chris Larson ec3f908948 bb.utils: utilize string.letters and string.digits
(Bitbake rev: 7af05cba87ec9f3ea5e53689b3d9f0a63784d1b5)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:25:51 +00:00
Chris Larson 80a52e7ad6 bb.which: fix broken direction/reverse argument
(Bitbake rev: 4725d83f532cad96168aa9affdedb33b6fc897b7)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:25:50 +00:00
Chris Larson b5f8ce02b7 crumbs: fix hassattr typo
(Bitbake rev: 5593de13a18792e36d15dfd2a9579b36284e4d67)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:25:49 +00:00
Chris Larson c244243274 Implement BBVERSIONS
This implements a feature similar to BBCLASSEXTEND, but for generating
multiple versions of a given recipe.  For example: BBVERSIONS = "1.0 2.0 git".

In addition to the above, one can utilize [a-b] style patterns, and can have a
:<basever> postfix, which allows you to essentially name the range of
versions.  Both the current version and the basever end up in OVERRIDES, and
the basever gets placed into the BPV variable.  The default BPV, if none is
specified, is the original PV of the recipe, before bbversions processing.

In this way, you can do things like:
BBVERSIONS = "1.0.[0-6]:1.0.0+
              1.0.[7-9]:1.0.7+"

SRC_URI_append_1.0.7+ = "file://some_extra_patch.patch;patch=1"

Or you can create a recipe per range, and name the recipe file as such: nano_1.0.7+.bb.

(Bitbake rev: 4ee9a56e16f1eb3c1649eaa3127b09ab0e93d1ec)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:25:45 +00:00
Enrico Scholz 5060280a7a Expand PREMIRRORS
When not expanding PREMIRRORS, the functions fails/does not work correctly
when PREMIRRORS is not a plain string (e.g. contains ${...} or a ${@...}
statements).

(Bitbake rev: d612d22b073f68b8cf1bb7344e0487820040d80d)

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:17:12 +00:00
Bernhard Reutner-Fischer 5d90d90358 utils: improve wording of error message
(Bitbake rev: b2486ec57c6a7adf09d0960fdf6727881b324d2f)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:15:28 +00:00
Richard Purdie 589df80ca1 bitbake: Gross hack to fix packaged-staging with BBCLASSEXTEND packages
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-23 22:33:02 +00:00
Richard Purdie 666c753d4b bitbake/cooker.py: Add support for a bblayers.conf file
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 17:48:31 +00:00
Richard Purdie 70141cbcc8 bitbake/providers: Fix merge error
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 15:09:07 +00:00
Bernhard Reutner-Fischer 04263dc426 cooker: bail out early if no files to build
This prevents a misleading backtrace:
ERROR: no files to build.
Command execution failed: Traceback (most recent call last):
  File ".../bitbake/build/lib/bb/command.py", line 83, in runAsyncCommand
    self.cooker.updateCache()
  File ".../bitbake/build/lib/bb/cooker.py", line 779, in updateCache
    if not self.parser.parse_next():
  File ".../bitbake/build/lib/bb/cooker.py", line 969, in parse_next
    cooker.bb_cache.sync()
UnboundLocalError: local variable 'cooker' referenced before assignment

(Bitbake rev: 060ef3d957615b7eb1209dc0d01ebeb53f8c4edc)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 15:03:46 +00:00
Chris Larson 2f9e15afbe Fix issues with BBCLASSEXTEND set by anonymous python, and rename some variables to improve code clarity
(Bitbake rev: 3062e96181fe845cfd286990b0216888ddd3d228)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 15:03:21 +00:00
Chris Larson 57044b9a62 Implement ??= operator
??= is a lazy, conditional assignment.  Whereas a ?= immediately assigns to
the variable if the variable has not yet been set, ??= does not apply the
default assignment until the end of the parse.  As a result, the final ??= for
a given variable is used, as opposed to the first as in ?=.

Note that the initial implementation relies upon finalise() to apply the
defaults, so a "bitbake -e" without specifying a recipe will not show the
defaults as set by ??=.  Moving application of the default into getVar adds
too large a performance hit.  We may want to revisit this later.

(Bitbake rev: 74f50fbca194c9c72bd2a540f4b9de458cb08e2d)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 15:02:59 +00:00
Chris Larson ada2a8494a Avoid unnecessary calls to keys() when iterating over dictionaries.
dict objects provide an __iter__ method for the iteration which gives you the
keys, so calling keys directly is unnecessary, and isn't really a best
practice.  The only time you really need to call the keys is if there's a
danger of the dict changing out from underneith you, either due to external
forces or due to modification of the iterable in the loop.  Iterations over
os.environ are apparently subject to such changes, so they must continue to
use keys().

As an aside, also switches a couple spots to using sorted() rather than
creating a temporary list with keys() and sorting that.

(Bitbake rev: 5b6ccb16c6e71e23dac6920cd2df994d67c2587b)

Signed-off-by: Chris Larson <clarson@mvista.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 15:01:59 +00:00
Bernhard Reutner-Fischer 9d9b47bae4 knotty: tweak failure phrase
..to make copy and paste of the logfile easier.

(Bitbake rev: 446cc0cebd4daff7f849717f4cb89ac1b4c6b755)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:58:57 +00:00
Chris Larson a7d5f73134 Fix ud.basecmd error introduced by the FETCHCMD_git commit
(Bitbake rev: 0bbcbe3548f39ca46c5aa3bf1a8681026e51cbf0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:58:41 +00:00
Tom Rini dea828c744 Add initial 'repo' fetcher
(Bitbake rev: f68406e864c9837feb56cbec993b620481445cc2)

Signed-off-by: Tom Rini <tom_rini@mentor.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:58:15 +00:00
Chris Larson d8b12d4eea Re-getVar BBCLASSEXTEND after finalise()
This ensures that an anonymous python function is able to manipulate the
BBCLASSEXTEND contents, and, therefore, amend.inc files are able to add to it.

(Bitbake rev: c7d038d404afaf4ce3735af5134163759da6f6ef)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:56:16 +00:00
Chris Larson 73a12b9184 Error early if BBPATH is unset, rather than falling back to share/bitbake
Better to error as early as possible rather than experience strange behavior
resulting from the use of the largely useless stock bitbake.conf/base.bbclass.

(Bitbake rev: 641e6cf3ec3ab4d26929cf4d2a3704ff07eed4d6)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:56:00 +00:00
Chris Larson 9998b454bb Kill unused projectdir in bb package.
(Bitbake rev: 79b93e6929c5feeb1ad05bd17f589c69f00b77f6)

Signed-off-by: Chris Larson <clarson@mvista.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:55:18 +00:00
Chris Larson 8f83be3338 Fix msg usage in the moved utility functions.
(Bitbake rev: 686288444d22091dee66e20ec49b9c53f8c980b7)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:54:57 +00:00
Chris Larson f8c6db95d7 Move most utility functions from bb into bb.utils.
(Bitbake rev: ff720ec59b30671c951dbf3b96df10ef56b8b505)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:54:42 +00:00
Chris Larson b7d175a18a Move compat imports in the bb package to avoid circular dep issues.
(Bitbake rev: b66c129edc7d78fed9d41b0c634744ec81931b21)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:54:26 +00:00
Chris Larson ac392b66a5 Move encodeurl, decodeurl into bb.fetch.
(Bitbake rev: 867d36f9afce2d298874ac7563e5b3852ef04659)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:54:10 +00:00
Chris Larson a3012e1ca9 Move MalformedUrl, VarExpandError into appropriate modules.
(Bitbake rev: e616483b237dafff7f90ba1c09e9ee7c383a2e47)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:53:55 +00:00
Martyn Welch 9a0da388ce Add FETCHCMD parameter for git
The Git fetcher currently hardwires the git command to "git". Allow the
path and any additional wrappers to the Git command to be provided via
FETCHCMD functionality, as with some of the other fetchers.

If FETCHCMD_git is not define in bitbake.conf, the fetcher defaults to "git".

(Bitbake rev: f3afb79ecac30d973a3c62ff6baf28d8b7388a24)

Signed-off-by: Malcolm Crossley <malcolm.crossley@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:53:26 +00:00