emerge: rename --no*-atoms to --*-exclude
authorZac Medico <zmedico@gentoo.org>
Mon, 2 May 2011 19:12:13 +0000 (12:12 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 2 May 2011 19:12:13 +0000 (12:12 -0700)
man/emerge.1
pym/_emerge/depgraph.py
pym/_emerge/help.py
pym/_emerge/main.py
pym/portage/tests/resolver/test_rebuild.py

index 3dcd20cf52a9a7b4f2243d348fd45327660abfb9..f7b6043272db5cf41b14f40d8a8478906a1b2d37 100644 (file)
@@ -485,11 +485,11 @@ may have changed.
 Disables the spinner for the session.  The spinner is active when the
 terminal device is determined to be a TTY.  This flag disables it regardless.
 .TP
-.BR "\-\-nousepkg\-atoms " ATOMS
+.BR "\-\-usepkg\-exclude " ATOMS
 A space separated list of package names or slot atoms. Emerge will ignore
 matching binary packages.
 .TP
-.BR "\-\-norebuild\-atoms " ATOMS
+.BR "\-\-rebuild\-exclude " ATOMS
 A space separated list of package names or slot atoms. Emerge will not rebuild
 matching packages due to \fB\-\-rebuild\fR.
 .TP
index 80d701cd64a716f84a6261d609fa2d56b95a8c02..5183b27f6df7d61b23ff2c64cb1d60ce6fd21fda 100644 (file)
@@ -124,12 +124,12 @@ class _frozen_depgraph_config(object):
                self.excluded_pkgs = _wildcard_set(atoms)
                atoms = ' '.join(myopts.get("--reinstall-atoms", [])).split()
                self.reinstall_atoms = _wildcard_set(atoms)
-               atoms = ' '.join(myopts.get("--nousepkg-atoms", [])).split()
-               self.nousepkg_atoms = _wildcard_set(atoms)
+               atoms = ' '.join(myopts.get("--usepkg-exclude", [])).split()
+               self.usepkg_exclude = _wildcard_set(atoms)
                atoms = ' '.join(myopts.get("--useoldpkg-atoms", [])).split()
                self.useoldpkg_atoms = _wildcard_set(atoms)
-               atoms = ' '.join(myopts.get("--norebuild-atoms", [])).split()
-               self.norebuild_atoms = _wildcard_set(atoms)
+               atoms = ' '.join(myopts.get("--rebuild-exclude", [])).split()
+               self.rebuild_exclude = _wildcard_set(atoms)
 
                self.rebuild = "--rebuild" in myopts
 
@@ -155,11 +155,11 @@ class _rebuild_config(object):
        def add(self, dep_pkg, dep):
                parent = dep.collapsed_parent
                priority = dep.collapsed_priority
-               norebuild_atoms = self._frozen_config.norebuild_atoms
+               rebuild_exclude = self._frozen_config.rebuild_exclude
                if (self._frozen_config.rebuild and isinstance(parent, Package) and
                        parent.built and (priority.buildtime or priority.runtime) and
                        isinstance(dep_pkg, Package) and
-                       not norebuild_atoms.findAtomForPackage(parent)):
+                       not rebuild_exclude.findAtomForPackage(parent)):
                        self._graph.add(dep_pkg, parent, priority)
 
        def _trigger_rebuild(self, parent, build_deps, runtime_deps):
@@ -3406,7 +3406,7 @@ class depgraph(object):
                use_ebuild_visibility = self._frozen_config.myopts.get(
                        '--use-ebuild-visibility', 'n') != 'n'
                reinstall_atoms = self._frozen_config.reinstall_atoms
-               nousepkg_atoms = self._frozen_config.nousepkg_atoms
+               usepkg_exclude = self._frozen_config.usepkg_exclude
                useoldpkg_atoms = self._frozen_config.useoldpkg_atoms
                matched_oldpkg = []
                # Behavior of the "selective" parameter depends on
@@ -3454,7 +3454,7 @@ class depgraph(object):
                                                        modified_use=self._pkg_use_enabled(pkg)):
                                                continue
 
-                                       if built and not installed and nousepkg_atoms.findAtomForPackage(pkg, \
+                                       if built and not installed and usepkg_exclude.findAtomForPackage(pkg, \
                                                modified_use=self._pkg_use_enabled(pkg)):
                                                break
 
index bf2437dcef1098a8319f35151ece86e5f9cbb8e9..85026ac8203f427e4593e239ed4c68b991ca48a2 100644 (file)
@@ -559,13 +559,13 @@ def help(myopts, havecolor=1):
                print("       "+green("--nospinner"))
                print("              Disables the spinner regardless of terminal type.")
                print()
-               print("       " + green("--nousepkg-atoms") + " " + turquoise("ATOMS"))
+               print("       " + green("--usepkg-exclude") + " " + turquoise("ATOMS"))
                desc = "A space separated list of package names or slot atoms." + \
                        " Emerge will ignore matching binary packages."
                for line in wrap(desc, desc_width):
                        print(desc_indent + line)
                print()
-               print("       " + green("--norebuild-atoms") + " " + turquoise("ATOMS"))
+               print("       " + green("--rebuild-exclude") + " " + turquoise("ATOMS"))
                desc = "A space separated list of package names or slot atoms." + \
                        " Emerge will not rebuild matching packages due to --rebuild."
                for line in wrap(desc, desc_width):
index 434fd5a5742bdd70bcd9a2ea06972e2732c8a0d6..552ea20823381365dcfd7e0ed4754bf230bd7438 100644 (file)
@@ -735,14 +735,14 @@ def parse_opts(tmpcmdline, silent=False):
                        "choices"  : true_y_or_n
                },
 
-               "--nousepkg-atoms": {
+               "--usepkg-exclude": {
                        "help"   :"A space separated list of package names or slot atoms. " + \
                                "Emerge will ignore matching binary packages. ",
 
                        "action" : "append",
                },
 
-               "--norebuild-atoms": {
+               "--rebuild-exclude": {
                        "help"   :"A space separated list of package names or slot atoms. " + \
                                "Emerge will not rebuild these packages due to the " + \
                                "--rebuild flag. ",
@@ -926,16 +926,16 @@ def parse_opts(tmpcmdline, silent=False):
                        parser.error("Invalid Atom(s) in --reinstall-atoms parameter: '%s' (only package names and slot atoms (with wildcards) allowed)\n" % \
                                (",".join(bad_atoms),))
 
-       if myoptions.norebuild_atoms:
-               bad_atoms = _find_bad_atoms(myoptions.norebuild_atoms)
+       if myoptions.rebuild_exclude:
+               bad_atoms = _find_bad_atoms(myoptions.rebuild_exclude)
                if bad_atoms and not silent:
-                       parser.error("Invalid Atom(s) in --norebuild-atoms parameter: '%s' (only package names and slot atoms (with wildcards) allowed)\n" % \
+                       parser.error("Invalid Atom(s) in --rebuild-exclude parameter: '%s' (only package names and slot atoms (with wildcards) allowed)\n" % \
                                (",".join(bad_atoms),))
 
-       if myoptions.nousepkg_atoms:
-               bad_atoms = _find_bad_atoms(myoptions.nousepkg_atoms)
+       if myoptions.usepkg_exclude:
+               bad_atoms = _find_bad_atoms(myoptions.usepkg_exclude)
                if bad_atoms and not silent:
-                       parser.error("Invalid Atom(s) in --nousepkg-atoms parameter: '%s' (only package names and slot atoms (with wildcards) allowed)\n" % \
+                       parser.error("Invalid Atom(s) in --usepkg-exclude parameter: '%s' (only package names and slot atoms (with wildcards) allowed)\n" % \
                                (",".join(bad_atoms),))
 
        if myoptions.useoldpkg_atoms:
index 9a9e2eeadbe6054c02dee876d82bbea2d8050ccb..809dbed6c1bfbe94954d2625bc4c90e18133f8c4 100644 (file)
@@ -45,7 +45,7 @@ class RebuildTestCase(TestCase):
                                ResolverPlaygroundTestCase(
                                        ["sys-libs/x"],
                                        options = {"--rebuild" : True,
-                                               "--norebuild-atoms" : ["sys-apps/b"]},
+                                               "--rebuild-exclude" : ["sys-apps/b"]},
                                        mergelist = ['sys-libs/x-2', 'sys-apps/a-2', 'sys-apps/e-2'],
                                        ignore_mergelist_order = True,
                                        success = True),