bitbake.git
8 years agoadd --pretty=fuller to the "git log command" to add the "CommitDate" to our generated... 1.10-dream
ghost [Thu, 16 Dec 2010 00:39:04 +0000 (01:39 +0100)]
add --pretty=fuller to the "git log command" to add the "CommitDate" to our generated .git/last_commit_info file

8 years agoMerge remote branch 'upstream/1.10' into 1.10-dream
Andreas Oberritter [Wed, 1 Dec 2010 16:05:55 +0000 (16:05 +0000)]
Merge remote branch 'upstream/1.10' into 1.10-dream

8 years agocooker: fix UnboundLocalError
Chris Larson [Fri, 19 Nov 2010 22:51:45 +0000 (15:51 -0700)]
cooker: fix UnboundLocalError

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoFix GraphViz .dot output for rdepends and rrecs
Chris Larson [Thu, 4 Nov 2010 15:47:11 +0000 (08:47 -0700)]
Fix GraphViz .dot output for rdepends and rrecs

Use bb.utils.explode_deps to break up the rdepends and rrecommends strings.
This fixes the same issue which was fixed by a number of patches floating
around, but uses explode_deps rather than regular expressions.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobitbake: lib/bb/fetch/hg: fix fetching from a mercurial repository
Eric BENARD [Mon, 6 Sep 2010 08:51:52 +0000 (08:51 +0000)]
bitbake: lib/bb/fetch/hg: fix fetching from a mercurial repository

* without this fix, we get :
updating working directory
74 files updated, 0 files merged, 0 files removed, 0 files unresolved
abort: There is no Mercurial repository here (.hg not found)!

Signed-off-by: Eric Bénard <eric@eukrea.com>
Tested-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoMerge remote branch 'upstream/1.10' into 1.10-dream
Andreas Oberritter [Wed, 20 Oct 2010 00:09:09 +0000 (00:09 +0000)]
Merge remote branch 'upstream/1.10' into 1.10-dream

9 years agoAdd 1.10.1 entry to ChangeLog 1.10.1
Chris Larson [Fri, 15 Oct 2010 00:45:07 +0000 (17:45 -0700)]
Add 1.10.1 entry to ChangeLog

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agofetch: if mirror fetching fails, ensure exception is raised
Joshua Lock [Tue, 5 Oct 2010 11:44:08 +0000 (12:44 +0100)]
fetch: if mirror fetching fails, ensure exception is raised

We catch any exception raised by the fetchers go() method and attempt to work
around it by trying any (post) mirrors which are configured. However, should
the mirrors fail the exception is lost and the fetch is assumed to have
completed successfully.

Instead, save the exception and if the local file does not exist after trying
the mirrors re-raise the exception.

