From fe96679e58227d514067f63438ed0ab9343bfc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 19 May 2010 21:39:26 +0200 Subject: 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. --- pym/_emerge/depgraph.py | 2 +- pym/_emerge/main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pym') 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) -- cgit v1.2.3-1-g7c22