This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via 18e9d0d882cd9a8ab3f40dbbce964641d7c1865b (commit) from d2615b9c7d4ba3a83d6c1ec3430428a0aeaa6784 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 18e9d0d882cd9a8ab3f40dbbce964641d7c1865b Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Mar 20 17:57:08 2010 +0100
naoki: Fix toolchain dependency resolution.
-----------------------------------------------------------------------
Summary of changes: naoki/__init__.py | 4 ++++ naoki/backend.py | 28 +++++++++++++++++++++------- naoki/terminal.py | 1 + 3 files changed, 26 insertions(+), 7 deletions(-)
Difference in files: diff --git a/naoki/__init__.py b/naoki/__init__.py index 9bafd46..314efff 100644 --- a/naoki/__init__.py +++ b/naoki/__init__.py @@ -49,6 +49,7 @@ class Naoki(object): actionmap = { "build" : self.call_toolchain_build, "download" : self.call_toolchain_download, + "tree" : self.call_toolchain_tree, }
return actionmap[args.action.name](args.action) @@ -63,6 +64,9 @@ class Naoki(object):
return toolchain.download()
+ def call_toolchain_tree(self, args): + print backend.deptree(backend.parse_package(backend.get_package_names(toolchain=True), toolchain=True)) + def call_build(self, args): force = True
diff --git a/naoki/backend.py b/naoki/backend.py index e4b2022..4928b8b 100644 --- a/naoki/backend.py +++ b/naoki/backend.py @@ -73,7 +73,7 @@ def find_package_name(name, toolchain=False): if os.path.basename(package) == name: return package
-def depsolve(packages, recursive=False): +def depsolve(packages, recursive=False, toolchain=False): deps = [] for package in packages: if not package in deps: @@ -100,7 +100,7 @@ def depsolve(packages, recursive=False): deps.sort() return deps
-def deptree(packages): +def deptree(packages, toolchain=False): ret = [packages]
while True: @@ -122,9 +122,9 @@ def deptree(packages):
return ret
-def depsort(packages): +def depsort(packages, toolchain=False): ret = [] - for l1 in deptree(packages): + for l1 in deptree(packages, toolchain=toolchain): ret.extend(l1) return ret
@@ -245,16 +245,19 @@ class PackageInfo(object):
return True
- def _dependencies(self, s, recursive=False): + def _dependencies(self, s, recursive=False, toolchain=False): c = s + "_CACHE" if not self._data.has_key(c): - deps = parse_package(self._data.get(s).split(" ")) + deps = parse_package(self._data.get(s).split(" "), toolchain=toolchain) self._data.update({c : depsolve(deps, recursive)})
return self._data.get(c)
@property def dependencies(self): + if self.__toolchain: + return self.dependencies_toolchain + return self._dependencies("PKG_DEPENDENCIES")
@property @@ -281,7 +284,14 @@ class PackageInfo(object):
@property def dependencies_all(self): - return depsolve(self.dependencies + self.dependencies_build, recursive=True) + deps = self.dependencies + if not self.__toolchain: + deps.extend(self.dependencies_build) + return depsolve(deps, recursive=True) + + @property + def dependencies_toolchain(self): + return self._dependencies("PKG_TOOLCHAIN_DEPENDENCIES", toolchain=True)
@property def description(self): @@ -340,6 +350,10 @@ class PackageInfo(object): def version(self): return self._data.get("PKG_VER")
+ @property + def __toolchain(self): + return self.repo.name == "toolchain" +
class Package(object): def __init__(self, name, naoki, toolchain=False): diff --git a/naoki/terminal.py b/naoki/terminal.py index 5ed1048..f5667f5 100644 --- a/naoki/terminal.py +++ b/naoki/terminal.py @@ -200,6 +200,7 @@ class Commandline(object): parsers=[ Parser("download"), Parser("build"), + Parser("tree"), ]),
# Package
hooks/post-receive -- IPFire 3.x development tree