Skip to content

Fix username - #238

Open
qr243vbi wants to merge 1 commit into
openSUSE:masterfrom
qr243vbi:fix-username
Open

qr243vbi wants to merge 1 commit into
openSUSE:masterfrom
qr243vbi:fix-username

Conversation

@qr243vbi

Copy link
Copy Markdown
Contributor

fix #235

@mcepl mcepl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would merge it now, but could you, please, add unit tests for the helper in py2pack/utils.py, mocking pwd.getpwuid() to cover:

  • A populated GECOS field returns the existing name.
  • An empty GECOS field returns pw_name.

The template test now uses the same helper to calculate its expected username, so it doesn't independently verify that fallback.

@mcepl

mcepl commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@qr243vbi Please, at least allow maintainer’s edits on this PR, I will add those tests myself.

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.

Maintainer field is empty

2 participants