New issue
Advanced search Search tips

Issue 920140 link

Starred by 8 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

dev-install: package.provided blocks deploying of packages of matching versions

Project Member Reported by ljusten@chromium.org, Jan 9

Issue description

cros deploy is broken with the latest code, possibly after the portage uprev. In my case, trying to deploy authpolicy, cros deploy skips the project since it is listed in /etc/portage/make.profile/package.provided/chromeos-base.packages on the DUT, which symlinks to /usr/share/dev-install/portage/make.profile/package.provided/chromeos-base.packages:

  WARNING: A requested package will not be merged because it is listed in
  package.provided:

    /usr/local/tmp/cros-deploy/tmp.wvZMGemJrM/packages/chromeos-base/authpolicy-9999.tbz2 pulled in by 'args'

Workaround: Remove your package from /etc/portage/make.profile/package.provided/chromeos-base.packages on the DUT.



Relevant logs:

$ cros deploy ${DUT_IP} authpolicy --debug

...

18:00:13: NOTICE: Installing authpolicy-9999.tbz2.
18:00:13: INFO: RunCommand: ssh -p 22 '-oConnectionAttempts=4' '-oUserKnownHostsFile=/dev/null' '-oProtocol=2' '-oConnectTimeout=30' '-oServerAliveCountMax=3' '-oStrictHostKeyChecking=no' '-oServerAliveInterval=10' '-oNumberOfPasswordPrompts=0' '-oIdentitiesOnly=yes' -i /tmp/ssh-tmpJcBfal/testing_rsa root@100.107.70.156 -- 'FEATURES=-sandbox' 'PORTAGE_CONFIGROOT=/usr/local' "CONFIG_PROTECT='-*'" 'PKGDIR=/usr/local/tmp/cros-deploy/tmp.wvZMGemJrM/packages' 'PORTDIR=/usr/local/tmp/cros-deploy/tmp.wvZMGemJrM' 'PORTAGE_TMPDIR=/usr/local/tmp/cros-deploy/tmp.wvZMGemJrM/portage-tmp' emerge --usepkg /usr/local/tmp/cros-deploy/tmp.wvZMGemJrM/packages/chromeos-base/authpolicy-9999.tbz2 '--root=/'
Warning: Permanently added '100.107.70.156' (ED25519) to the list of known hosts.
!!! PORTAGE_BINHOST unset, but use is requested.
WARNING: One or more repositories have missing repo_name entries:

	/usr/local/tmp/cros-deploy/tmp.wvZMGemJrM/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.


!!! CONFIG_PROTECT is empty
!!! Problem with sandbox binary. Disabling...


*** emerging by path is broken and may not always work!!!

Calculating dependencies  ... done!

WARNING: A requested package will not be merged because it is listed in
package.provided:

  /usr/local/tmp/cros-deploy/tmp.wvZMGemJrM/packages/chromeos-base/authpolicy-9999.tbz2 pulled in by 'args'

>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.
18:00:16: NOTICE: authpolicy-9999.tbz2 has been installed.
18:00:16: WARNING: Please restart any updated services on the device, or just reboot it.
18:00:16: DEBUG: RunCommand: ssh -p 22 '-oConnectionAttempts=4' '-oUserKnownHostsFile=/dev/null' '-oProtocol=2' '-oConnectTimeout=30' '-oServerAliveCountMax=3' '-oStrictHostKeyChecking=no' '-oServerAliveInterval=10' '-oNumberOfPasswordPrompts=0' '-oIdentitiesOnly=yes' -i /tmp/ssh-tmpJcBfal/testing_rsa root@100.107.70.156 -- rm -rf /usr/local/tmp/cros-deploy/tmp.wvZMGemJrM
18:00:17: INFO: cros deploy completed successfully.
 
Some more info:

If I install an image from Goldeneye, the chromeos-base.packages file contains the some other version (e.g. chromeos-base/authpolicy-0.0.1-r1254) and cros deploy succeeds.

Only if I build the image myself, the chromeos-base.packages file contains the work-on version (authpolicy-9999) and cros deploy fails.



Cc: zentaro@chromium.org
I am seeing this issue too with the oobe_config and smbprovider packages. cros deploy doesn't obviously fail, but the package does not update.

The workaround provided fixes the issue.
Cc: allenwebb@google.com

Comment 4 Deleted

I think we might want to replace:
https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/1390402
with symlinks to the parts of the profile we do want to inherit and leave out package.provided.
Summary: dev-install: package.provided blocks deploying of packages of matching versions (was: Cros deploy broken, bad package.provided?)
i don't think we can drop package.provided right.  when you use dev_install on a base image, it's the only way we know what packages are installed in the rootfs.  the only other way to get that info is if we packaged up the /var/db/pkg/ state and had dev_install deploy it so the env lines up with how dev images are built.

we could dynamically determine whether the full /var/db/pkg/ state is available, and if so, not utilize the package.provided data.  that would involve some monkeying with the filesystem at runtime when in dev mode.  which we already do in platform2/init/dev_utils.sh:dev_mount_packages.
Cc: ratheeshs@google.com

Comment 9 by rkonduru@chromium.org, Jan 16 (6 days ago)

Cc: rkonduru@google.com

Comment 10 by zentaro@chromium.org, Jan 16 (6 days ago)

In the short term maybe this can surface as a more obvious error. You can see the problem when you increase the log level, but in the default it just silently fails.

Sign in to add a comment