Skip to content

install: handle piped stdin when target exists#12418

Open
puneetdixit200 wants to merge 4 commits into
uutils:mainfrom
puneetdixit200:fix/12407-install-stdin-existing-target
Open

install: handle piped stdin when target exists#12418
puneetdixit200 wants to merge 4 commits into
uutils:mainfrom
puneetdixit200:fix/12407-install-stdin-existing-target

Conversation

@puneetdixit200
Copy link
Copy Markdown

Fixes #12407.

This updates the copy path to compare the opened source file metadata with the destination instead of canonicalizing the source path. That keeps openable special paths such as /dev/fd/0 working when the destination already exists while preserving same-file detection.

Tests:

  • cargo fmt --check
  • cargo test --features install --no-default-features test_install::test_install_from_stdin -- --nocapture
  • cargo test --features install --no-default-features test_install:: -- --nocapture
  • cargo test -p uu_install
  • cargo clippy --features install --no-default-features --all-targets -- -D warnings

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/tail/tail-n0f (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/symlink (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/cp/link-heap is now being skipped but was previously passing.
Note: The gnu test tests/cut/bounded-memory is now being skipped but was previously passing.

Comment thread src/uu/install/src/install.rs
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 24, 2026

Merging this PR will not alter performance

✅ 319 untouched benchmarks
⏩ 46 skipped benchmarks1


Comparing puneetdixit200:fix/12407-install-stdin-existing-target (d288a3a) with main (3af25ae)2

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (d41c56b) during the generation of this report, so 3af25ae was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Comment thread tests/by-util/test_mkfifo.rs
@puneetdixit200
Copy link
Copy Markdown
Author

I checked the new red CI on this PR. The diff only touches install code/tests (src/uu/install/src/install.rs, tests/by-util/test_install.rs, and tests/by-util/test_mkfifo.rs). The current failures are in unrelated targets: fuzz jobs for date, dirname, echo, non_utf8_paths, parse_time, and split, plus test_stdbuf_no_fork_regression.\n\nThe fuzz_date failure also matches the open upstream issue #12458. I do not see a PR-scoped code change to make for these failures.

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 with piped input fails if target file exists

2 participants