aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2015-02-21 11:38:58 -0500
committerTim Harder <radhermit@gmail.com>2015-02-21 11:38:58 -0500
commit34c7c51a4e09f9334e70be9ad4247c560a54234a (patch)
tree22837b3ec06454525e71da8aad6915074a3882ab
parentpmerge: minor wording and naming changes (diff)
downloadpkgcore-buildpkgonly.tar.gz
pkgcore-buildpkgonly.tar.bz2
pkgcore-buildpkgonly.zip
pmerge: initial -B/--buildpkgonly supportbuildpkgonly
-rw-r--r--pkgcore/scripts/pmerge.py27
1 files changed, 17 insertions, 10 deletions
diff --git a/pkgcore/scripts/pmerge.py b/pkgcore/scripts/pmerge.py
index a4ddac26..0717373e 100644
--- a/pkgcore/scripts/pmerge.py
+++ b/pkgcore/scripts/pmerge.py
@@ -125,6 +125,9 @@ resolution_options.add_argument(
'-b', '--buildpkg', action='store_true',
help="build binpkgs")
resolution_options.add_argument(
+ '-B', '--buildpkgonly', action='store_true',
+ help="only build binpkgs without merging them")
+resolution_options.add_argument(
'-k', '--usepkg', action='store_true',
help="prefer to use binpkgs")
resolution_options.add_argument(
@@ -722,17 +725,21 @@ def main(options, out, err):
del pkg_ops
out.write()
- if op.desc == "replace":
- if op.old_pkg == pkg:
- out.write(">>> Reinstalling %s" % (pkg.cpvstr))
- else:
- out.write(">>> Replacing %s with %s" % (
- op.old_pkg.cpvstr, pkg.cpvstr))
- i = domain.replace_pkg(op.old_pkg, pkg, repo_obs)
- cleanup.append(op.old_pkg.release_cached_data)
+ if options.buildpkgonly:
+ # run SavePkg trigger here
+ pass
else:
- out.write(">>> Installing %s" % (pkg.cpvstr,))
- i = domain.install_pkg(pkg, repo_obs)
+ if op.desc == "replace":
+ if op.old_pkg == pkg:
+ out.write(">>> Reinstalling %s" % (pkg.cpvstr))
+ else:
+ out.write(">>> Replacing %s with %s" % (
+ op.old_pkg.cpvstr, pkg.cpvstr))
+ i = domain.replace_pkg(op.old_pkg, pkg, repo_obs)
+ cleanup.append(op.old_pkg.release_cached_data)
+ else:
+ out.write(">>> Installing %s" % (pkg.cpvstr,))
+ i = domain.install_pkg(pkg, repo_obs)
# force this explicitly- can hold onto a helluva lot more
# then we would like.