Public bug reported:
With rust-coreutils, if we combine `-L` option with `cp -af` it fails to
copy with error,
```
cp: -r not specified; omitting directory <dir-name>
```
However, if we use only `cp -af` it works.
```
sv@resolute-vm:~/Public/uu-cp$ ls
test
sv@resolute-vm:~/Public/uu-cp$ alias uu-cp
alias uu-cp='/usr/lib/cargo/bin/coreutils/cp'
sv@resolute-vm:~/Public/uu-cp$ uu-cp -af test test1
sv@resolute-vm:~/Public/uu-cp$ tree
.
├── test
│ ├── f1
│ │ ├── file1.txt
│ │ └── t1
│ ├── f2
│ │ ├── file2.txt
│ │ └── t2
│ ├── f3
│ │ ├── file3.txt
│ │ └── lmw-lintian -> /home/sv/lmw-lintian
│ └── test.py
└── test1
├── f1
│ ├── file1.txt
│ └── t1
├── f2
│ ├── file2.txt
│ └── t2
├── f3
│ ├── file3.txt
│ └── lmw-lintian -> /home/sv/lmw-lintian
└── test.py
13 directories, 10 files
sv@resolute-vm:~/Public/uu-cp$ uu-cp -afL test test2
cp: -r not specified; omitting directory 'test'
```
There is no issue if we use GNU version of `cp`.
```
sv@resolute-vm:~/Public/uu-cp$ ls -l /usr/bin/cp
lrwxrwxrwx 1 root root 5 Mar 30 22:20 /usr/bin/cp -> gnucp
sv@resolute-vm:~/Public/uu-cp$ cp -afL test test2
sv@resolute-vm:~/Public/uu-cp$ echo $?
0
```
I am on Ubuntu-MATE 26.04 with `coreutils-from-uutils` version
`0.0.0~ubuntu25`, where utilities like `cp` are still symlink to their
gnu counterparts. The issue was noticed in 0.0.0~ubuntu27 where the
uutils components replaced their corresponding gnu counterparts.
```
sv@resolute-vm:~/Public/uu-cp$ uu-cp --version
cp (uutils coreutils) 0.8.0
```
I have raised bug report upstream.
https://github.com/uutils/coreutils/issues/13207
ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: rust-coreutils 0.8.0-0ubuntu3
ProcVersionSignature: Ubuntu 7.0.0-27.27-generic 7.0.6
Uname: Linux 7.0.0-27-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.34.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: MATE
Date: Tue Jun 30 08:24:26 2026
InstallationDate: Installed on 2026-06-05 (25 days ago)
InstallationMedia: Ubuntu-MATE 26.04 LTS "Resolute Raccoon" - Daily amd64
(20260304)
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-256color
XDG_RUNTIME_DIR=<set>
SourcePackage: rust-coreutils
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: rust-coreutils (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug resolute stonking
** Tags added: stonking
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2158683
Title:
Rust coreutils: `cp -afL` fails with 'cp: -r not specified; omitting
directory <dir-name>'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2158683/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs