From: Michał Górny Date: Wed, 19 May 2010 19:39:26 +0000 (+0200) Subject: Support specifying exclude list as multiple arguments. X-Git-Tag: v2.2_rc68~595 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fe96679e58227d514067f63438ed0ab9343bfc2f;p=portage.git 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. --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 9687ef527..728ced29b 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 9f7a20da5..5422d32bb 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)