Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: cros_mark_as_stable.py

Issue 4070002: Import portage when it's used to fix broken tree. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cros_mark_as_stable.py
diff --git a/cros_mark_as_stable.py b/cros_mark_as_stable.py
index c302969e9148ffc0e710b7319cef149f0df9246c..927ec3278c64879ab26129f6a610c4c74694b9c6 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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698