Some acct-user/* packages set ACCT_USER_SHELL but do not RDEPEND on the package providing that shell. Maybe not obvious for /bin/sh (or do we have some virtual for shells?) but at least the ones that set the value to /bin/bash should depend on bash. Might also be considered an issue with the packages in question instead of the eclass, not sure. I am hitting this when trying to install packages with portage to a directory using ROOT=somedir, which I hope you consider to be a valid use case. Reproducible: Always
>>> Installing (214 of 2904) acct-user/git-0-r2::gentoo to /home/christophe/Projects/gentoo/app-misc/tracker/rootfs/ * checking 2 files for package collisions >>> Merging acct-user/git-0-r2 to /home/christophe/Projects/gentoo/app-misc/tracker/rootfs/ * Adding user 'git' to your system ... * - Userid: 196 * A shell was specified but it does not exist!
I think it would make more sense for individual user packages to put the relevant package in RDEPEND. To do it in the eclass, we would need to maintain some kind of mapping from known ACCT_USER_SHELL values to package names.
We have 3 existing values for SHELL in the gentoo repo: /sbin/nologin (the default) /bin/bash /bin/sh sys-apps/shadow provides /sbin/nologin. app-shells/bash provides both /bin/bash and /bin/sh. Both packages are in @system, so an explicit dependency on them is not strictly necessary.
I'm afraid this is not technically feasible within the framework. ACCT_USER_SHELL is not a pre-inherit variable, and I don't think changing it at this point is really worth the effort, given that the need for any special need here is extremely rare.
*** Bug 855485 has been marked as a duplicate of this bug. ***
I think we should probably make it a pre-inherit variable. Having to accumulate hacks for new ROOTs and such is a pain.
(In reply to Sam James from comment #6) > I think we should probably make it a pre-inherit variable. Having to > accumulate hacks for new ROOTs and such is a pain. ... that is, we can change it, fix ebuilds in ::gentoo, and if ebuilds don't work correctly in overlays, then that's the same as plenty of other pre-inherit violations.