Commit Graph

431 Commits

Author SHA1 Message Date
Bernhard Reutner-Fischer 186f857466 cooker: use time.strftime() instead of spawing sh with date
time.strftime() defaults to using time.localtime(), use that instead
of spawning "sh -c 'date +<FMT>'"

(Bitbake rev: ec1f2773b4811b3beb52710120bb5a9b215c174e)

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
Chris Larson 0405011734 Adjust the exception handling based on Cliff Brake's patch
Rather than printing the exception ourselves, might as well re-raise and let
the default exception handler do it for us.

(Bitbake rev: acca7eb8450cbe30d65b5b266f1a642e7965df8a)

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
Robert P. J. Day 6ab1dbbb7c Fix a couple typos in the CVS Fetcher section.
"DL_DIRS" -> "DL_DIR"
Remove superfluous trailing ">" after CVSDIR.

(Bitbake rev: 34f396e749303367e657911bf10c43086dff7552)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
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 16553b8826 cache: do not chdir unnecessarily
previously we called chdir() twice for every target, this patch reduces
the amount of chdir() calls via openembedded master from some 16000 to
4.

(Bitbake rev: fa45f5625e13a82bec70d5f10815f52fbe705166)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@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:35 +01:00
Bernhard Reutner-Fischer 726802b980 persist_data: cache connection and use cursor
Store database connection to persistent database in fetcher.

(Bitbake rev: 8a6876752b90efd81d92f0947bfc9527d8260969)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@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:35 +01:00
Bernhard Reutner-Fischer 30216c65e5 cache: use a set() for __depends
to make updating depends easier/more intuitive/eventually faster

(Bitbake rev: f7c69462b8ba726861898817cc5b13174c78e35a)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@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:35 +01:00
Bernhard Reutner-Fischer cf79cf127b cache: use max() to determine newest_mtime
(Bitbake rev: c0cf85beda4cf8748fd270c037442cde7b98146b)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@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:35 +01:00
Bernhard Reutner-Fischer 81d13cbebe cache: use os.path ops instead of stat
(Bitbake rev: 09fe0d403c75229931c10eabc7eecc0dc60058fe)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@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:35 +01:00
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 6f52061844 Fix the debug level check in print_exception
(Bitbake rev: 9cb52edf9198fe6db735abbb61d0c4026c97a8d9)

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 231d3a534c Drop an unnecessary second python version check and use the less ugly sys.version_info
(Bitbake rev: 8f4b7b10f8740a41c085beeca5105f15204b0979)

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 51864054da Move the python version check before the module imports, in case the modules utilize the newer python features
(Bitbake rev: 87c15dfcbeb10e7cafb14726209e4954671b3dbe)

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 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 ba6df176e3 Ignore deprecation warnings for now
(Bitbake rev: 661fe59445161c5bc6a2e73b7fcbf9d20c492e27)

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 316ab4bb2b Bump minimum python version check to 2.6.
(Bitbake rev: 85c000cc7db47cfd489cf282c58db2dab0d87908)

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 a91d123ef4 Display python warnings via bb.msg
(Bitbake rev: 648415a562d92109c4945cb3cc98ed2ec44667a7)

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 21a9692c7d Use __import__ for the ui rather than exec
(Bitbake rev: 7d00bab300961431f9960cf6759966f608580bc0)

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 00e3915ca6 Initialize pkgs_to_build in the BBConfiguration constructor
(Bitbake rev: 69a3e4895b88110fd3a25167aa16cf7c00463175)

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 6418d0492a bitbake: create cooker object after cleaning the environment
Previously, the cooker object was created before the environment was
cleaned, saving everything that was in the environment and dumping
into the run scripts.

The patch ensures that the cooker gets a cleaned environment when it's
created.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-06-29 13:33:24 +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
Richard Purdie cefeeb1aa3 usermanual.xml: Add documentation on bblayers.conf
(Bitbake rev: 879229d12c2830dba9e0cb794e61e3c698b8dcc7)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:25:30 +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