I have one machine called the buildhost and other called targethosts. On the buildhost I make binarys for the targets. build and targethost are nearly identical (same portage, same /etc/portage/*, same profile, same make.conf). The only exception is in USE flags and FEATURES. On the buildhost I have USE="3dnow mmxext" + FEATURES="buildpkg" and on the target USE="-3dnow -mmxext sse". This flags affect only some ebuilds (i.e. xorg, mplayer, ...). If I change a USE flage (on both build and target), then remerge via "emerge -uDN world" on the buildhost, new binarys are created with the new USE flags. Using this binarys on the target via "emerge -kuDNpv world" would not show the changed USE flag. However if I know pkg_A was affected by the new USE flag I can do "emerge -1kpv pkg_A". Then the change is shown and used (without -pv). Reproducible: Always Steps to Reproduce: I take catalyst as an example 1. verify current USE flags of catalyst (build and target are identical) # equery uses catalyst U I + + doc : Adds extra documentation (API, Javadoc, etc) + + ccache : Enables ccache support - + cdr : Adds support for CD writer hardware + + examples : Install example source code 2. change a USE flage on both i.e. via /etc/portage/package.use #dev-util/catalyst doc ccache examples dev-util/catalyst ccache examples 3. reflect the change on both with "emerge -uDNpv world". On the buildhost remerge and create new binary with "emerge -uDN world" (--buildpkg is in FEATURES). 4. make the new binary accessable for the targethost (mount PKGDIR via nfs, or copy over binary,...). I use "mount -o ro -t nfs buildhost:/usr/portage/packages /usr/portage/packages/" 5. try to update the target with "emerge -kuDNpv world". This will _not_ show the changed USE flag. 6. use "emerge -kpv catalyst" to get what you want with 5. Actual Results: emerge -kuDNpv world on target makes not the right thing if USE flags have changed. Even if the binary is aviable with right USE flags. Expected Results: "emerge -kuDNpv world" should behave like without -k (expect for build dependencies). It should use binary if aviable or fallback to ebuild. I hope I could expres my problem. Perhaps there is only a missunderstanding. We discussed it at the user-ml, but no one seems to know a solution.
Can you attach the output of `emerge -uDNkvp world` on a target host please?
Created attachment 67909 [details] output of emerge -uDNkvp world on the target
Created attachment 67910 [details] output of emerge -kpv catalyst on the target
*** Bug 105232 has been marked as a duplicate of this bug. ***
Created attachment 67911 [details] output from emerge -uDNvp world on the target you can ignore build-deps (the target is a pure binary pkg installed system). But the change in catalyst is shown.
Hi, I have new steps to reproduce this bug. It can be reproduced by everyone running gentoo without the build->target setup, just on a single machine. I'll take dev- util/catalyst as the example again. Step 1: If not already, install dev-util/catalyst regardless of any use flag. Step 2: check your current use flags of dev-util/catalyst with equery from gentoolkit. Example: # equery uses dev-util/catalyst [ Searching for packages matching dev-util/catalyst... ] [ Colour Code : set unset ] [ Legend : Left column (U) - USE flags from make.conf ] [ : Right column (I) - USE flags packages was installed with ] [ Found these USE variables for dev-util/catalyst-1.1.10.10 ] U I - - doc : Adds extra documentation (API, Javadoc, etc) - - ccache : Enables ccache support - - cdr : Adds support for CD writer hardware - - examples : Install example source code Step 3: make a binary package. It doesn't matter if you use emerge --buildpkgonly or quickpkg. Example using quickpkg: # quickpkg catalyst * Building package for catalyst-1.1.10.10 ... [ ok ] * Packages now in /usr/portage/packages: * catalyst-1.1.10.10: 589K Step 4: change a use flag of catalyst. it doesn't matter where you change it (make.conf, portage.use, env-var USE). However in this example I prefer the per package use flags in /etc/portage/package.use, because later I will run emerge - uDN world and this should affect only catalyst not anything else in world. Example: echo 'dev-util/catalyst doc' >> /etc/portage/package.use Step 5: update your world with the new use flag (emerge -uDN world). The output of -pv should look like this: # emerge -uDNpv world These are the packages that I would merge, in order: Calculating world dependencies ...done! [ebuild R ] dev-util/catalyst-1.1.10.10 -ccache -cdr +doc* -examples 0 kB NOTE: the changed use flage is represented by +doc* NOTE: you may also use emerge -uDNpv catalyst if your world has more changes then just these in catalyst NOTE: make sure you have not FEATURES="buildpkg" in your make.conf NOTE: do not merge with --buildpkg or --buildpkgonly (-b/-B) Step 6: revert back to the old use flage before Step 5. using the binary package created in Step 3. Uncomment in /etc/portage/package.use (should look like this ): #dev-util/catalyst doc update your world/catalyst using binary if possible: emerge -uDNk world does nothing. The output of -pv shows nothing. Thats the bug. NOTE: again you may also just run emerge -uDNk catalyst if world has to much changes =============================== The interesting thing is you can remerge the binary and then the changed flags will be respected. Example output: # emerge -kpv catalyst These are the packages that I would merge, in order: Calculating dependencies ...done! [binary R ] dev-util/catalyst-1.1.10.10 -ccache -cdr -doc* -examples NOTE: the [binary R ] and -doc* =============================== This is how it works now for me and for some other too. I interpret the options -uDNk in this way that it should catch the new use flag from binary package. If this is not the intention of -uDNk then it is immpossible for me to manage 100/ 1000s of gentoo machines.
# emerge -vp eselect [ebuild R ] app-admin/eselect-0.9.6 -bash-completion -doc 0 kB # emerge -kvp eselect [binary R ] app-admin/eselect-0.9.6 -bash-completion +doc* # grep eselect /var/lib/portage/world app-admin/eselect # USE="doc" emerge -uDNkvp world | grep eselect [nothing] (Just a note to show clearly how it's reproducable.)
Created attachment 69485 [details, diff] Heavy handed fix This kills of a lot of duplication and effectively fixes it by handing processing to another copy of the algorithm that works just a little bit better.
Fixed in portage-2.0.53_rc3
(In reply to comment #9) > Fixed in portage-2.0.53_rc3 Hi, sorry for beeing late, I was offline for a week. In between I played with your patch and it seems to do the job well (just added some packages and changed some USE flags). It takes binary when ever possible (and estimated), else it falls back to ebuild. Thats what I need. Thanks a lot.
*** Bug 111210 has been marked as a duplicate of this bug. ***
I'm experiencing this problem. I've got my desktop pc (an old p4) used as a buildhost and sharing /usr/portage/packages in my lan with nfs. This packages are used (after mounting the dir) on the laptop too, which is newer and has some USE differences (smp, laptop for example) # emerge -pkv sys-apps/hal These are the packages that would be merged, in order: Calculating dependencies... done! [binary R ] sys-apps/hal-0.5.13-r2 USE="X acpi consolekit -apm -crypt -debug -dell -disk-partition -doc -laptop* -policykit (-selinux)" Total: 1 package (1 reinstall), Size of downloads: 0 kB as you can see it wants to install binary package even if use doesn't match. I'm using stable portage (2.1.6.13)
(In reply to comment #12) > as you can see it wants to install binary package even if use doesn't match. You can use --newuse to avoid that. Current 2.2_rc* releases also have a --binpkg-respect-use option to trigger equivalent behavior. It will be included in portage-2.1.7.