src_install should not 'make PREFIX="${EROOT}/usr" install' because ${ROOT} is not a part of the prefix. It should 'make PREFIX="${EPREFIX}/usr" install' because EPREFIX is in fact the prefix. Reproducible: Always
The variable ${ROOT} has for the same purpose a corresponding ${EROOT} which contains ${ROOT}${EPREFIX}. Often when ${ROOT} is being used, this can be replaced by ${EROOT} to add Gentoo Prefix support. According to the prefix docs it is fine, care to enlighten me as to why this is wrong? Output from portage claiming a violation should be easy enough to come by...
The iw Makefile writes files in $(DESTDIR)$(PREFIX). Example: DESTDIR is ${D} PREFIX is ${EROOT} == ${ROOT}${EPREFIX} Binaries are installed in ${D}${EROOT} == ${D}${ROOT}${EPREFIX} Portage copies them to ${ROOT}${ROOT}${EPREFIX}. Double ${ROOT}. NOT THAT OF A GREAT IDEA. Suppose PREFIX=${EPREFIX} Binaries are installed in ${D}${EPREFIX} Portage copies them to ${ROOT}${EPREFIX}. Isn't that what's expected to happen? Please test all ebuilds with ${ROOT}!="". Or maybe even also with ${EPREFIX}!="".
> Please test all ebuilds with ${ROOT}!="". Or maybe even also with > ${EPREFIX}!="". Fair request. I tested the ebuild as is in a prefix (despite the hardmask). I found that not only was there no warnings from prefix portage about things being installed outside of the prefix, but the binaries were properly installed in ${EPREFIX}/usr
${ROOT}!="" -> fail. Tested and there is double ${ROOT}. There is NO way for it to work for anybody with ${ROOT}!="". Oh and I said test with ${ROOT}!="" and maybe ALSO with ${EPREFIX}!="". This means ${ROOT}!=""&&${EPREFIX}!="". ${ROOT}!="". Please don't mark obviously broken stuff with WORKSFORME. OK? ${ROOT}!="" -> fail. If you didn't read this, ${ROOT}!="" -> fail.
(In reply to comment #4) > ${ROOT}!="" -> fail. > > Tested and there is double ${ROOT}. There is NO way for it to work for > anybody with ${ROOT}!="". Oh and I said test with ${ROOT}!="" and maybe ALSO > with ${EPREFIX}!="". This means ${ROOT}!=""&&${EPREFIX}!="". ${ROOT}!="". > > Please don't mark obviously broken stuff with WORKSFORME. OK? ${ROOT}!="" -> > fail. > > If you didn't read this, ${ROOT}!="" -> fail. You want the bug open, keep the bug open. You want me to fix it? Provide the errors for portage so I can see what you want fixed. This is tested and working for me, don't know what you need fixed. >>> Installing (2 of 2) net-wireless/iw-3.8 to /tmp/ * checking 3 files for package collisions >>> Merging net-wireless/iw-3.8 to /tmp/ --- /tmp/usr/ --- /tmp/usr/lib/ --- /tmp/usr/lib/debug/ >>> /tmp/usr/lib/debug/tmp/ >>> /tmp/usr/lib/debug/tmp/usr/ >>> /tmp/usr/lib/debug/tmp/usr/sbin/ >>> /tmp/usr/lib/debug/tmp/usr/sbin/iw.debug --- /tmp/tmp/ >>> /tmp/tmp/usr/ >>> /tmp/tmp/usr/sbin/ >>> /tmp/tmp/usr/sbin/iw >>> /tmp/tmp/usr/share/ >>> /tmp/tmp/usr/share/man/ >>> /tmp/tmp/usr/share/man/man8/ >>> /tmp/tmp/usr/share/man/man8/iw.8.gz >>> net-wireless/iw-3.8 merged. >>> Regenerating /tmp/etc/ld.so.cache... >>> Auto-cleaning packages...
In your test case the binary gets installed in /tmp/tmp/usr/sbin/iw. /tmp appears twice. That's not expected to be there. Here is my test case: ROOT=/THIS_SHOULD_APPEAR_ONCE emerge iw .... >>> Installing (1 of 1) net-wireless/iw-3.8 to /THIS_SHOULD_APPEAR_ONCE/ * checking 2 files for package collisions >>> Merging net-wireless/iw-3.8 to /THIS_SHOULD_APPEAR_ONCE/ >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/ >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/ >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/sbin/ >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/sbin/iw >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/share/ >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/share/man/ >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/share/man/man8/ >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/share/man/man8/iw.8.gz THIS_SHOULD_APPEAR_ONCE appears twice.
Created attachment 338324 [details, diff] Make iw install in the proper location. This way the package is installed in ${EROOT}==${ROOT}${EPREFIX} instead of ${ROOT}${EROOT}==${ROOT}${ROOT}${EPREFIX}.
(In reply to comment #6) > In your test case the binary gets installed in /tmp/tmp/usr/sbin/iw. /tmp > appears twice. That's not expected to be there. Here is my test case: > > ROOT=/THIS_SHOULD_APPEAR_ONCE emerge iw > .... > >>> Installing (1 of 1) net-wireless/iw-3.8 to /THIS_SHOULD_APPEAR_ONCE/ > * checking 2 files for package collisions > >>> Merging net-wireless/iw-3.8 to /THIS_SHOULD_APPEAR_ONCE/ > >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/ > >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/ > >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/sbin/ > >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/sbin/iw > >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/share/ > >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/share/man/ > >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/share/man/man8/ > >>> /THIS_SHOULD_APPEAR_ONCE/THIS_SHOULD_APPEAR_ONCE/usr/share/man/man8/iw.8.gz > > THIS_SHOULD_APPEAR_ONCE appears twice. Confirmed, tested, fixed. Thanks, sometimes you have to beat me over the head with things, especially when they aren't officially supported (open tracker on ROOT= still) and there are no QA checks at all for them. + 08 Feb 2013; Rick Farina <zerochaos@gentoo.org> iw-3.7.ebuild, iw-3.8.ebuild: + fix installation when ROOT!=/ wrt bug 455808