From eac87f21d3a697a2fd8f73012e622a674a459c6b Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Thu, 8 Jan 2009 19:52:54 +0000 Subject: [PATCH] Merged from trunk -r12347:12352 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit | 12348 | Bug #252572 - Fix a loop condition inside | | zmedico | depgraph._serialize_tasks() which can cause an infinite loop | | | that's triggered by unresolvable blockers. | | 12349 | Fix loop logic some more for bug #252572. | | zmedico | | | 12350 | Bail out earlier if the file name argument doesn't end with | | zmedico | '.ebuild'. Thanks to Diego 'Flameeyes' Pettenò for | | | reporting. | | 12351 | Bug #252562 - Show --onlydeps in short --help output. | | zmedico | | | 12352 | Revert r12348 since it's not really needed and the previous | | zmedico | version is more efficient. | svn path=/main/branches/prefix/; revision=12390 --- bin/ebuild | 6 ++++++ pym/_emerge/__init__.py | 14 ++++++++------ pym/_emerge/help.py | 3 ++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/bin/ebuild b/bin/ebuild index 1810c32a7..0ef80cfda 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -85,6 +85,12 @@ if portage.settings["NOCOLOR"] in ("yes","true") or not sys.stdout.isatty(): portage.output.nocolor() ebuild = pargs.pop(0) + +if not ebuild.endswith(".ebuild"): + portage.writemsg("'%s' does not end with '.ebuild'.\n" % \ + (ebuild,), noiselevel=-1) + sys.exit(1) + if not os.path.isabs(ebuild): mycwd = os.getcwd() # Try to get the non-canonical path from the PWD evironment variable, since diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 466a82fcf..ac7523f0c 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7038,15 +7038,17 @@ class depgraph(object): except KeyError: pass else: + uninst_task = node ignored_uninstall_tasks.add(node) break - # After dropping an Uninstall task, reset - # the state variables for leaf node selection and - # continue trying to select leaf nodes. - prefer_asap = True - accept_root_node = False - continue + if uninst_task is not None: + # After dropping an Uninstall task, reset + # the state variables for leaf node selection and + # continue trying to select leaf nodes. + prefer_asap = True + accept_root_node = False + continue if not selected_nodes: self._circular_deps_for_display = mygraph diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py index bea1f13c0..f662584d7 100644 --- a/pym/_emerge/help.py +++ b/pym/_emerge/help.py @@ -18,7 +18,8 @@ def shorthelp(): print " [ " + green("--color")+" < " + turquoise("y") + " | "+ turquoise("n")+" > ] [ "+green("--columns")+" ]" print " [ "+green("--complete-graph")+" ] [ "+green("--deep")+" ]" print " [ "+green("--jobs") + " " + turquoise("JOBS")+" ] [ "+green("--keep-going")+" ] [ " + green("--load-average")+" " + turquoise("LOAD") + " ]" - print " [ "+green("--newuse")+" ] [ "+green("--noconfmem")+" ] [ "+green("--nospinner")+" ] [ "+green("--oneshot")+" ]" + print " [ "+green("--newuse")+" ] [ "+green("--noconfmem")+" ] [ "+green("--nospinner")+" ]" + print " [ "+green("--oneshot")+" ] [ "+green("--onlydeps")+" ]" print " [ "+green("--reinstall ")+turquoise("changed-use")+" ] [ " + green("--with-bdeps")+" < " + turquoise("y") + " | "+ turquoise("n")+" > ]" print bold("Actions:")+" [ "+green("--depclean")+" | "+green("--list-sets")+" | "+green("--search")+" | "+green("--sync")+" | "+green("--version")+" ]" -- 2.26.2