Fixes poky [BUGID #362]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoApply http://patchwork.openembedded.org/patch/2883/ to fix hg URIs
Andreas Oberritter [Thu, 9 Sep 2010 12:48:03 +0000 (12:48 +0000)]
Apply patchwork.openembedded.org/patch/2883/ to fix hg URIs

9 years agolib/bb/fetch/git.py: allow empty tags
ghost [Sat, 13 Feb 2010 14:55:20 +0000 (15:55 +0100)]
lib/bb/fetch/git.py: allow empty tags

9 years agolib/bb/fetch/git.py: add .git/last_commit_info and .git/branch to tarball .. this...
ghost [Fri, 29 Jan 2010 13:26:18 +0000 (14:26 +0100)]
lib/bb/fetch/git.py: add .git/last_commit_info and .git/branch to tarball .. this is can be used to create a version.h or anything other (ported from our 1.4.2-git)

9 years agoSwitch the debug_level dictionary to a defaultdict
Chris Larson [Tue, 31 Aug 2010 01:01:46 +0000 (18:01 -0700)]
Switch the debug_level dictionary to a defaultdict

This already exists in master, but in a different form.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agocreate cooker object after cleaning the environment
Jeff Dike [Tue, 29 Jun 2010 12:33:24 +0000 (13:33 +0100)]
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.

(From Poky rev: 6418d0492a60ed37d13e1060c2e8c09cd127c450)

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoFix IndexError encountered when a 'depends' flag references a nonexistant task
Chris Larson [Fri, 6 Aug 2010 23:19:12 +0000 (16:19 -0700)]
Fix IndexError encountered when a 'depends' flag references a nonexistant task

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoAdd 1.10.0 entry to ChangeLog 1.10.0
Chris Larson [Fri, 13 Aug 2010 15:57:38 +0000 (08:57 -0700)]
Add 1.10.0 entry to ChangeLog

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoFix handling of empty variables in local config files
Richard Purdie [Thu, 1 Jul 2010 22:54:13 +0000 (23:54 +0100)]
Fix handling of empty variables in local config files

(From Poky rev: dbd9308)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoGross hack to fix packaged-staging with BBCLASSEXTEND packages
Richard Purdie [Tue, 23 Mar 2010 22:33:02 +0000 (22:33 +0000)]
Gross hack to fix packaged-staging with BBCLASSEXTEND packages

(From Poky rev: 589df80ca1b825afd138531bb796aa8617ed0991)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoSearch up the directory tree for bblayers.conf
Chris Larson [Wed, 14 Apr 2010 21:38:18 +0000 (14:38 -0700)]
Search up the directory tree for bblayers.conf

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoAdd a hack to avoid the req that all vars using LAYERDIR be immediately expanded
Chris Larson [Wed, 14 Apr 2010 21:30:09 +0000 (14:30 -0700)]
Add a hack to avoid the req that all vars using LAYERDIR be immediately expanded

See the comment in the code for details.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoMove the unset BBPATH sanity check after the bblayers processing
Chris Larson [Wed, 14 Apr 2010 21:27:29 +0000 (14:27 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoMake the file not found error actually useable.
Chris Larson [Fri, 4 Jun 2010 20:10:00 +0000 (13:10 -0700)]
Make the file not found error actually useable.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoBump version from 1.9.0 to 1.10.0
Chris Larson [Thu, 15 Apr 2010 15:04:35 +0000 (08:04 -0700)]
Bump version from 1.9.0 to 1.10.0

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoMade '-b' work with BBCLASSEXTEND
Enrico Scholz [Sun, 21 Mar 2010 22:02:56 +0000 (23:02 +0100)]
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.

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
9 years agoResurrect the old bb.vercmp as bb.utils.vercmp, and its deps
Chris Larson [Tue, 6 Apr 2010 22:29:19 +0000 (15:29 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoPass the config metadata into the Cache constructor rather than the cooker
Chris Larson [Tue, 6 Apr 2010 15:52:54 +0000 (08:52 -0700)]
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.

Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agoResurrect merged anonfunc execution
Chris Larson [Wed, 31 Mar 2010 16:14:18 +0000 (09:14 -0700)]
Resurrect merged anonfunc execution

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoAdd & utilize a simple_exec utility function
Chris Larson [Wed, 31 Mar 2010 15:52:41 +0000 (08:52 -0700)]
Add & utilize a simple_exec utility function

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoConsolidate the exec/eval bits, switch anonfunc to better_exec, etc
Chris Larson [Wed, 31 Mar 2010 03:06:07 +0000 (20:06 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoPass an empty locals dict in expansion, since list comprehensions apparently leak...
Chris Larson [Tue, 30 Mar 2010 23:59:46 +0000 (16:59 -0700)]
Pass an empty locals dict in expansion, since list comprehensions apparently leak their '_' helper variable

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoTwo minor changes to the way python snippet expansion happens
Chris Larson [Tue, 30 Mar 2010 23:21:23 +0000 (16:21 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobitbake/event.py: Run class eventhandlers in the task context but ensure UI handlers...
Richard Purdie [Thu, 25 Mar 2010 17:33:41 +0000 (17:33 +0000)]
bitbake/event.py: Run class eventhandlers in the task context but ensure UI handlers run in the server context

(From Poky rev: d3d36d9f440288fa8bc0901ebefe875fc92409c4)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agobitbake/cooker.py: Finishing the command needs to happen after the BuildCompleted...
Richard Purdie [Thu, 25 Mar 2010 17:31:23 +0000 (17:31 +0000)]
bitbake/cooker.py: Finishing the command needs to happen after the BuildCompleted event else the cooker can shutdown first

(From Poky rev: 871f731e5733c27664c4a341cf4b6b0770cb1909)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agocache.py: Bump the cache version after the BBVERSIONS update
Richard Purdie [Thu, 25 Mar 2010 17:28:34 +0000 (17:28 +0000)]
cache.py: Bump the cache version after the BBVERSIONS update

(From Poky rev: fb245be03d8e3327165033045245f5f853c0b0d4)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agobb.manifest: Drop, its unused and obsolete. No point in having dead code around
Richard Purdie [Thu, 25 Mar 2010 15:46:18 +0000 (15:46 +0000)]
bb.manifest: Drop, its unused and obsolete. No point in having dead code around

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoBBFILES: use a set to remove duplicates when collecting.
Chris Larson [Sun, 6 Dec 2009 19:52:52 +0000 (19:52 +0000)]
BBFILES: use a set to remove duplicates when collecting.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobb/command was importing bb and accessing some of its own classes indirectly as bb...
Chris Larson [Thu, 25 Mar 2010 02:00:12 +0000 (19:00 -0700)]
bb/command was importing bb and accessing some of its own classes indirectly as bb.command.<class>

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoWhy is bb/__init__.py importing bb?
Chris Larson [Thu, 25 Mar 2010 01:59:24 +0000 (18:59 -0700)]
Why is bb/__init__.py importing bb?

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agodata_smart: be explicit about what we make available to eval'd python code
Chris Larson [Thu, 25 Mar 2010 01:58:59 +0000 (18:58 -0700)]
data_smart: be explicit about what we make available to eval'd python code

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoFix 7 references to undefined variables, as spotted by pyflakes
Chris Larson [Thu, 25 Mar 2010 00:48:49 +0000 (17:48 -0700)]
Fix 7 references to undefined variables, as spotted by pyflakes

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobb.utils: remove old portage remnants
Chris Larson [Wed, 24 Mar 2010 16:21:53 +0000 (09:21 -0700)]
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

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobb.utils: utilize string.letters and string.digits
Chris Larson [Wed, 24 Mar 2010 03:33:19 +0000 (20:33 -0700)]
bb.utils: utilize string.letters and string.digits

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobb.which: fix broken direction/reverse argument
Chris Larson [Wed, 24 Mar 2010 17:31:06 +0000 (10:31 -0700)]
bb.which: fix broken direction/reverse argument

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agocrumbs: fix hassattr typo
Chris Larson [Wed, 24 Mar 2010 03:24:32 +0000 (20:24 -0700)]
crumbs: fix hassattr typo

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoImplement BBVERSIONS
Chris Larson [Sat, 20 Mar 2010 00:22:19 +0000 (17:22 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoutils: improve wording of error message
Bernhard Reutner-Fischer [Sat, 13 Mar 2010 11:01:38 +0000 (12:01 +0100)]
utils: improve wording of error message

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agoExpand PREMIRRORS
Enrico Scholz [Sun, 21 Mar 2010 22:25:25 +0000 (23:25 +0100)]
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).

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agousermanual.xml: Add documentation on bblayers.conf
Richard Purdie [Mon, 22 Mar 2010 17:58:27 +0000 (17:58 +0000)]
usermanual.xml: Add documentation on bblayers.conf

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agocooker.py: Add support for a bblayers.conf file
Richard Purdie [Mon, 22 Mar 2010 17:48:31 +0000 (17:48 +0000)]
cooker.py: Add support for a bblayers.conf file

(From Poky rev: 666c753)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agocooker: bail out early if no files to build
Bernhard Reutner-Fischer [Mon, 1 Mar 2010 08:20:29 +0000 (09:20 +0100)]
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

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agoFix issues with BBCLASSEXTEND set by anonymous python, and rename some variables...
Chris Larson [Mon, 1 Mar 2010 23:45:15 +0000 (18:45 -0500)]
Fix issues with BBCLASSEXTEND set by anonymous python, and rename some variables to improve code clarity

Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agoImplement ??= operator
Chris Larson [Thu, 25 Feb 2010 16:42:28 +0000 (09:42 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoAvoid unnecessary calls to keys() when iterating over dictionaries.
Chris Larson [Thu, 11 Jun 2009 20:10:04 +0000 (13:10 -0700)]
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.

Signed-off-by: Chris Larson <clarson@mvista.com>
9 years agoknotty: tweak failure phrase
Bernhard Reutner-Fischer [Thu, 25 Feb 2010 13:21:21 +0000 (14:21 +0100)]
knotty: tweak failure phrase

..to make copy and paste of the logfile easier.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agoFix ud.basecmd error introduced by the FETCHCMD_git commit
Chris Larson [Wed, 24 Feb 2010 16:32:26 +0000 (09:32 -0700)]
Fix ud.basecmd error introduced by the FETCHCMD_git commit

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoAdd initial 'repo' fetcher
Tom Rini [Wed, 24 Feb 2010 14:19:24 +0000 (07:19 -0700)]
Add initial 'repo' fetcher

Signed-off-by: Tom Rini <tom_rini@mentor.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoRe-getVar BBCLASSEXTEND after finalise()
Chris Larson [Tue, 23 Feb 2010 18:55:43 +0000 (11:55 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoError early if BBPATH is unset, rather than falling back to share/bitbake
Chris Larson [Fri, 19 Feb 2010 23:26:33 +0000 (16:26 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoAdd PERSISTENT_DIR to bitbake.conf, as bb.fetch requires it or CACHE.
Chris Larson [Wed, 22 Jul 2009 18:19:02 +0000 (11:19 -0700)]
Add PERSISTENT_DIR to bitbake.conf, as bb.fetch requires it or CACHE.

Signed-off-by: Chris Larson <clarson@mvista.com>
9 years agoKill unused projectdir in bb package.
Chris Larson [Mon, 20 Jul 2009 04:57:09 +0000 (21:57 -0700)]
Kill unused projectdir in bb package.

Signed-off-by: Chris Larson <clarson@mvista.com>
9 years agoFix msg usage in the moved utility functions.
Chris Larson [Sun, 19 Jul 2009 17:07:00 +0000 (10:07 -0700)]
Fix msg usage in the moved utility functions.

Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agoMove most utility functions from bb into bb.utils.
Chris Larson [Sun, 19 Jul 2009 17:05:52 +0000 (10:05 -0700)]
Move most utility functions from bb into bb.utils.

Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agoMove compat imports in the bb package to avoid circular dep issues.
Chris Larson [Sun, 19 Jul 2009 16:54:46 +0000 (09:54 -0700)]
Move compat imports in the bb package to avoid circular dep issues.

Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agoMove encodeurl, decodeurl into bb.fetch.
Chris Larson [Sun, 19 Jul 2009 16:51:29 +0000 (09:51 -0700)]
Move encodeurl, decodeurl into bb.fetch.

Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agoMove MalformedUrl, VarExpandError into appropriate modules.
Chris Larson [Sun, 19 Jul 2009 16:49:36 +0000 (09:49 -0700)]
Move MalformedUrl, VarExpandError into appropriate modules.

Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years agoAdd FETCHCMD parameter for git
Martyn Welch [Tue, 26 Jan 2010 14:35:51 +0000 (14:35 +0000)]
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".

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>
9 years agoRevert "providers.py: sort eligible providers by DEFAULT_PREFERENCE"
Richard Purdie [Tue, 16 Feb 2010 15:38:55 +0000 (15:38 +0000)]
Revert "providers.py: sort eligible providers by DEFAULT_PREFERENCE"

This breaks preferred providers functionality

This reverts commit ee9afccf33b220a21b74fab279925eeb4771249b.

9 years agofix invalid method and logic
Joshua Lock [Fri, 5 Feb 2010 12:41:08 +0000 (12:41 +0000)]
fix invalid method and logic

The previous bitbake change included an invalid method call and inverted logic.

(From Poky rev: 52cbb074235fc7b1bcd94bc1147c4607612fe701)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoTest premirrors and mirrors in checkstatus()
Joshua Lock [Fri, 5 Feb 2010 12:08:15 +0000 (12:08 +0000)]
Test premirrors and mirrors in checkstatus()

checkstatus() is used to ensure we can fetch a copy of each file, so it makes
sense to also test PREMIRRORS and MIRRORS in the method.

This patch adds calls to try_mirrors() to the Fetch.checkstatus() method and
changes the try_mirrors() method to take a check argument, which is False by
default. When check is True try_mirrors() will call a fetchers checkstatus()
with the replaced uri.

(From Poky rev: ec92133d6fc049b4b666d670d3ac263de5a1d103)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoFix try_mirrors() logic, was only trying the first mirror.
Joshua Lock [Thu, 4 Feb 2010 14:08:34 +0000 (14:08 +0000)]
Fix try_mirrors() logic, was only trying the first mirror.

The logic in try_mirrors() was buggy such that only the first entry in the
mirrors list was tried.

This patch fixes this. Thanks to Richard for the review.

(From Poky rev: c9fd126f64ec57cc0799ad03f32f509b5266e0ff)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoif PREMIRRORS set test for local file in FetchData.setup_localpath
Joshua Lock [Wed, 3 Feb 2010 16:08:09 +0000 (16:08 +0000)]
if PREMIRRORS set test for local file in FetchData.setup_localpath

When we are using PREMIRRORS it's possible a mirror in the local namespace
(some filesystem path, i.e. an NFS share) provides read-only files.
This is a perfectly valid scenario so this patch fixes bitbake so that for
such a scenario locapath is set to the files path rather than some child
of DL_DIR.

(From Poky rev: afe12428a9229b9a96f9e98c86d95786689aaf79)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoEnhance the fetchers' support for local mirrors
Joshua Lock [Tue, 2 Feb 2010 17:57:20 +0000 (17:57 +0000)]
Enhance the fetchers' support for local mirrors

Modify the try_mirrors() function to return the localpath of the fetched file
and update the data dictionary to reflect this.
Secondly the metadata files, lock and md5, should always be stored relative to
the ${DL_DIR} as it is possible that the localpath is a read-only directory,
for example in the scenario where there is a read-only file:// mirror.

(From Poky rev: b571168ac7716a8ee4bee98ba5c3b53f70a13118)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agounify mirror support and make it independant of the fetcher
Joshua Lock [Mon, 1 Feb 2010 16:56:16 +0000 (16:56 +0000)]
unify mirror support and make it independant of the fetcher

This patch serves two purposes. Firstly it unifies the concept of mirrors into
PREMIRRORS and MIRRORS. PREMIRRORS are tried before the SRC_URI defined in the
recipe whereas MIRRORS are tried only if that fails.
The tarball stash was conceptually inline with a PREMIRROR only with special
handling within the wget fetcher and therefore only worked with certain
fetch types.
Secondly the patch removes the need for individual fetch implementations to
worry about mirror handling.

With this patch, the base fetch implementation will first try to use a
PREMIRROR to fetch the desired object, if this fails the native fetch method
for the object will be tried and if this fails will try to fetch a copy from
one of the MIRRORS.

(From Poky rev: 0737552c1de18c64db8a5a52248a3e7b217f30aa)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoutils.py: Don't error if an exported environment variable is unset (i.e. None)
Richard Purdie [Fri, 12 Feb 2010 13:50:19 +0000 (13:50 +0000)]
utils.py: Don't error if an exported environment variable is unset (i.e. None)

(From Poky rev: 62c103ce0e154ee5bf6183987adc90fc6df154c6)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years ago[cache] copy instead of deepcopy in sync
Holger Freyther [Sun, 17 May 2009 03:59:06 +0000 (05:59 +0200)]
[cache] copy instead of deepcopy in sync

We only intend to modify the dict, no need to copy all
elements.

9 years ago[parse] In ast, make StatementGroup inherit list, and add a AstNode base class.
Chris Larson [Tue, 21 Jul 2009 19:00:29 +0000 (12:00 -0700)]
[parse] In ast, make StatementGroup inherit list, and add a AstNode base class.

Signed-off-by: Chris Larson <clarson@mvista.com>
9 years ago[parse] Use bb.which in resolve_file
Chris Larson [Sun, 19 Jul 2009 05:36:32 +0000 (22:36 -0700)]
[parse] Use bb.which in resolve_file

Signed-off-by: Chris Larson <clarson@kergoth.com>
9 years ago[parser] Make resolve_file only resolve the path
Holger Freyther [Tue, 19 May 2009 11:59:50 +0000 (13:59 +0200)]
[parser] Make resolve_file only resolve the path

Do not attempt to open the file in the resolve_file method
(a lot like bb.which... maybe bb.which can be used). This way
we don't need to open/close a file which we have already parsed.

9 years ago[parser] Cache parsed .inc and .bbclass files for a parse speedup
Holger Freyther [Tue, 19 May 2009 11:53:12 +0000 (13:53 +0200)]
[parser] Cache parsed .inc and .bbclass files for a parse speedup

Have a growing dict with .inc and .bbclass'es. This avoids to reparse
files we have already seen.

9 years ago[parser] prepare to cache some .bbcclass and .inc files
Holger Freyther [Tue, 19 May 2009 11:22:30 +0000 (13:22 +0200)]
[parser] prepare to cache some .bbcclass and .inc files

Our parser is shit but instead to replace it now we will see
how long we can drive the wave by caching parsed files. This
will not go through the feeder again but we can just reevaluate
the StatementGroup.

9 years ago[parser] Remove the "data" from feeder, evaluate after parsing a file
Holger Freyther [Tue, 19 May 2009 10:10:37 +0000 (12:10 +0200)]
[parser] Remove the "data" from feeder, evaluate after parsing a file

Evaluate the statements after having parsed one file. This is
referred to as "entwirren" and we can remove the direct evaluation
and postpone a bit, in the future we can use a cached copy instead
of parsing the original.

9 years ago[parse] Move vars_from_file from bb.parse.BBHandler into bb.parse.
Chris Larson [Tue, 21 Jul 2009 23:22:30 +0000 (16:22 -0700)]
[parse] Move vars_from_file from bb.parse.BBHandler into bb.parse.

Signed-off-by: Chris Larson <clarson@mvista.com>
9 years ago[parse] Don't use relative import of parse_py.
Chris Larson [Wed, 22 Jul 2009 18:09:25 +0000 (11:09 -0700)]
[parse] Don't use relative import of parse_py.

Signed-off-by: Chris Larson <clarson@mvista.com>
9 years ago[parse] Move the last method to the AST...
Holger Freyther [Tue, 19 May 2009 08:57:00 +0000 (10:57 +0200)]
[parse] Move the last method to the AST...

9 years ago[parser] Move more methods to the ast scheme
Holger Freyther [Tue, 19 May 2009 08:52:18 +0000 (10:52 +0200)]
[parser] Move more methods to the ast scheme

9 years ago[parser] Move one more item to the ast
Holger Freyther [Tue, 19 May 2009 08:10:26 +0000 (10:10 +0200)]
[parser] Move one more item to the ast

9 years ago[parser] Move methodflags over to the ast
Holger Freyther [Tue, 19 May 2009 08:02:55 +0000 (10:02 +0200)]
[parser] Move methodflags over to the ast

9 years ago[parser] Build fix
Richard Purdie [Fri, 12 Feb 2010 17:45:51 +0000 (17:45 +0000)]
[parser] Build fix

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years ago[parser] Move more statements over the two phase AST
Holger Freyther [Tue, 19 May 2009 07:51:29 +0000 (09:51 +0200)]
[parser] Move more statements over the two phase AST

Create the data first, then evaluate on the data dict

9 years ago[parse] Change handling include through the AstNode
Holger Freyther [Tue, 19 May 2009 07:46:42 +0000 (09:46 +0200)]
[parse] Change handling include through the AstNode

Disable the recursively evaluating the statement for now
as it is causing problems.

9 years ago[parser] Call eval and remove non ast code
Holger Freyther [Tue, 19 May 2009 07:37:41 +0000 (09:37 +0200)]
[parser] Call eval and remove non ast code

9 years ago[parser] Call eval immeditaley to test this code
Holger Freyther [Tue, 19 May 2009 07:37:07 +0000 (09:37 +0200)]
[parser] Call eval immeditaley to test this code

9 years ago[parser] Prepare to cease out getFunc
Holger Freyther [Mon, 18 May 2009 18:03:50 +0000 (20:03 +0200)]
[parser] Prepare to cease out getFunc

getFunc is now a method of the data node, hopefully we can kill the other
version soon.

9 years ago[parser] Preserve include vs. require behaviour
Richard Purdie [Fri, 12 Feb 2010 14:41:28 +0000 (14:41 +0000)]
[parser] Preserve include vs. require behaviour

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years ago[parser] Firs set of AST nodes with construction and eval
Holger Freyther [Mon, 18 May 2009 17:50:14 +0000 (19:50 +0200)]
[parser] Firs set of AST nodes with construction and eval

First set of ConfHandling with AST nodes. The include can
use a speed up and things might need to be migrated... into
this class.

9 years ago[parser] Add documentation about usage of this code
Holger Freyther [Mon, 18 May 2009 17:53:53 +0000 (19:53 +0200)]
[parser] Add documentation about usage of this code

9 years ago[parser] Move the finalise into the ast as well
Holger Freyther [Mon, 18 May 2009 17:56:36 +0000 (19:56 +0200)]
[parser] Move the finalise into the ast as well

9 years ago[parser] Cary a Statement Node through the parsing
Holger Freyther [Mon, 18 May 2009 17:24:07 +0000 (19:24 +0200)]
[parser] Cary a Statement Node through the parsing

When parsing we will collect a number of statements
that can be evaluated...The plan is to be evaluate
things twice (old+new) and then compare the result,
it should be the same.

9 years ago[parser] Move evaluating into the ast class...
Holger Freyther [Fri, 12 Feb 2010 14:14:49 +0000 (14:14 +0000)]
[parser] Move evaluating into the ast class...

9 years agoproviders.py: sort eligible providers by DEFAULT_PREFERENCE
Bernhard Reutner-Fischer [Mon, 8 Feb 2010 17:50:33 +0000 (18:50 +0100)]
providers.py: sort eligible providers by DEFAULT_PREFERENCE

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agorunqueue.py: improve printing dependent tasks
Bernhard Reutner-Fischer [Mon, 8 Feb 2010 17:50:34 +0000 (18:50 +0100)]
runqueue.py: improve printing dependent tasks

Print names instead of Task-IDs (and not mentioning they're task ids).

Previously we printed e.g.:
Dependency loop #1 found:
  Task 89 (/there/src/oe/openembedded/recipes/busybox/busybox-native_1.15.2.bb, do_configure) (depends: Set([88, 282, 92, 87]))

Now we say
Dependency loop #1 found:
  Task 89 (/there/src/oe/openembedded/recipes/busybox/busybox-native_1.15.2.bb, do_configure) (dependent Task-IDs ['busybox-native, do_patch', 'update-rc.d, do_populate_staging', 'busybox-native, do_populate_staging', 'shasum-native.bb, do_populate_staging', 'busybox-native, do_unpack'])

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>