FS#52449 - [rustup] Package installs six identical binaries

Attached to Project: Community Packages
Opened by Jonathon (jonathon) - Sunday, 08 January 2017, 20:57 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Monday, 10 April 2017, 18:55 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Package installs six identical binaries. One binary (rustup) plus five symlinks (cargo, rustc, rustdoc, rust-gdb, rust-lldb) would probably do, and save ~20MB disk space.

Additional info:
rustup=1.0.0-2

Steps to reproduce:
$ sudo pacman -S rustup
$ for f in cargo rustc rustdoc rust-gdb rust-lldb rustup; do md5sum /usr/bin/$f; done

03ee67dc768016d7e9b8168b2bc6d729 /usr/bin/cargo
03ee67dc768016d7e9b8168b2bc6d729 /usr/bin/rustc
03ee67dc768016d7e9b8168b2bc6d729 /usr/bin/rustdoc
03ee67dc768016d7e9b8168b2bc6d729 /usr/bin/rust-gdb
03ee67dc768016d7e9b8168b2bc6d729 /usr/bin/rust-lldb
03ee67dc768016d7e9b8168b2bc6d729 /usr/bin/rustup


Current situation:
$ for f in cargo rustc rustdoc rust-gdb rust-lldb rustup; do ls -l /usr/bin/$f; done
-rwxr-xr-x 1 root root 4268544 Dec 28 01:41 /usr/bin/cargo
-rwxr-xr-x 1 root root 4268544 Dec 28 01:41 /usr/bin/rustc
-rwxr-xr-x 1 root root 4268544 Dec 28 01:41 /usr/bin/rustdoc
-rwxr-xr-x 1 root root 4268544 Dec 28 01:41 /usr/bin/rust-gdb
-rwxr-xr-x 1 root root 4268544 Dec 28 01:41 /usr/bin/rust-lldb
-rwxr-xr-x 1 root root 4268544 Dec 28 01:41 /usr/bin/rustup

Better situation?
$ for f in cargo rustc rustdoc rust-gdb rust-lldb rustup; do ls -l /usr/bin/$f; done
lrwxrwxrwx 1 root root 6 Jan 8 20:43 /usr/bin/cargo -> /usr/bin/rustup
lrwxrwxrwx 1 root root 6 Jan 8 20:43 /usr/bin/rustc -> /usr/bin/rustup
lrwxrwxrwx 1 root root 6 Jan 8 20:43 /usr/bin/rustdoc -> /usr/bin/rustup
lrwxrwxrwx 1 root root 6 Jan 8 20:43 /usr/bin/rust-gdb -> /usr/bin/rustup
lrwxrwxrwx 1 root root 6 Jan 8 20:43 /usr/bin/rust-lldb -> /usr/bin/rustup
-rwxr-xr-x 1 root root 4268544 Dec 28 01:41 /usr/bin/rustup
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Monday, 10 April 2017, 18:55 GMT
Reason for closing:  Fixed
Comment by Jonathon (jonathon) - Sunday, 08 January 2017, 21:07 GMT
I should have added, symlinked versions work fine for me.

$ ls -l `which cargo`
lrwxrwxrwx 1 root root 15 Jan 8 20:53 /usr/bin/cargo -> /usr/bin/rustup
$ ls -l `which rustc`
lrwxrwxrwx 1 root root 15 Jan 8 20:53 /usr/bin/rustc -> /usr/bin/rustup

$ cargo -V
cargo 0.15.0-nightly (298a012 2016-12-20)
$ rustc -V
rustc 1.14.0 (e8a012324 2016-12-16)
Comment by Jonathon (jonathon) - Saturday, 08 April 2017, 21:48 GMT
Improved PKGBUILD attached which avoids the ~100MB download of rustc and rust-std during build and installs symlinks saving ~20MB of disk space.
   PKGBUILD (1.5 KiB)
Comment by Sven-Hendrik Haase (Svenstaro) - Monday, 10 April 2017, 18:54 GMT
Cool, thanks. Fixed.

Loading...