diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-05-11 22:59:35 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-05-11 22:59:35 +0100 |
commit | c009172f77549e385b9d79f15f181581c55e9909 (patch) | |
tree | aaf845578b30c67a2d3f4351afe29caa5e0ed235 /bitbake-dev | |
parent | 107a9da00640a9e086a8608c20aee48aefd92893 (diff) | |
download | poky-c009172f77549e385b9d79f15f181581c55e9909.tar.gz |
bitbake-dev: Sync with upstream
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake-dev')
32 files changed, 81 insertions, 83 deletions
diff --git a/bitbake-dev/ChangeLog b/bitbake-dev/ChangeLog index a2c9d80801..65c5e4bf36 100644 --- a/bitbake-dev/ChangeLog +++ b/bitbake-dev/ChangeLog | |||
@@ -169,6 +169,13 @@ Changes in Bitbake 1.9.x: | |||
169 | proxies to work better. (from Poky) | 169 | proxies to work better. (from Poky) |
170 | - Also allow user and pswd options in SRC_URIs globally (from Poky) | 170 | - Also allow user and pswd options in SRC_URIs globally (from Poky) |
171 | - Improve proxy handling when using mirrors (from Poky) | 171 | - Improve proxy handling when using mirrors (from Poky) |
172 | - Add bb.utils.prune_suffix function | ||
173 | - Fix hg checkouts of specific revisions (from Poky) | ||
174 | - Fix wget fetching of urls with parameters specified (from Poky) | ||
175 | - Add username handling to git fetcher (from Poky) | ||
176 | - Set HOME environmental variable when running fetcher commands (from Poky) | ||
177 | - Make sure allowed variables inherited from the environment are exported again (from Poky) | ||
178 | - When running a stage task in bbshell, run populate_staging, not the stage task (from Poky) | ||
172 | 179 | ||
173 | Changes in Bitbake 1.8.0: | 180 | Changes in Bitbake 1.8.0: |
174 | - Release 1.7.x as a stable series | 181 | - Release 1.7.x as a stable series |
diff --git a/bitbake-dev/lib/bb/COW.py b/bitbake-dev/lib/bb/COW.py index e5063d60a8..ca206cf4b4 100644 --- a/bitbake-dev/lib/bb/COW.py +++ b/bitbake-dev/lib/bb/COW.py | |||
@@ -23,10 +23,8 @@ | |||
23 | # Assign a file to __warn__ to get warnings about slow operations. | 23 | # Assign a file to __warn__ to get warnings about slow operations. |
24 | # | 24 | # |
25 | 25 | ||
26 | from inspect import getmro | ||
27 | |||
28 | import copy | 26 | import copy |
29 | import types, sets | 27 | import types |
30 | types.ImmutableTypes = tuple([ \ | 28 | types.ImmutableTypes = tuple([ \ |
31 | types.BooleanType, \ | 29 | types.BooleanType, \ |
32 | types.ComplexType, \ | 30 | types.ComplexType, \ |
@@ -35,7 +33,7 @@ types.ImmutableTypes = tuple([ \ | |||
35 | types.LongType, \ | 33 | types.LongType, \ |
36 | types.NoneType, \ | 34 | types.NoneType, \ |
37 | types.TupleType, \ | 35 | types.TupleType, \ |
38 | sets.ImmutableSet] + \ | 36 | frozenset] + \ |
39 | list(types.StringTypes)) | 37 | list(types.StringTypes)) |
40 | 38 | ||
41 | MUTABLE = "__mutable__" | 39 | MUTABLE = "__mutable__" |
diff --git a/bitbake-dev/lib/bb/__init__.py b/bitbake-dev/lib/bb/__init__.py index 99995212c3..f2f8f656d8 100644 --- a/bitbake-dev/lib/bb/__init__.py +++ b/bitbake-dev/lib/bb/__init__.py | |||
@@ -1130,4 +1130,5 @@ def dep_opconvert(mysplit, myuse): | |||
1130 | 1130 | ||
1131 | if __name__ == "__main__": | 1131 | if __name__ == "__main__": |
1132 | import doctest, bb | 1132 | import doctest, bb |
1133 | bb.msg.set_debug_level(0) | ||
1133 | doctest.testmod(bb) | 1134 | doctest.testmod(bb) |
diff --git a/bitbake-dev/lib/bb/cache.py b/bitbake-dev/lib/bb/cache.py index 1001012e0c..272619386a 100644 --- a/bitbake-dev/lib/bb/cache.py +++ b/bitbake-dev/lib/bb/cache.py | |||
@@ -31,7 +31,6 @@ | |||
31 | import os, re | 31 | import os, re |
32 | import bb.data | 32 | import bb.data |
33 | import bb.utils | 33 | import bb.utils |
34 | from sets import Set | ||
35 | 34 | ||
36 | try: | 35 | try: |
37 | import cPickle as pickle | 36 | import cPickle as pickle |
@@ -525,6 +524,6 @@ class CacheData: | |||
525 | (set elsewhere) | 524 | (set elsewhere) |
526 | """ | 525 | """ |
527 | self.ignored_dependencies = [] | 526 | self.ignored_dependencies = [] |
528 | self.world_target = Set() | 527 | self.world_target = set() |
529 | self.bbfile_priority = {} | 528 | self.bbfile_priority = {} |
530 | self.bbfile_config_priorities = [] | 529 | self.bbfile_config_priorities = [] |
diff --git a/bitbake-dev/lib/bb/cooker.py b/bitbake-dev/lib/bb/cooker.py index bbae4f03b5..b12dc13b62 100644 --- a/bitbake-dev/lib/bb/cooker.py +++ b/bitbake-dev/lib/bb/cooker.py | |||
@@ -26,7 +26,6 @@ import sys, os, getopt, glob, copy, os.path, re, time | |||
26 | import bb | 26 | import bb |
27 | from bb import utils, data, parse, event, cache, providers, taskdata, runqueue | 27 | from bb import utils, data, parse, event, cache, providers, taskdata, runqueue |
28 | from bb import xmlrpcserver, command | 28 | from bb import xmlrpcserver, command |
29 | from sets import Set | ||
30 | import itertools, sre_constants | 29 | import itertools, sre_constants |
31 | 30 | ||
32 | class MultipleMatches(Exception): | 31 | class MultipleMatches(Exception): |
@@ -97,7 +96,7 @@ class BBCooker: | |||
97 | self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build" | 96 | self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build" |
98 | 97 | ||
99 | bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True) | 98 | bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True) |
100 | if bbpkgs: | 99 | if bbpkgs and len(self.configuration.pkgs_to_build) == 0: |
101 | self.configuration.pkgs_to_build.extend(bbpkgs.split()) | 100 | self.configuration.pkgs_to_build.extend(bbpkgs.split()) |
102 | 101 | ||
103 | # | 102 | # |
@@ -635,7 +634,7 @@ class BBCooker: | |||
635 | 634 | ||
636 | # Tweak some variables | 635 | # Tweak some variables |
637 | item = self.bb_cache.getVar('PN', fn, True) | 636 | item = self.bb_cache.getVar('PN', fn, True) |
638 | self.status.ignored_dependencies = Set() | 637 | self.status.ignored_dependencies = set() |
639 | self.status.bbfile_priority[fn] = 1 | 638 | self.status.bbfile_priority[fn] = 1 |
640 | 639 | ||
641 | # Remove external dependencies | 640 | # Remove external dependencies |
@@ -762,7 +761,7 @@ class BBCooker: | |||
762 | self.status = bb.cache.CacheData() | 761 | self.status = bb.cache.CacheData() |
763 | 762 | ||
764 | ignore = bb.data.getVar("ASSUME_PROVIDED", self.configuration.data, 1) or "" | 763 | ignore = bb.data.getVar("ASSUME_PROVIDED", self.configuration.data, 1) or "" |
765 | self.status.ignored_dependencies = Set(ignore.split()) | 764 | self.status.ignored_dependencies = set(ignore.split()) |
766 | 765 | ||
767 | for dep in self.configuration.extra_assume_provided: | 766 | for dep in self.configuration.extra_assume_provided: |
768 | self.status.ignored_dependencies.add(dep) | 767 | self.status.ignored_dependencies.add(dep) |
@@ -836,7 +835,11 @@ class BBCooker: | |||
836 | if dirfiles: | 835 | if dirfiles: |
837 | newfiles += dirfiles | 836 | newfiles += dirfiles |
838 | continue | 837 | continue |
839 | newfiles += glob.glob(f) or [ f ] | 838 | else: |
839 | globbed = glob.glob(f) | ||
840 | if not globbed and os.path.exists(f): | ||
841 | globbed = [f] | ||
842 | newfiles += globbed | ||
840 | 843 | ||
841 | bbmask = bb.data.getVar('BBMASK', self.configuration.data, 1) | 844 | bbmask = bb.data.getVar('BBMASK', self.configuration.data, 1) |
842 | 845 | ||
@@ -849,9 +852,8 @@ class BBCooker: | |||
849 | bb.msg.fatal(bb.msg.domain.Collection, "BBMASK is not a valid regular expression.") | 852 | bb.msg.fatal(bb.msg.domain.Collection, "BBMASK is not a valid regular expression.") |
850 | 853 | ||
851 | finalfiles = [] | 854 | finalfiles = [] |
852 | for i in xrange( len( newfiles ) ): | 855 | for f in newfiles: |
853 | f = newfiles[i] | 856 | if bbmask_compiled.search(f): |
854 | if bbmask and bbmask_compiled.search(f): | ||
855 | bb.msg.debug(1, bb.msg.domain.Collection, "skipping masked file %s" % f) | 857 | bb.msg.debug(1, bb.msg.domain.Collection, "skipping masked file %s" % f) |
856 | masked += 1 | 858 | masked += 1 |
857 | continue | 859 | continue |
diff --git a/bitbake-dev/lib/bb/data.py b/bitbake-dev/lib/bb/data.py index cc08d69009..d3058b9a1d 100644 --- a/bitbake-dev/lib/bb/data.py +++ b/bitbake-dev/lib/bb/data.py | |||
@@ -37,7 +37,7 @@ the speed is more critical here. | |||
37 | # | 37 | # |
38 | #Based on functions from the base bb module, Copyright 2003 Holger Schurig | 38 | #Based on functions from the base bb module, Copyright 2003 Holger Schurig |
39 | 39 | ||
40 | import sys, os, re, time, types | 40 | import sys, os, re, types |
41 | if sys.argv[0][-5:] == "pydoc": | 41 | if sys.argv[0][-5:] == "pydoc": |
42 | path = os.path.dirname(os.path.dirname(sys.argv[1])) | 42 | path = os.path.dirname(os.path.dirname(sys.argv[1])) |
43 | else: | 43 | else: |
@@ -553,7 +553,9 @@ def inherits_class(klass, d): | |||
553 | def _test(): | 553 | def _test(): |
554 | """Start a doctest run on this module""" | 554 | """Start a doctest run on this module""" |
555 | import doctest | 555 | import doctest |
556 | import bb | ||
556 | from bb import data | 557 | from bb import data |
558 | bb.msg.set_debug_level(0) | ||
557 | doctest.testmod(data) | 559 | doctest.testmod(data) |
558 | 560 | ||
559 | if __name__ == "__main__": | 561 | if __name__ == "__main__": |
diff --git a/bitbake-dev/lib/bb/data_smart.py b/bitbake-dev/lib/bb/data_smart.py index 0d39d20a45..c93aea7fef 100644 --- a/bitbake-dev/lib/bb/data_smart.py +++ b/bitbake-dev/lib/bb/data_smart.py | |||
@@ -32,7 +32,6 @@ import copy, os, re, sys, time, types | |||
32 | import bb | 32 | import bb |
33 | from bb import utils, methodpool | 33 | from bb import utils, methodpool |
34 | from COW import COWDictBase | 34 | from COW import COWDictBase |
35 | from sets import Set | ||
36 | from new import classobj | 35 | from new import classobj |
37 | 36 | ||
38 | 37 | ||
@@ -142,7 +141,7 @@ class DataSmart: | |||
142 | try: | 141 | try: |
143 | self._special_values[keyword].add( base ) | 142 | self._special_values[keyword].add( base ) |
144 | except: | 143 | except: |
145 | self._special_values[keyword] = Set() | 144 | self._special_values[keyword] = set() |
146 | self._special_values[keyword].add( base ) | 145 | self._special_values[keyword].add( base ) |
147 | 146 | ||
148 | return | 147 | return |
@@ -154,7 +153,7 @@ class DataSmart: | |||
154 | if '_' in var: | 153 | if '_' in var: |
155 | override = var[var.rfind('_')+1:] | 154 | override = var[var.rfind('_')+1:] |
156 | if not self._seen_overrides.has_key(override): | 155 | if not self._seen_overrides.has_key(override): |
157 | self._seen_overrides[override] = Set() | 156 | self._seen_overrides[override] = set() |
158 | self._seen_overrides[override].add( var ) | 157 | self._seen_overrides[override].add( var ) |
159 | 158 | ||
160 | # setting var | 159 | # setting var |
diff --git a/bitbake-dev/lib/bb/fetch/__init__.py b/bitbake-dev/lib/bb/fetch/__init__.py index 3333a278e1..3633584992 100644 --- a/bitbake-dev/lib/bb/fetch/__init__.py +++ b/bitbake-dev/lib/bb/fetch/__init__.py | |||
@@ -24,16 +24,11 @@ BitBake build tools. | |||
24 | # | 24 | # |
25 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 25 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
26 | 26 | ||
27 | import os, re, fcntl | 27 | import os, re |
28 | import bb | 28 | import bb |
29 | from bb import data | 29 | from bb import data |
30 | from bb import persist_data | 30 | from bb import persist_data |
31 | 31 | ||
32 | try: | ||
33 | import cPickle as pickle | ||
34 | except ImportError: | ||
35 | import pickle | ||
36 | |||
37 | class FetchError(Exception): | 32 | class FetchError(Exception): |
38 | """Exception raised when a download fails""" | 33 | """Exception raised when a download fails""" |
39 | 34 | ||
@@ -65,7 +60,6 @@ def uri_replace(uri, uri_find, uri_replace, d): | |||
65 | result_decoded[loc] = uri_decoded[loc] | 60 | result_decoded[loc] = uri_decoded[loc] |
66 | import types | 61 | import types |
67 | if type(i) == types.StringType: | 62 | if type(i) == types.StringType: |
68 | import re | ||
69 | if (re.match(i, uri_decoded[loc])): | 63 | if (re.match(i, uri_decoded[loc])): |
70 | result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) | 64 | result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) |
71 | if uri_find_decoded.index(i) == 2: | 65 | if uri_find_decoded.index(i) == 2: |
diff --git a/bitbake-dev/lib/bb/fetch/bzr.py b/bitbake-dev/lib/bb/fetch/bzr.py index b23e9eef86..b27fb63d07 100644 --- a/bitbake-dev/lib/bb/fetch/bzr.py +++ b/bitbake-dev/lib/bb/fetch/bzr.py | |||
@@ -29,7 +29,6 @@ import bb | |||
29 | from bb import data | 29 | from bb import data |
30 | from bb.fetch import Fetch | 30 | from bb.fetch import Fetch |
31 | from bb.fetch import FetchError | 31 | from bb.fetch import FetchError |
32 | from bb.fetch import MissingParameterError | ||
33 | from bb.fetch import runfetchcmd | 32 | from bb.fetch import runfetchcmd |
34 | 33 | ||
35 | class Bzr(Fetch): | 34 | class Bzr(Fetch): |
diff --git a/bitbake-dev/lib/bb/fetch/cvs.py b/bitbake-dev/lib/bb/fetch/cvs.py index aa55ad8bf6..d8bd4eaf75 100644 --- a/bitbake-dev/lib/bb/fetch/cvs.py +++ b/bitbake-dev/lib/bb/fetch/cvs.py | |||
@@ -26,7 +26,7 @@ BitBake build tools. | |||
26 | #Based on functions from the base bb module, Copyright 2003 Holger Schurig | 26 | #Based on functions from the base bb module, Copyright 2003 Holger Schurig |
27 | # | 27 | # |
28 | 28 | ||
29 | import os, re | 29 | import os |
30 | import bb | 30 | import bb |
31 | from bb import data | 31 | from bb import data |
32 | from bb.fetch import Fetch | 32 | from bb.fetch import Fetch |
diff --git a/bitbake-dev/lib/bb/fetch/git.py b/bitbake-dev/lib/bb/fetch/git.py index 010a4f57a2..6456403e14 100644 --- a/bitbake-dev/lib/bb/fetch/git.py +++ b/bitbake-dev/lib/bb/fetch/git.py | |||
@@ -20,11 +20,10 @@ BitBake 'Fetch' git implementation | |||
20 | # with this program; if not, write to the Free Software Foundation, Inc., | 20 | # with this program; if not, write to the Free Software Foundation, Inc., |
21 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 21 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
22 | 22 | ||
23 | import os, re | 23 | import os |
24 | import bb | 24 | import bb |
25 | from bb import data | 25 | from bb import data |
26 | from bb.fetch import Fetch | 26 | from bb.fetch import Fetch |
27 | from bb.fetch import FetchError | ||
28 | from bb.fetch import runfetchcmd | 27 | from bb.fetch import runfetchcmd |
29 | 28 | ||
30 | class Git(Fetch): | 29 | class Git(Fetch): |
@@ -37,9 +36,12 @@ class Git(Fetch): | |||
37 | 36 | ||
38 | def localpath(self, url, ud, d): | 37 | def localpath(self, url, ud, d): |
39 | 38 | ||
40 | ud.proto = "rsync" | ||
41 | if 'protocol' in ud.parm: | 39 | if 'protocol' in ud.parm: |
42 | ud.proto = ud.parm['protocol'] | 40 | ud.proto = ud.parm['protocol'] |
41 | elif not ud.host: | ||
42 | ud.proto = 'file' | ||
43 | else: | ||
44 | ud.proto = "rsync" | ||
43 | 45 | ||
44 | ud.branch = ud.parm.get("branch", "master") | 46 | ud.branch = ud.parm.get("branch", "master") |
45 | 47 | ||
@@ -49,12 +51,9 @@ class Git(Fetch): | |||
49 | elif tag: | 51 | elif tag: |
50 | ud.tag = tag | 52 | ud.tag = tag |
51 | 53 | ||
52 | if not ud.tag: | 54 | if not ud.tag or ud.tag == "master": |
53 | ud.tag = self.latest_revision(url, ud, d) | 55 | ud.tag = self.latest_revision(url, ud, d) |
54 | 56 | ||
55 | if ud.tag == "master": | ||
56 | ud.tag = self.latest_revision(url, ud, d) | ||
57 | |||
58 | ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.tag), d) | 57 | ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.tag), d) |
59 | 58 | ||
60 | return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile) | 59 | return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile) |
@@ -90,11 +89,12 @@ class Git(Fetch): | |||
90 | 89 | ||
91 | os.chdir(repodir) | 90 | os.chdir(repodir) |
92 | # Remove all but the .git directory | 91 | # Remove all but the .git directory |
93 | runfetchcmd("rm * -Rf", d) | 92 | if not self._contains_ref(ud.tag, d): |
94 | runfetchcmd("git fetch %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, ud.branch), d) | 93 | runfetchcmd("rm * -Rf", d) |
95 | runfetchcmd("git fetch --tags %s://%s%s%s" % (ud.proto, username, ud.host, ud.path), d) | 94 | runfetchcmd("git fetch %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, ud.branch), d) |
96 | runfetchcmd("git prune-packed", d) | 95 | runfetchcmd("git fetch --tags %s://%s%s%s" % (ud.proto, username, ud.host, ud.path), d) |
97 | runfetchcmd("git pack-redundant --all | xargs -r rm", d) | 96 | runfetchcmd("git prune-packed", d) |
97 | runfetchcmd("git pack-redundant --all | xargs -r rm", d) | ||
98 | 98 | ||
99 | os.chdir(repodir) | 99 | os.chdir(repodir) |
100 | mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) | 100 | mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) |
@@ -120,6 +120,10 @@ class Git(Fetch): | |||
120 | def suppports_srcrev(self): | 120 | def suppports_srcrev(self): |
121 | return True | 121 | return True |
122 | 122 | ||
123 | def _contains_ref(self, tag, d): | ||
124 | output = runfetchcmd("git log --pretty=oneline -n 1 %s -- 2> /dev/null | wc -l" % tag, d, quiet=True) | ||
125 | return output.split()[0] != "0" | ||
126 | |||
123 | def _revision_key(self, url, ud, d): | 127 | def _revision_key(self, url, ud, d): |
124 | """ | 128 | """ |
125 | Return a unique key for the url | 129 | Return a unique key for the url |
diff --git a/bitbake-dev/lib/bb/fetch/hg.py b/bitbake-dev/lib/bb/fetch/hg.py index b87fd0fbe5..f53be8b20b 100644 --- a/bitbake-dev/lib/bb/fetch/hg.py +++ b/bitbake-dev/lib/bb/fetch/hg.py | |||
@@ -24,7 +24,7 @@ BitBake 'Fetch' implementation for mercurial DRCS (hg). | |||
24 | # | 24 | # |
25 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 25 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
26 | 26 | ||
27 | import os, re | 27 | import os |
28 | import sys | 28 | import sys |
29 | import bb | 29 | import bb |
30 | from bb import data | 30 | from bb import data |
@@ -123,9 +123,6 @@ class Hg(Fetch): | |||
123 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd) | 123 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd) |
124 | runfetchcmd(updatecmd, d) | 124 | runfetchcmd(updatecmd, d) |
125 | 125 | ||
126 | updatecmd = self._buildhgcommand(ud, d, "update") | ||
127 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd) | ||
128 | runfetchcmd(updatecmd, d) | ||
129 | else: | 126 | else: |
130 | fetchcmd = self._buildhgcommand(ud, d, "fetch") | 127 | fetchcmd = self._buildhgcommand(ud, d, "fetch") |
131 | bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc) | 128 | bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc) |
@@ -134,6 +131,12 @@ class Hg(Fetch): | |||
134 | os.chdir(ud.pkgdir) | 131 | os.chdir(ud.pkgdir) |
135 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % fetchcmd) | 132 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % fetchcmd) |
136 | runfetchcmd(fetchcmd, d) | 133 | runfetchcmd(fetchcmd, d) |
134 | |||
135 | # Even when we clone (fetch), we still need to update as hg's clone | ||
136 | # won't checkout the specified revision if its on a branch | ||
137 | updatecmd = self._buildhgcommand(ud, d, "update") | ||
138 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd) | ||
139 | runfetchcmd(updatecmd, d) | ||
137 | 140 | ||
138 | os.chdir(ud.pkgdir) | 141 | os.chdir(ud.pkgdir) |
139 | try: | 142 | try: |
diff --git a/bitbake-dev/lib/bb/fetch/local.py b/bitbake-dev/lib/bb/fetch/local.py index 54d598ae89..577774e597 100644 --- a/bitbake-dev/lib/bb/fetch/local.py +++ b/bitbake-dev/lib/bb/fetch/local.py | |||
@@ -25,7 +25,7 @@ BitBake build tools. | |||
25 | # | 25 | # |
26 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 26 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
27 | 27 | ||
28 | import os, re | 28 | import os |
29 | import bb | 29 | import bb |
30 | from bb import data | 30 | from bb import data |
31 | from bb.fetch import Fetch | 31 | from bb.fetch import Fetch |
diff --git a/bitbake-dev/lib/bb/fetch/perforce.py b/bitbake-dev/lib/bb/fetch/perforce.py index 2fb38b4190..394f5a2253 100644 --- a/bitbake-dev/lib/bb/fetch/perforce.py +++ b/bitbake-dev/lib/bb/fetch/perforce.py | |||
@@ -25,12 +25,11 @@ BitBake build tools. | |||
25 | # | 25 | # |
26 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 26 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
27 | 27 | ||
28 | import os, re | 28 | import os |
29 | import bb | 29 | import bb |
30 | from bb import data | 30 | from bb import data |
31 | from bb.fetch import Fetch | 31 | from bb.fetch import Fetch |
32 | from bb.fetch import FetchError | 32 | from bb.fetch import FetchError |
33 | from bb.fetch import MissingParameterError | ||
34 | 33 | ||
35 | class Perforce(Fetch): | 34 | class Perforce(Fetch): |
36 | def supports(self, url, ud, d): | 35 | def supports(self, url, ud, d): |
diff --git a/bitbake-dev/lib/bb/fetch/ssh.py b/bitbake-dev/lib/bb/fetch/ssh.py index 81a9892dcc..68e6fdb1df 100644 --- a/bitbake-dev/lib/bb/fetch/ssh.py +++ b/bitbake-dev/lib/bb/fetch/ssh.py | |||
@@ -37,11 +37,9 @@ IETF secsh internet draft: | |||
37 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 37 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
38 | 38 | ||
39 | import re, os | 39 | import re, os |
40 | import bb | ||
41 | from bb import data | 40 | from bb import data |
42 | from bb.fetch import Fetch | 41 | from bb.fetch import Fetch |
43 | from bb.fetch import FetchError | 42 | from bb.fetch import FetchError |
44 | from bb.fetch import MissingParameterError | ||
45 | 43 | ||
46 | 44 | ||
47 | __pattern__ = re.compile(r''' | 45 | __pattern__ = re.compile(r''' |
diff --git a/bitbake-dev/lib/bb/fetch/svk.py b/bitbake-dev/lib/bb/fetch/svk.py index d863ccb6e0..4dfae1819b 100644 --- a/bitbake-dev/lib/bb/fetch/svk.py +++ b/bitbake-dev/lib/bb/fetch/svk.py | |||
@@ -25,7 +25,7 @@ This implementation is for svk. It is based on the svn implementation | |||
25 | # | 25 | # |
26 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 26 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
27 | 27 | ||
28 | import os, re | 28 | import os |
29 | import bb | 29 | import bb |
30 | from bb import data | 30 | from bb import data |
31 | from bb.fetch import Fetch | 31 | from bb.fetch import Fetch |
@@ -67,6 +67,7 @@ class Svk(Fetch): | |||
67 | 67 | ||
68 | svkroot = ud.host + ud.path | 68 | svkroot = ud.host + ud.path |
69 | 69 | ||
70 | # pyflakes claims date is not known... it looks right | ||
70 | svkcmd = "svk co -r {%s} %s/%s" % (date, svkroot, ud.module) | 71 | svkcmd = "svk co -r {%s} %s/%s" % (date, svkroot, ud.module) |
71 | 72 | ||
72 | if ud.revision: | 73 | if ud.revision: |
diff --git a/bitbake-dev/lib/bb/fetch/svn.py b/bitbake-dev/lib/bb/fetch/svn.py index aead1629b3..eef9862a84 100644 --- a/bitbake-dev/lib/bb/fetch/svn.py +++ b/bitbake-dev/lib/bb/fetch/svn.py | |||
@@ -23,7 +23,7 @@ BitBake 'Fetch' implementation for svn. | |||
23 | # | 23 | # |
24 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 24 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
25 | 25 | ||
26 | import os, re | 26 | import os |
27 | import sys | 27 | import sys |
28 | import bb | 28 | import bb |
29 | from bb import data | 29 | from bb import data |
diff --git a/bitbake-dev/lib/bb/fetch/wget.py b/bitbake-dev/lib/bb/fetch/wget.py index 442fc3e489..2a899c5808 100644 --- a/bitbake-dev/lib/bb/fetch/wget.py +++ b/bitbake-dev/lib/bb/fetch/wget.py | |||
@@ -25,7 +25,7 @@ BitBake build tools. | |||
25 | # | 25 | # |
26 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 26 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
27 | 27 | ||
28 | import os, re | 28 | import os |
29 | import bb | 29 | import bb |
30 | from bb import data | 30 | from bb import data |
31 | from bb.fetch import Fetch | 31 | from bb.fetch import Fetch |
diff --git a/bitbake-dev/lib/bb/msg.py b/bitbake-dev/lib/bb/msg.py index 7aa0a27d25..7990833c2e 100644 --- a/bitbake-dev/lib/bb/msg.py +++ b/bitbake-dev/lib/bb/msg.py | |||
@@ -22,8 +22,8 @@ Message handling infrastructure for bitbake | |||
22 | # with this program; if not, write to the Free Software Foundation, Inc., | 22 | # with this program; if not, write to the Free Software Foundation, Inc., |
23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
24 | 24 | ||
25 | import sys, os, re, bb | 25 | import sys, bb |
26 | from bb import utils, event | 26 | from bb import event |
27 | 27 | ||
28 | debug_level = {} | 28 | debug_level = {} |
29 | 29 | ||
diff --git a/bitbake-dev/lib/bb/providers.py b/bitbake-dev/lib/bb/providers.py index 3e842ee0ca..d0e71173df 100644 --- a/bitbake-dev/lib/bb/providers.py +++ b/bitbake-dev/lib/bb/providers.py | |||
@@ -21,7 +21,7 @@ | |||
21 | # with this program; if not, write to the Free Software Foundation, Inc., | 21 | # with this program; if not, write to the Free Software Foundation, Inc., |
22 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 22 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
23 | 23 | ||
24 | import os, re | 24 | import re |
25 | from bb import data, utils | 25 | from bb import data, utils |
26 | import bb | 26 | import bb |
27 | 27 | ||
diff --git a/bitbake-dev/lib/bb/runqueue.py b/bitbake-dev/lib/bb/runqueue.py index 01452d2f33..4f0996dad6 100644 --- a/bitbake-dev/lib/bb/runqueue.py +++ b/bitbake-dev/lib/bb/runqueue.py | |||
@@ -23,7 +23,6 @@ Handles preparation and execution of a queue of tasks | |||
23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
24 | 24 | ||
25 | from bb import msg, data, event, mkdirhier, utils | 25 | from bb import msg, data, event, mkdirhier, utils |
26 | from sets import Set | ||
27 | import bb, os, sys | 26 | import bb, os, sys |
28 | import signal | 27 | import signal |
29 | import stat | 28 | import stat |
@@ -544,8 +543,8 @@ class RunQueue: | |||
544 | 543 | ||
545 | self.runq_fnid.append(taskData.tasks_fnid[task]) | 544 | self.runq_fnid.append(taskData.tasks_fnid[task]) |
546 | self.runq_task.append(taskData.tasks_name[task]) | 545 | self.runq_task.append(taskData.tasks_name[task]) |
547 | self.runq_depends.append(Set(depends)) | 546 | self.runq_depends.append(set(depends)) |
548 | self.runq_revdeps.append(Set()) | 547 | self.runq_revdeps.append(set()) |
549 | 548 | ||
550 | runq_build.append(0) | 549 | runq_build.append(0) |
551 | 550 | ||
@@ -641,7 +640,7 @@ class RunQueue: | |||
641 | if maps[origdep] == -1: | 640 | if maps[origdep] == -1: |
642 | bb.msg.fatal(bb.msg.domain.RunQueue, "Invalid mapping - Should never happen!") | 641 | bb.msg.fatal(bb.msg.domain.RunQueue, "Invalid mapping - Should never happen!") |
643 | newdeps.append(maps[origdep]) | 642 | newdeps.append(maps[origdep]) |
644 | self.runq_depends[listid] = Set(newdeps) | 643 | self.runq_depends[listid] = set(newdeps) |
645 | 644 | ||
646 | bb.msg.note(2, bb.msg.domain.RunQueue, "Assign Weightings") | 645 | bb.msg.note(2, bb.msg.domain.RunQueue, "Assign Weightings") |
647 | 646 | ||
diff --git a/bitbake-dev/lib/bb/shell.py b/bitbake-dev/lib/bb/shell.py index 9d47effd69..2ab855b644 100644 --- a/bitbake-dev/lib/bb/shell.py +++ b/bitbake-dev/lib/bb/shell.py | |||
@@ -510,7 +510,7 @@ SRC_URI = "" | |||
510 | 510 | ||
511 | def stage( self, params ): | 511 | def stage( self, params ): |
512 | """Execute 'stage' on a providee""" | 512 | """Execute 'stage' on a providee""" |
513 | self.build( params, "stage" ) | 513 | self.build( params, "populate_staging" ) |
514 | stage.usage = "<providee>" | 514 | stage.usage = "<providee>" |
515 | 515 | ||
516 | def status( self, params ): | 516 | def status( self, params ): |
diff --git a/bitbake-dev/lib/bb/taskdata.py b/bitbake-dev/lib/bb/taskdata.py index 64ab032c3c..52a4f4e647 100644 --- a/bitbake-dev/lib/bb/taskdata.py +++ b/bitbake-dev/lib/bb/taskdata.py | |||
@@ -23,8 +23,7 @@ Task data collection and handling | |||
23 | # with this program; if not, write to the Free Software Foundation, Inc., | 23 | # with this program; if not, write to the Free Software Foundation, Inc., |
24 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 24 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
25 | 25 | ||
26 | from bb import data, event, mkdirhier, utils | 26 | import bb |
27 | import bb, os | ||
28 | 27 | ||
29 | class TaskData: | 28 | class TaskData: |
30 | """ | 29 | """ |
diff --git a/bitbake-dev/lib/bb/ui/crumbs/buildmanager.py b/bitbake-dev/lib/bb/ui/crumbs/buildmanager.py index 572cc4c7c8..f89e8eefd4 100644 --- a/bitbake-dev/lib/bb/ui/crumbs/buildmanager.py +++ b/bitbake-dev/lib/bb/ui/crumbs/buildmanager.py | |||
@@ -20,9 +20,7 @@ | |||
20 | 20 | ||
21 | import gtk | 21 | import gtk |
22 | import gobject | 22 | import gobject |
23 | import gtk.glade | ||
24 | import threading | 23 | import threading |
25 | import urllib2 | ||
26 | import os | 24 | import os |
27 | import datetime | 25 | import datetime |
28 | import time | 26 | import time |
diff --git a/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py b/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py index 54d56c2452..34f65d2396 100644 --- a/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | import gtk | 21 | import gtk |
22 | import gobject | 22 | import gobject |
23 | import gtk.glade | ||
24 | 23 | ||
25 | class RunningBuildModel (gtk.TreeStore): | 24 | class RunningBuildModel (gtk.TreeStore): |
26 | (COL_TYPE, COL_PACKAGE, COL_TASK, COL_MESSAGE, COL_ICON, COL_ACTIVE) = (0, 1, 2, 3, 4, 5) | 25 | (COL_TYPE, COL_PACKAGE, COL_TASK, COL_MESSAGE, COL_ICON, COL_ACTIVE) = (0, 1, 2, 3, 4, 5) |
diff --git a/bitbake-dev/lib/bb/ui/depexp.py b/bitbake-dev/lib/bb/ui/depexp.py index 9d92fa0a08..0c559c7976 100644 --- a/bitbake-dev/lib/bb/ui/depexp.py +++ b/bitbake-dev/lib/bb/ui/depexp.py | |||
@@ -20,6 +20,7 @@ | |||
20 | import gobject | 20 | import gobject |
21 | import gtk | 21 | import gtk |
22 | import threading | 22 | import threading |
23 | import xmlrpclib | ||
23 | 24 | ||
24 | # Package Model | 25 | # Package Model |
25 | (COL_PKG_NAME) = (0) | 26 | (COL_PKG_NAME) = (0) |
diff --git a/bitbake-dev/lib/bb/ui/goggle.py b/bitbake-dev/lib/bb/ui/goggle.py index 0118a356fa..94995d82db 100644 --- a/bitbake-dev/lib/bb/ui/goggle.py +++ b/bitbake-dev/lib/bb/ui/goggle.py | |||
@@ -20,8 +20,7 @@ | |||
20 | 20 | ||
21 | import gobject | 21 | import gobject |
22 | import gtk | 22 | import gtk |
23 | import threading | 23 | import xmlrpclib |
24 | import bb.ui.uihelper | ||
25 | from bb.ui.crumbs.runningbuild import RunningBuildTreeView, RunningBuild | 24 | from bb.ui.crumbs.runningbuild import RunningBuildTreeView, RunningBuild |
26 | 25 | ||
27 | def event_handle_idle_func (eventHandler, build): | 26 | def event_handle_idle_func (eventHandler, build): |
diff --git a/bitbake-dev/lib/bb/ui/knotty.py b/bitbake-dev/lib/bb/ui/knotty.py index a6595df3f4..a334c2977e 100644 --- a/bitbake-dev/lib/bb/ui/knotty.py +++ b/bitbake-dev/lib/bb/ui/knotty.py | |||
@@ -19,11 +19,8 @@ | |||
19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20 | 20 | ||
21 | import os | 21 | import os |
22 | import bb | ||
23 | from bb import cooker | ||
24 | 22 | ||
25 | import sys | 23 | import sys |
26 | import time | ||
27 | import itertools | 24 | import itertools |
28 | import xmlrpclib | 25 | import xmlrpclib |
29 | 26 | ||
diff --git a/bitbake-dev/lib/bb/ui/ncurses.py b/bitbake-dev/lib/bb/ui/ncurses.py index 3cac264648..2cd7e8e6e7 100644 --- a/bitbake-dev/lib/bb/ui/ncurses.py +++ b/bitbake-dev/lib/bb/ui/ncurses.py | |||
@@ -44,9 +44,9 @@ | |||
44 | 44 | ||
45 | """ | 45 | """ |
46 | 46 | ||
47 | import os, sys, curses, time, random, threading, itertools, time | 47 | import os, sys, curses, itertools, time |
48 | from curses.textpad import Textbox | ||
49 | import bb | 48 | import bb |
49 | import xmlrpclib | ||
50 | from bb import ui | 50 | from bb import ui |
51 | from bb.ui import uihelper | 51 | from bb.ui import uihelper |
52 | 52 | ||
@@ -180,6 +180,7 @@ class NCursesUI: | |||
180 | def __init__( self, x, y, width, height ): | 180 | def __init__( self, x, y, width, height ): |
181 | NCursesUI.Window.__init__( self, x, y, width, height ) | 181 | NCursesUI.Window.__init__( self, x, y, width, height ) |
182 | 182 | ||
183 | # put that to the top again from curses.textpad import Textbox | ||
183 | # self.textbox = Textbox( self.win ) | 184 | # self.textbox = Textbox( self.win ) |
184 | # t = threading.Thread() | 185 | # t = threading.Thread() |
185 | # t.run = self.textbox.edit | 186 | # t.run = self.textbox.edit |
diff --git a/bitbake-dev/lib/bb/ui/puccho.py b/bitbake-dev/lib/bb/ui/puccho.py index a6a613f1cf..dd34182c8d 100644 --- a/bitbake-dev/lib/bb/ui/puccho.py +++ b/bitbake-dev/lib/bb/ui/puccho.py | |||
@@ -24,7 +24,6 @@ import gtk.glade | |||
24 | import threading | 24 | import threading |
25 | import urllib2 | 25 | import urllib2 |
26 | import os | 26 | import os |
27 | import datetime | ||
28 | 27 | ||
29 | from bb.ui.crumbs.buildmanager import BuildManager, BuildConfiguration | 28 | from bb.ui.crumbs.buildmanager import BuildManager, BuildConfiguration |
30 | from bb.ui.crumbs.buildmanager import BuildManagerTreeView | 29 | from bb.ui.crumbs.buildmanager import BuildManagerTreeView |
diff --git a/bitbake-dev/lib/bb/ui/uievent.py b/bitbake-dev/lib/bb/ui/uievent.py index 9d724d7fc5..23fdd0f961 100644 --- a/bitbake-dev/lib/bb/ui/uievent.py +++ b/bitbake-dev/lib/bb/ui/uievent.py | |||
@@ -24,7 +24,7 @@ server and queue them for the UI to process. This process must be used to avoid | |||
24 | client/server deadlocks. | 24 | client/server deadlocks. |
25 | """ | 25 | """ |
26 | 26 | ||
27 | import sys, socket, threading | 27 | import socket, threading |
28 | from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler | 28 | from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler |
29 | 29 | ||
30 | class BBUIEventQueue: | 30 | class BBUIEventQueue: |
@@ -37,8 +37,8 @@ class BBUIEventQueue: | |||
37 | self.BBServer = BBServer | 37 | self.BBServer = BBServer |
38 | 38 | ||
39 | self.t = threading.Thread() | 39 | self.t = threading.Thread() |
40 | self.t.setDaemon(True) | 40 | self.t.setDaemon(True) |
41 | self.t.run = self.startCallbackHandler | 41 | self.t.run = self.startCallbackHandler |
42 | self.t.start() | 42 | self.t.start() |
43 | 43 | ||
44 | def getEvent(self): | 44 | def getEvent(self): |
@@ -72,7 +72,7 @@ class BBUIEventQueue: | |||
72 | def startCallbackHandler(self): | 72 | def startCallbackHandler(self): |
73 | 73 | ||
74 | server = UIXMLRPCServer() | 74 | server = UIXMLRPCServer() |
75 | self.host, self.port = server.socket.getsockname() | 75 | self.host, self.port = server.socket.getsockname() |
76 | 76 | ||
77 | server.register_function( self.system_quit, "event.quit" ) | 77 | server.register_function( self.system_quit, "event.quit" ) |
78 | server.register_function( self.queue_event, "event.send" ) | 78 | server.register_function( self.queue_event, "event.send" ) |
@@ -85,7 +85,7 @@ class BBUIEventQueue: | |||
85 | server.handle_request() | 85 | server.handle_request() |
86 | server.server_close() | 86 | server.server_close() |
87 | 87 | ||
88 | def system_quit( self ): | 88 | def system_quit( self ): |
89 | """ | 89 | """ |
90 | Shut down the callback thread | 90 | Shut down the callback thread |
91 | """ | 91 | """ |
@@ -97,11 +97,11 @@ class BBUIEventQueue: | |||
97 | 97 | ||
98 | class UIXMLRPCServer (SimpleXMLRPCServer): | 98 | class UIXMLRPCServer (SimpleXMLRPCServer): |
99 | 99 | ||
100 | def __init__( self, interface = ("localhost", 0) ): | 100 | def __init__( self, interface = ("localhost", 0) ): |
101 | self.quit = False | 101 | self.quit = False |
102 | SimpleXMLRPCServer.__init__( self, | 102 | SimpleXMLRPCServer.__init__( self, |
103 | interface, | 103 | interface, |
104 | requestHandler=SimpleXMLRPCRequestHandler, | 104 | requestHandler=SimpleXMLRPCRequestHandler, |
105 | logRequests=False, allow_none=True) | 105 | logRequests=False, allow_none=True) |
106 | 106 | ||
107 | def get_request(self): | 107 | def get_request(self): |
@@ -123,5 +123,5 @@ class UIXMLRPCServer (SimpleXMLRPCServer): | |||
123 | if request is None: | 123 | if request is None: |
124 | return | 124 | return |
125 | SimpleXMLRPCServer.process_request(self, request, client_address) | 125 | SimpleXMLRPCServer.process_request(self, request, client_address) |
126 | 126 | ||
127 | 127 | ||
diff --git a/bitbake-dev/lib/bb/xmlrpcserver.py b/bitbake-dev/lib/bb/xmlrpcserver.py index 075eda0573..2a23436b65 100644 --- a/bitbake-dev/lib/bb/xmlrpcserver.py +++ b/bitbake-dev/lib/bb/xmlrpcserver.py | |||
@@ -37,7 +37,7 @@ import xmlrpclib | |||
37 | DEBUG = False | 37 | DEBUG = False |
38 | 38 | ||
39 | from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler | 39 | from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler |
40 | import os, sys, inspect, select | 40 | import inspect, select |
41 | 41 | ||
42 | class BitBakeServerCommands(): | 42 | class BitBakeServerCommands(): |
43 | def __init__(self, server, cooker): | 43 | def __init__(self, server, cooker): |