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 21fffd0984a5459f80e638d14ebfc20e08ff2030 (commit) via 15bd4b9333a6a74fe49927f539572b10faa4249a (commit) from 9ee8f32b4cef43b5764c60066bfca4e7705e1161 (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 21fffd0984a5459f80e638d14ebfc20e08ff2030 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 23 16:25:37 2010 +0100
naoki: Add switch to build only dependencies of a given package.
./make.sh build <package> --only-deps will build all dependencies for the package but not the package itself.
commit 15bd4b9333a6a74fe49927f539572b10faa4249a Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 23 16:19:49 2010 +0100
naoki: Add switch to build dependencies of a package, too.
./make.sh build <package> --with-deps will build all the deps first and will then build <package>.
-----------------------------------------------------------------------
Summary of changes: naoki/__init__.py | 11 ++++++++++- naoki/backend.py | 10 ++++++---- naoki/terminal.py | 2 ++ 3 files changed, 18 insertions(+), 5 deletions(-)
Difference in files: diff --git a/naoki/__init__.py b/naoki/__init__.py index ae29859..23e5485 100644 --- a/naoki/__init__.py +++ b/naoki/__init__.py @@ -82,7 +82,16 @@ class Naoki(object): self.log.warn("Skipping %s which was already built" % package.name) continue
- packages.append(package) + if not args.onlydeps: + packages.append(package) + + if args.withdeps or args.onlydeps: + deps = [] + for dep in package.dependencies_all: + if not dep.built: + deps.append(dep.name) + + packages.extend(backend.parse_package(deps, naoki=self))
if len(packages) >= 2: packages_sorted = backend.depsort(packages) diff --git a/naoki/backend.py b/naoki/backend.py index 33d04dd..0d5cb4d 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, toolchain=False): +def depsolve(packages, recursive=False, build=False, toolchain=False): deps = [] for package in packages: if not package in deps: @@ -86,6 +86,8 @@ def depsolve(packages, recursive=False, toolchain=False): length = len(deps) for dep in deps[:]: deps.extend(dep.dependencies) + if build: + deps.extend(dep.dependencies_build)
new_deps = [] for dep in deps: @@ -107,7 +109,7 @@ def deptree(packages, toolchain=False): next = [] stage = ret[-1][:] for package in stage[:]: - for dep in package.info.dependencies_all: + for dep in package.dependencies_all: if dep in ret[-1]: stage.remove(package) next.append(package) @@ -123,7 +125,7 @@ def deptree(packages, toolchain=False): return ret
def depsort(packages, toolchain=False): - ret = [] + ret = [] for l1 in deptree(packages, toolchain=toolchain): ret.extend(l1) return ret @@ -290,7 +292,7 @@ class PackageInfo(object): deps = self.dependencies if not self.__toolchain: deps.extend(self.dependencies_build) - return depsolve(deps, recursive=True) + return depsolve(deps, build=True, recursive=True)
@property def dependencies_toolchain(self): diff --git a/naoki/terminal.py b/naoki/terminal.py index 0e73d5a..c979cbd 100644 --- a/naoki/terminal.py +++ b/naoki/terminal.py @@ -255,6 +255,8 @@ class Commandline(object): Parser("build", help="Primary build command", arguments=[ + Option("withdeps", ["--with-deps"], help="Build all dependencies first if needed"), + Option("onlydeps", ["--only-deps"], help="Build only dependencies that belong to a package"), List("packages", help="Give a list of packages to build or say 'all'"), ]),
hooks/post-receive -- IPFire 3.x development tree