+
Skip to content

Conversation

jenningsfan
Copy link
Contributor

@jenningsfan jenningsfan commented Jun 3, 2025

Previously in uu-install, this would occur:

$ uu-install abc def -m 644 -m 640 abc def/abc
error: the argument '--mode <MODE>' cannot be used multiple times

However, GNU install would create a file with permission 640.
Fixes #8033

Now, uu-install will override previous arguments with the last one, in line with GNU behaviour (I checked and this behaviour does occur for all arguments not just --mode)

Note: I haven't checked the other coreutils but I suspect they may also need to be changed

@jenningsfan
Copy link
Contributor Author

I'd appreciate a double-check on the test as I'm not sure if its comprehensive enough

Copy link

github-actions bot commented Jun 3, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

Copy link

github-actions bot commented Jun 4, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

Comment on lines +487 to +491
scene
.ucmd()
.args(&[file, &format!("{dir}/{file}"), "--mode=999", "--mode=200"])
.succeeds()
.no_stderr();
Copy link
Contributor

Choose a reason for hiding this comment

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

currently testing that the command continues to succeed when overridden with duplicate argument flags, might be good to test that the override is also the last one passed through?

e.g. when you test the mode (-m) maybe you can assert that the mode is what it should be?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm so sorry; github decided not to notify me of your comment and I've only now found it.
I'll submit a PR to do that later today.

@sylvestre sylvestre merged commit 3214c4d into uutils:main Jun 28, 2025
75 checks passed
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.

install(1) compatibility: autotools+audit-userspace make install failure (multiple -m arguments)

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载