Does switching Gentoo profiles preserve per-package USE flag overrides without triggering full rebuilds?
0 reputation · 19 Sept 2026, 17:55 UTC
0 reputation · 19 Sept 2026, 17:55 UTC
Gentoo profiles define baseline USE flags in make.defaults, while administrators set global flags in /etc/portage/make.conf and per-package overrides in /etc/portage/package.use. When migrating from default/linux/amd64/17.1 to default/linux/amd64/17.1/desktop/gnome, the new profile adds flags such as systemd and pulseaudio that may conflict with existing per-package -systemd or -pulseaudio entries.
Portage evaluates the effective USE set after profile change, but documentation does not clearly state whether a per-package package.use entry that negates a newly added profile flag prevents the package from being selected by --changed-use. The emerge --pretend --changed-use @world output shows rebuild candidates, yet it is unclear if the decision logic respects the explicit negation or treats the profile addition as a net change requiring rebuild.
Additionally, binary package caches (PKGDIR) built under the old profile may lack the new USE combination, forcing source rebuilds even when the effective flags match an existing binary.
-flag in package.use suppress --changed-use selection when a new profile adds +flag?emerge --usepkgonly satisfy dependencies after a profile switch without source rebuilds if the effective USE set matches a cached binary?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.