If I run # ebuild gshield-2.8-r1.ebuild install from /usr/portage/net-misc/gshield, the program copy all files from my home directory in the image tree. I solved the problem including into ebuild the following lines: S=${WORKDIR}/${P} before DESCRIPTION and like first line of src_install(): cd ${S}
I think this is actually user error. This problem only happens when the source is not unpacked before install, which results in no ${S} dir existing, so portage (apparently) cd's to the user's home dir instead. This can only happen when the user specifically chooses FEATURES="noauto" and uses ebuild instead of emerge. Simply doing "cd ${S}" doesn't actually fix the problem, as the install will still be attempted without any sources there to install. I am reassigning this but to "Portage." The portage devs can then decide what we should do. The only reasonable options I see are: 1) fix nothing and classify all future bugs like this as user error 2) put some kind of check and/or warning into portage. --Chouser <chouser@gentoo.org>
if ${S} does not exist when you enter src_install and you have FEATURES=noauto, then src_install will start off in whatever directory you ran `ebuild` from ... this behavior is listed in the manpage ... nick: maybe better behavior is to have 'cd ${S} || die' instead of '[ -d ${S} ] && cd ${S}' ... that way the ebuild has to have a valid ${S}, even if they set it to just ${WORKDIR} in the ebuild ... i dont see this as 'undesired behavior' ... but rather as a requirement ...
I used ebuild only to test why emerge gshield didn't work. Infact, if I run like root # emerge gshield I have some errors of files not found, and in the final installation directory (/etc/gshield) I have all files that I have in the root home directory (!!!) with some files of gshield. After this step, I tried to use ebuild to understand the problem. ENrico
fixed in cvs... Was a typo that only affected noauto users.
out shortly