Opened 5 years ago
Closed 4 years ago
#60404 closed defect (wontfix)
rust: use copy, not system cp -r
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | g5pw (Aljaž Srebrnič) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.2 |
Keywords: | Cc: | ||
Port: | rust |
Description
The rust portfile uses system
on several occasions to call cp -r
. Why does it do this, rather than use the Tcl copy
procedure possibly in combination with glob
and the expansion operator ({*}
)? For example, instead of:
system "cp -r ${workpath}/rustc-${rustc_version}-${rust_platform}/rustc/* ${rust_root}"
Why not (untested):
copy {*}[glob ${workpath}/rustc-${rustc_version}-${rust_platform}/rustc/*] ${rust_root}
Change History (2)
comment:1 Changed 4 years ago by herbygillot (Herby Gillot)
comment:2 Changed 4 years ago by herbygillot (Herby Gillot)
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Closing as 'wontfix' since TCL copy isn't appropriate here.
Note: See
TracTickets for help on using
tickets.
So I looked at this while looking at Rust 1.50.0 - cp -R works better than copy for this case because the source tarballs are all being extracted to the same destination and have overlapping directory paths, even though the leaf files are different.
TCL copy refuses to copy over existing directories even with -force:
From the TCL file copy documentation: