Summary: | sys-apps/portage - emerge --root=... -e @world rebuilds host packages | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Victor Costache <victor.costache> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | chewi, victor.costache, zmedico |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 137867 | ||
Attachments: |
emerge-aarch64-unknown-linux-gnu
emerge on the host target |
Description
Victor Costache
2024-02-08 22:13:32 UTC
Created attachment 884604 [details]
emerge on the host target
It's also worth mentioning that "emerge -av -e @world" shows 310 packages to be reinstalled on the host target (see attached). Shouldn't the same packages be built for the target architecture (aarch64-unknown-linux-gnu), considering that both host and target have the same profile "default/linux/amd64/17.1/systemd/merged-usr"?
This is expected because some dependencies are BDEPEND aka build host dependencies, so a) the build host is being updated because it affects the build, and b) these dependencies do not need to be installed to the target host. Having said that, I have long wanted options to a) not update build dependencies unless it's really necessary (while keeping target host dependencies updated) and b) install build host dependencies to the target host. The options we already have are confusing and inconsistent though because Portage's functionality has outgrown them, so it probably needs a big breaking redesign. (In reply to James Le Cuirot from comment #2) > This is expected because some dependencies are BDEPEND aka build host > dependencies, so a) the build host is being updated because it affects the > build, and b) these dependencies do not need to be installed to the target > host. > > Having said that, I have long wanted options to a) not update build > dependencies unless it's really necessary (while keeping target host > dependencies updated) and b) install build host dependencies to the target > host. The options we already have are confusing and inconsistent though > because Portage's functionality has outgrown them, so it probably needs a > big breaking redesign. Thanks for the explanation. I was expecting that might be the reason. However, since the profile (systemd/merged-usr) is the same on both host and target, shouldn't the same packages be built for x86_64 and aarch64? 310 (x86_64) vs. 180 (aarch64) is quite a difference. I thought that the "systemd/merged-usr" profiles could be different on host (x86_64) and target (aarch64), so I did the following: 1. Clean install Gentoo (x86_64 host), including emaint -a sync && emerge -avuDN @world 2. emerge -av -e @world - Total: 310 packages (310 reinstalls) 3. emerge sys-devel/crossdev 4. emerge -av -e @world - Total: 312 packages (312 reinstalls) 5. Create crossdev overlay (https://wiki.gentoo.org/wiki/Crossdev#Crossdev_overlay) 6. crossdev --stable -t x86_64-unknown-linux-gnu 7. PORTAGE_CONFIGROOT=/usr/x86_64-unknown-linux-gnu eselect profile set 23 ("systemd/merged-usr" profile) 8. emerge-x86_64-unknown-linux-gnu -av -e @world - Total: 456 packages (182 new, 274 reinstalls) - those 182 are for x86_64-unknown-linux-gnu and the other 274 for host Note that I had to add "sys-apps/util-linux -systemd -udev" to /usr/x86_64-unknown-linux-gnu/etc/portage/package.use to solve the circular dependencies. Since I got the same results for aarch64-unknown-linux-gnu (182 new, 274 reinstalls), we may conclude it's not related to the profile. Moreover, I was expecting all 310 packages to be built for the target, not just 182. I noticed that the bug was renamed to "sys-apps/portage - emerge --root=... -e @world". Related to that, it might be worth considering the output of these two commands: - emerge --root /new-root -pv -e @world => Total: 467 packages (184 new, 283 reinstalls) - emerge -pv -e @world => Total: 310 packages (310 reinstalls) I might be wrong, but shouldn't the output of the first command be "Total: 310 packages (310 new)"? |