For bug #144333, make the --reinstall option a single choice type.
authorZac Medico <zmedico@gentoo.org>
Thu, 28 Jun 2007 02:36:53 +0000 (02:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 28 Jun 2007 02:36:53 +0000 (02:36 -0000)
svn path=/main/trunk/; revision=7069

pym/emerge/__init__.py

index 838d1fbb6b986fe1b05afb26fa21c980db4a2f96..e38641eedf585edcf6c6caff2e9365194dd6b198 100644 (file)
@@ -1053,7 +1053,7 @@ class depgraph(object):
                        elif org_iuse.intersection(orig_use) != \
                                cur_iuse.intersection(cur_use):
                                return True
-               elif "changed-use" in self.myopts.get("--reinstall","").split(","):
+               elif "changed-use" == self.myopts.get("--reinstall"):
                        if org_iuse.intersection(orig_use) != \
                                cur_iuse.intersection(cur_use):
                                return True
@@ -5329,7 +5329,9 @@ def parse_opts(tmpcmdline, silent=False):
                        "choices":("y", "n")
                },
                "--reinstall": {
-                       "help":"specify conditions to trigger package reinstallation"
+                       "help":"specify conditions to trigger package reinstallation",
+                       "type":"choice",
+                       "choices":["changed-use"]
                }
        }