The xinit ebuilds call newpamd in the pam eclass. Without pam in IUSE, the /etc/pam.d directory ALWAYS gets created (with the xserver file in it), even for people (like me) who do not have pam in their USE flags. If I understand pam.eclass, this will not happen if IUSE includes pam.
Yes, you're right.
I'm not convinced that we should add a USE flag for this, as it will then require a rebuilt to get a plain-text file. You can mask out /etc/pam.d if you don't want anything installed there.
(In reply to comment #2) > I'm not convinced that we should add a USE flag for this, as it will then > require a rebuilt to get a plain-text file. I don't understand what you mean here. This won't affect the majority of people (who have USE=pam) at all (the ebuild will act as before, and they need not even re-emerge it). Adding pam to IUSE (this doesn't require a new use flag, just amending the ebuild to correctly use one of the current ones), will give the behavior that people with USE=-pam expect. I think that the ebuild should "work," and adding files for pam for people who have gone through the trouble of altering the default to not use pam seems broken to me. > You can mask out /etc/pam.d if you don't want anything installed there. I don't have (and don't want) /etc/pam.d in the first place.
Changing a USE flag and thus requiring a rebuild of the entire package to simply install small text files is broken, same as it is in the case of USE=logrotate etc. People who don't want the files can set INSTALL_MASK (see make.conf.example).
(In reply to comment #4) > Changing a USE flag and thus requiring a rebuild of the entire package to > simply install small text files is broken, Again, I don't see this. No one needs to rebuild anything at all. Look at the code: newpamd() { [[ $# -ne 2 ]] && die "newpamd requires two arguments" if hasq pam ${IUSE} && ! use pam; then return 0; fi INSDESTTREE=/etc/pam.d \ INSOPTIONS="-m 0644" \ newins "$1" "$2" || die "failed to install $1 as $2" cleanpamd $2 } The pam stuff gets installed now (always), and will continue to get installed for anyone with USE=pam. Most users will never notice that anything has changed. Adding pam to IUSE (with NO other changes necessary to the ebuild at all) will also work correctly (ie. not installing anything pam related) for those with USE=-pam.
Consider the user who changes USE=pam to USE=-pam or vice versa.
(In reply to comment #6) > Consider the user who changes USE=pam to USE=-pam or vice versa. Obviously someone who makes such a significant change (and I have done it) has to expect to rebuild a few packages (very carefully, I might add, to avoid screwing things up). Gentoo already has some good documentation that describes how to remove pam from the system. With pam in IUSE, this package would get flagged as one to rebuild (emerge -N) whenever someone either adds or removes pam from his use flags (not a particularly common occurance in the first place).
I'm not going to change this because of the above-mentioned reasons. I understand your argument but disagree. You may instead add /etc/pam.d to INSTALL_MASK in make.conf.
(In reply to comment #8) > I understand your argument but disagree. No offense intended, but I DON'T understand your reasons. Making this change would not require any recompiles - it would merely work the way people expect it to the next time people emerge it. It actually seems quite bizarre to me to prefer a method (INSTALL_MASK) less well-known (I doubt the majority of Gentoo users even know it exists, less well-documented, and less flexible (no capability of overriding it on a per-package basis) than the one way that everyone expects to control the exclusion of non-desired features (especially when the USE flag already exists, and the eclass already tests for it). > You may instead add /etc/pam.d to INSTALL_MASK in make.conf. Forget that. I will correct the ebuild in /usr/local/portage instead. :)