There is no general mechanism for querying the user for a password from an ebuild before file download. If a password is entered into the URI string, or entered as an environment variable eg. SRC_URI="ftp://${USER}:${PASS}@ftp.synopsys.com/sdaf" then the username and password get cached in /var/cache/edb/dep/group/package the first time ebuild fetch is run. This is bad from a security point of view, and means that you can't change the password later without explicitly rm'ing the dep cache files.
you can modify the FETCHCOMMAND to pass params to wget (like username/pw) ... but i cant think of any package that currently exists that needs this kind of support ... anything that requires a user/pass (like bitkeeper) also require you to register first ... and then they would be really made if we gave out said URL in our ebuilds ...
I didn't know that. How? I tried FETCHCOMMAND="echo" in the ebuild but it did nothing. I've also tried using a dyn_fetch() {} function that I saw in another ebuild but it doesn't seem to do anything. The packages that I have are commercial ASIC design software, the company gives sysadmins accounts on the ftp site to download from. I only know of one other gentoo user doing this kind of thing so you're right that it probably isn't a widely used feature, but it would still be nice if I could get it to work :)
what if you use FETCHCOMMAND in /etc/make.conf ?
Ah I see, but theres no way to modify that from inside the ebuild..
Current policy is RESTRICT=nofetch, and you download it yourself. Will consider options.
Nick, status on this? Been just over a year :)
Slapping this shut; if the src_uri exposes a password, it exposes a passwd. So does the ebuild... Re: grabbing a password from users, well, pkg processing _should_ be entirely non-interactive, so that's a no no. Besides, as nick said, RESTICT="fetch" works fine.