New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 812032 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Add support for building packages that incorporate multiple Go repositories

Project Member Reported by derat@chromium.org, Feb 13 2018

Issue description

As discussed on https://crrev.com/c/916881, we don't have a good way to build Portage packages that use code from multiple Go repositories.

If one tries listing all the repositories in CROS_WORKON_PROJECT and CROS_WORKON_LOCALNAME, git blows up in src_unpack when it tries to check out multiple projects into S.

Listing multiple dirs in CROS_WORKON_DESTDIR fixes that, but cros-go.eclass just puts S in GOPATH, so the compiler is unable to find the Go code.

Specifying "${S}" and "${S/some-other-dir}" for the repos' dest dirs and then setting CROS_GO_WORKSPACE to "${S}:${S}/some-other-dir" seems to work, but that's just because CROS_GO_WORKSPACE is prepended to GOPATH.

Rahul wrote, "Indeed, this is a tricky case. If cros-workon cannot merge the two checkouts under one ${S}, we'll need support in cros-go.eclass to add both checkouts to GOPATH. Maybe it is as simple as making CROS_GO_WORKSPACE an array variable as well, with a default of ${CROS_WORKON_DESTDIR} for each project in ${CROS_GO_PROJECT}. Please file a bug. This may need some more thinking and experimentation."

So here we are.
 
Labels: Build-Toolchain
Components: -OS>Packages Tools>ChromeOS-Toolchain
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/ded24cce07b96ce7156c358f2091d87d5470d9fb

commit ded24cce07b96ce7156c358f2091d87d5470d9fb
Author: Daniel Erat <derat@chromium.org>
Date: Thu Mar 22 22:24:43 2018

tast-{local,remote}-tests-cros: Fix data file installation.

List the tast-tests repository first in CROS_WORKON
variables for the tast-local-tests-cros and
tast-remote-tests-cros packages. Otherwise,
tast-bundle.eclass's src_install function looks for data
files in the main tast repository instead of in tast-tests,
resulting in no data files getting installed.

BUG= chromium:812032 
TEST=manual: emerged tast-local-tests-cros and verified that
     data files are installed under /usr/share/tast/data

Change-Id: I235fdc0eefcbf1bcde6fba01156f4e29cda2e0a0
Reviewed-on: https://chromium-review.googlesource.com/974749
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Rahul Chaudhry <rahulchaudhry@chromium.org>

[modify] https://crrev.com/ded24cce07b96ce7156c358f2091d87d5470d9fb/chromeos-base/tast-local-tests-cros/tast-local-tests-cros-9999.ebuild
[modify] https://crrev.com/ded24cce07b96ce7156c358f2091d87d5470d9fb/chromeos-base/tast-remote-tests-cros/tast-remote-tests-cros-9999.ebuild

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/b8ca0ff325eba8e6c8d24319d968422957144dd6

commit b8ca0ff325eba8e6c8d24319d968422957144dd6
Author: Rahul Chaudhry <rahulchaudhry@chromium.org>
Date: Fri Jun 22 02:56:30 2018

cros-go.eclass: add support for multiple workspaces.

If CROS_WORKON_DESTDIR is used to checkout multiple Go
workspaces, we need to add each of them to our GOPATH.
This change adds support for defining CROS_GO_WORKSPACE
as an array. A new function 'cros-go_gopath' can be
used to get a GOPATH from the CROS_GO_WORKSPACE array.

BUG= chromium:812032 
TEST='sudo emerge chromeos-base/tast-local-tests-cros' works.
TEST='sudo emerge chromeos-base/tast-remote-tests-cros' works.

Change-Id: I8327320d5346aaf673f4d5bea17190b23766675f
Reviewed-on: https://chromium-review.googlesource.com/1110837
Commit-Ready: Rahul Chaudhry <rahulchaudhry@chromium.org>
Tested-by: Rahul Chaudhry <rahulchaudhry@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/b8ca0ff325eba8e6c8d24319d968422957144dd6/chromeos-base/tast-local-tests-cros/tast-local-tests-cros-9999.ebuild
[modify] https://crrev.com/b8ca0ff325eba8e6c8d24319d968422957144dd6/chromeos-base/tast-remote-tests-cros/tast-remote-tests-cros-9999.ebuild
[modify] https://crrev.com/b8ca0ff325eba8e6c8d24319d968422957144dd6/eclass/cros-go.eclass

Project Member

Comment 5 by bugdroid1@chromium.org, Jun 22 2018

Status: Fixed (was: Assigned)

Sign in to add a comment