dev-install: package.provided blocks deploying of packages of matching versions |
||||||
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.
,
Jan 10
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.
,
Jan 11
,
Jan 11
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.
,
Jan 11
Here is a potential fix: https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/1407042
,
Jan 11
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.
,
Jan 16
,
Jan 16
(6 days ago)
,
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 |
||||||
Comment 1 by ljusten@chromium.org
, Jan 9