Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make.globals: Set PORTAGE_USERNAME and PORTAGE_GRPNAME variables #1414

Closed
wants to merge 1 commit into from

Conversation

duxsco
Copy link
Contributor

@duxsco duxsco commented Jan 11, 2025

"man 5 make.conf" states that "PORTAGE_USERNAME" and "PORTAGE_GRPNAME" default to "portage":

  • portage/man/make.conf.5

    Lines 1257 to 1261 in 597229a

    \fBPORTAGE_USERNAME\fR = \fI[user]\fR
    Defines the username to use when executing in userpriv/etc... modes (i.e.
    non-root).
    .br
    Defaults to portage.
  • portage/man/make.conf.5

    Lines 1109 to 1113 in 597229a

    \fBPORTAGE_GRPNAME\fR = \fI[group]\fR
    Defines the groupname to use when executing in userpriv/etc... modes (i.e.
    non-root).
    .br
    Defaults to portage.

But, the two variables are not set in the files pointed out by "man 5 make.conf":

portage/man/make.conf.5

Lines 21 to 31 in 597229a

Portage will check the currently\-defined environment variables
first for any settings. If no environment settings are found,
Portage then checks the make.conf files. Both /etc/make.conf and
/etc/portage/make.conf are checked (if present), and settings from
/etc/portage/make.conf will override settings from /etc/make.conf.
If no setting is found in the make.conf files, Portage checks
make.globals. If no
setting is found there, the profile's default setting is grabbed
from /etc/portage/make.profile/make.defaults. Please note that all user
settings should be made in the environment or in the make.conf
files, which are intended to be customized by the user.

This commits solves the discrepancy.

Bug: https://bugs.gentoo.org/941977

@duxsco
Copy link
Contributor Author

duxsco commented Jan 11, 2025

Testing on my laptop for now.

@duxsco duxsco marked this pull request as ready for review January 11, 2025 18:53
@duxsco duxsco marked this pull request as draft January 11, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants