diff options
author | Alex Vakulenko <avakulenko@chromium.org> | 2014-04-08 14:38:00 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-04-15 03:49:13 +0000 |
commit | 5aa26b1f4ed8c7f77e54d1390af8c58e9478e71e (patch) | |
tree | 44cbbb87a2d8376031f85c81f11d78f63f742b19 | |
parent | 60741c70ded3fddf18ba4b4ac1f7f40a57d92f36 (diff) | |
download | chromite-5aa26b1f4ed8c7f77e54d1390af8c58e9478e71e.tar.gz |
Bringing buildbot in line with platform2 source file restructuring
Platform2 sources are now contained in either src/platform or
src/platform2 directories. ebuilds were changed to treat sources
in both locations equally. This CL makes similar changes to the
Portage utilites when building using a buildbot. Sources for
projects in 'chromeos-base' category are considered rooted at
|srcroot| by default and |subdirs| containing relative paths
to directories such as platform/shill and platform2/buffet.
However non-platform2 targets haven't been updated yet and assume
that their sources reside under src/platform. So here we try
to see if the folder |srcroot|+|subdir| exists, and if not,
fall back to the legacy |srcroot|+'platform/'+|subdir|.
Once this is done, the previous logic can be restored and we
can default |dir_| to 'platform2'
BUG=chromium:358237
TEST=chromite/bin/cbuildbot --remote -g <CL_ID> x86-mario-paladin
CQ-DEPEND=CL:194116,CL:192433
Change-Id: Ifbb1de623f0f21e56fd0df1c189b174167050ece
Reviewed-on: https://chromium-review.googlesource.com/193681
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
-rw-r--r-- | buildbot/portage_utilities.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/buildbot/portage_utilities.py b/buildbot/portage_utilities.py index e412db939..2bad593cf 100644 --- a/buildbot/portage_utilities.py +++ b/buildbot/portage_utilities.py @@ -395,12 +395,24 @@ class EBuild(object): # Calculate srcdir. if self._category == 'chromeos-base': - dir_ = 'platform' + dir_ = '' # 'platform2' else: dir_ = 'third_party' - subdir_paths = [os.path.realpath(os.path.join(srcroot, dir_, l, s)) - for l, s in zip(localnames, subdirs)] + # Once all targets are moved from platform to platform2, uncomment + # the following lines as well as dir_ = 'platform2' above, + # and delete the loop that builds |subdir_paths| below. + + # subdir_paths = [os.path.realpath(os.path.join(srcroot, dir_, l, s)) + # for l, s in zip(localnames, subdirs)] + + subdir_paths = [] + for local, sub in zip(localnames, subdirs): + subdir_path = os.path.realpath(os.path.join(srcroot, dir_, local, sub)) + if dir_ == '' and not os.path.isdir(subdir_path): + subdir_path = os.path.realpath(os.path.join(srcroot, 'platform', + local, sub)) + subdir_paths.append(subdir_path) for subdir_path, project in zip(subdir_paths, projects): if not os.path.isdir(subdir_path): |