xbuddy: Remove xbuddy files from platform.
Delete the following files:
android_build.py
artifact_info.py
build_artifact.py
build_artifact_unittest.py
build_util.py
common_util.py
common_util_unittest.py
devserver_constants.py
downloader.py
downloader_unittest.py
log_util.py
retry.py
xbuddy.py
xbuddy_unittest.py
shadow_xbuddy_config.ini
xbuddy_config.ini
Update the imports in the following files:
autoupdate.py
autoupdate_unittest.py
builder.py
cros_update_progress.py
devserver.py
devserver_integration_test.py
health_checker.py
Rename log_util.py to cherrypy_log_util.py
Remove files from Makefile
Fix lint errors in builder.py
Patchset 1 is the file deletion, subsequent patchsets have code changes.
BUG=chromium:1003986
TEST=unittests, cros flash, devserver_integration_test
Cq-Depend: chromium:1894475
Change-Id: I4e70d0971eda00263a69906a6c1b11a3014d947c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/1893644
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
diff --git a/builder.py b/builder.py
index f8a597b..7d6c62f 100644
--- a/builder.py
+++ b/builder.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Copyright (c) 2009-2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -10,12 +11,11 @@
import subprocess
import tempfile
-from portage import dbapi
-from portage import xpak
-import cherrypy
-import portage
+import portage # pylint: disable=import-error
+import cherrypy # pylint: disable=import-error
-import log_util
+import setup_chromite # pylint: disable=unused-import
+from chromite.lib.xbuddy import cherrypy_log_util
# Relative path to the wrapper directory inside the sysroot.
@@ -34,7 +34,7 @@
# Module-local log function.
def _Log(message, *args):
- return log_util.LogWithTag('BUILD', message, *args)
+ return cherrypy_log_util.LogWithTag('BUILD', message, *args)
def _OutputOf(command):
@@ -68,7 +68,7 @@
"""
# Grab metadata about package in xpak format.
- my_xpak = xpak.xpak_mem(xpak.tbz2(in_path).get_data())
+ my_xpak = portage.xpak.xpak_mem(portage.xpak.tbz2(in_path).get_data())
# Build list of files to exclude. The tar command uses a slightly
# different exclude format than gmerge, so it needs to be adjusted
@@ -99,7 +99,7 @@
subprocess.check_call(['sudo', 'rm', '-rf', tmpd])
# Copy package metadata over to new package file.
- xpak.tbz2(out_path).recompose_mem(my_xpak)
+ portage.xpak.tbz2(out_path).recompose_mem(my_xpak)
def UpdateGmergeBinhost(sysroot, pkgs, deep):
@@ -126,8 +126,8 @@
vardb = trees[sysroot]['vartree'].dbapi
bintree = trees[sysroot]['bintree']
bintree.populate()
- gmerge_tree = dbapi.bintree.binarytree(sysroot, gmerge_pkgdir,
- settings=bintree.settings)
+ gmerge_tree = portage.dbapi.bintree.binarytree(sysroot, gmerge_pkgdir,
+ settings=bintree.settings)
gmerge_tree.populate()
# The portage API here is subtle. Results from these lookups are a pkg_str
@@ -230,7 +230,7 @@
if (not additional_args.get('accept_stable')
and self._ShouldBeWorkedOn(board, pkg)):
return self.SetError(
- 'Package is not cros_workon\'d on the devserver machine.\n'
+ "Package is not cros_workon'd on the devserver machine.\n"
'Either start working on the package or pass --accept_stable '
'to gmerge')