[Bug 2122363] Re: cp -T: prefix not found
Nick Rosbrook
2122363 at bugs.launchpad.net
Mon Sep 22 14:06:33 UTC 2025
This also effects mkosi, as seen in the systemd autopkgtests[1]:
...SNIP...
2286s Found ninja-1.12.1 at /usr/bin/ninja
2287s + [ -f mkosi/mkosi.key ]
2287s + cp mkosi/mkosi.key mkosi/mkosi.crt /var/tmp/integration-tests.rGliJdoUJg/btrfs/build
2287s + ln -sf /var/tmp/integration-tests.rGliJdoUJg/btrfs/build build
2287s + mkosi -f
2287s ‣ Running clean script /tmp/autopkgtest.pEokOk/build.M8K/src/mkosi/mkosi.clean…
2287s ‣ Validating certificates and keys
2287s ‣ Copying in sandbox trees…
2287s cp: prefix not found
2287s ‣ "cp --recursive --no-dereference --preserve=mode,links --reflink=auto --copy-contents /work/etc/apt /work/var/tmp/integration-tests.rGliJdoUJg/mkosi-metadata-3y_kxg2k/etc/apt --no-target-directory" returned non-zero exit code 1.
2287s + cleanup
2287s + [ -f /var/tmp/integration-tests.rGliJdoUJg/btrfs/build/meson-logs/testlog.txt ]
2287s + [ -d /var/tmp/integration-tests.rGliJdoUJg/btrfs/build/test/journal ]
2287s + [ -n /var/tmp/integration-tests.rGliJdoUJg ]
2287s + umount /var/tmp/integration-tests.rGliJdoUJg/btrfs
2287s + losetup --detach /dev/loop0
2287s + rm -rf /var/tmp/integration-tests.rGliJdoUJg
2288s autopkgtest [08:30:35]: test upstream: -----------------------]
[1] https://autopkgtest.ubuntu.com/results/autopkgtest-
questing/questing/amd64/s/systemd/20250920_083053_6933b@/log.gz
** Also affects: mkosi (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subiquity in Ubuntu.
https://bugs.launchpad.net/bugs/2122363
Title:
cp -T: prefix not found
Status in mkosi package in Ubuntu:
New
Status in rust-coreutils package in Ubuntu:
Confirmed
Status in subiquity package in Ubuntu:
Fix Released
Status in systemd package in Ubuntu:
New
Bug description:
with rust-coreutils, cp -T fails to behave like gnucp when using it to
copy a source directory to a target location and that location doesn't
exist yet.
```
#!/bin/bash
set -eux
rm -fr src dst
mkdir src
touch src/file.txt
/usr/lib/cargo/bin/coreutils/cp -aT src dst
[ -f dst/file.txt ]
```
Workarounds:
* remove -T from the cp invocation
* mkdir dst before the cp invocation
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mkosi/+bug/2122363/+subscriptions
More information about the foundations-bugs
mailing list