summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <gentoo@mgorny.alt.pl>2010-05-19 21:39:26 +0200
committerZac Medico <zmedico@gentoo.org>2010-05-19 21:16:23 -0700
commitfe96679e58227d514067f63438ed0ab9343bfc2f (patch)
treecf0a455ab49ac8958e18f9ad589b733ee5737c34
parentBug #318241 - Add GPL-2 LICENSE file. (diff)
downloadportage-idfetch-fe96679e58227d514067f63438ed0ab9343bfc2f.tar.gz
portage-idfetch-fe96679e58227d514067f63438ed0ab9343bfc2f.tar.bz2
portage-idfetch-fe96679e58227d514067f63438ed0ab9343bfc2f.zip
Support specifying exclude list as multiple arguments.
Instead of relying on user to provide the whole exclude list as a space-separated list in a single argument (which is uncomfortable), allow him/her to specify '--exclude' multiple times, joining the provided atom lists together.
-rw-r--r--pym/_emerge/depgraph.py2
-rw-r--r--pym/_emerge/main.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 9687ef52..728ced29 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -94,7 +94,7 @@ class _frozen_depgraph_config(object):
self._required_set_names = set(["world"])
self.excluded_pkgs = InternalPackageSet()
- for x in myopts.get("--exclude", "").split():
+ for x in ' '.join(myopts.get("--exclude", [])).split():
try:
x = Atom(x)
except portage.exception.InvalidAtom:
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 9f7a20da..5422d32b 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -565,7 +565,7 @@ def parse_opts(tmpcmdline, silent=False):
"Emerge won't install any ebuild or binary package that " + \
"matches any of the given package atoms.",
- "action" : "store"
+ "action" : "append"
},
"--fail-clean": {
@@ -735,7 +735,7 @@ def parse_opts(tmpcmdline, silent=False):
if myoptions.exclude:
exclude = []
bad_atoms = []
- for x in myoptions.exclude.split():
+ for x in ' '.join(myoptions.exclude).split():
bad_atom = False
try:
atom = portage.dep.Atom(x)