From 676dff53cf62228ed4fb7c06dd1e1c7653f84137 Mon Sep 17 00:00:00 2001 From: David James Date: Thu, 21 Oct 2010 16:47:00 -0700 Subject: [PATCH] Import portage when it's used to fix broken tree. This is just a temporary workaround until buildbots have portage installed outside the chroot. We should roll this back when that's fixed. TBR=sosa@chromium.org BUG=b0rked tree TEST=ran unit tests Change-Id: I004c1476e929212774218d50d10f371806cf6c7f Review URL: http://codereview.chromium.org/4070002 --- cros_mark_as_stable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cros_mark_as_stable.py b/cros_mark_as_stable.py index c302969e91..927ec3278c 100755 --- a/cros_mark_as_stable.py +++ b/cros_mark_as_stable.py @@ -14,7 +14,6 @@ import re import shutil import subprocess import sys -from portage.versions import pkgsplit, pkgsplit, vercmp sys.path.append(os.path.join(os.path.dirname(__file__), 'lib')) from cros_build_lib import Info, RunCommand, Warning, Die @@ -74,6 +73,7 @@ def _Print(message): def _BestEBuild(ebuilds): """Returns the newest EBuild from a list of EBuild objects.""" + from portage.versions import vercmp winner = ebuilds[0] for ebuild in ebuilds[1:]: if vercmp(winner.version, ebuild.version) < 0: @@ -279,6 +279,7 @@ class _EBuild(object): Uses equery to find the ebuild path and sets data about an ebuild for easy reference. """ + from portage.versions import pkgsplit self.ebuild_path = path (self.ebuild_path_no_revision, self.ebuild_path_no_version,