Skip to content

Conversation

@alejandro-colomar
Copy link
Collaborator

Closes: #1361 (comment)
Reported-by: @Zugschlus
Cc: @cachius

No news is good news.

Debian needs to parse this message to ignore it, or alternatively check
if the call will be a no-op (which we already do) and skip the call.
If we remove this output, we're allowing Debian to remove that
complexity in their wrapper.

We don't expect this output to be very useful for interactive use
either.

Also, this message was changed from stderr to stdout recently, so we
don't need to worry about old scripts that might break due to this
change.  If there were scripts relying on that, they would have been
broken already in the previous change.

Closes: <shadow-maint#1361>
Reported-by: Marc Haber <githubvisible@zugschlus.de>
Cc: <https://github.com/cachius>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
These optimizations checked if the old value is the same as the new
value, and skip such changes.  This was unnecessary, and added
complexity to the source code.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
Copy link
Collaborator

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

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

This PR looks good and I like how it improves maintainability by removing unnecessary complexity. My only minor concern is the performance impact (when nothing actually needs to be changed, usermod will still process everything and update files instead of short-circuiting early). That said, the benefits of simplified code and better script compatibility outweigh this trade-off.

@ikerexxe ikerexxe merged commit 9278dc7 into shadow-maint:master Oct 16, 2025
11 checks passed
@alejandro-colomar alejandro-colomar deleted the no_news_is_good_news branch October 16, 2025 10:41
@alejandro-colomar alejandro-colomar self-assigned this Dec 27, 2025
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.

[wishlist] Please consider adding an option to get rid of informational messages like "no changes"

2 participants