Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912757 - dev-lang/rust[rustfmt] installs strange rustfmt.old binary
Summary: dev-lang/rust[rustfmt] installs strange rustfmt.old binary
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-21 15:20 UTC by Matt Turner
Modified: 2023-09-13 17:23 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2023-08-21 15:20:45 UTC
dev-lang/rust[rustfmt] installs multiple rustfmt binaries:


> mattst88@framework ~ % ls -lh $(qlist rust | grep rustfmt)
> lrwxrwxrwx 1 root root   37 Aug 20 01:32 /usr/bin/rustfmt-1.71.1 -> ../lib/rust/1.71.1/bin/rustfmt-1.71.1
> -rwxr-xr-x 2 root root 4.2M Aug 20 01:32 /usr/lib/rust/1.71.1/bin/rustfmt
> -rwxr-xr-x 2 root root 4.2M Aug 20 01:32 /usr/lib/rust/1.71.1/bin/rustfmt-1.71.1
> -rwxr-xr-x 1 root root 4.2M Aug 20 01:32 /usr/lib/rust/1.71.1/bin/rustfmt.old
> -rw-r--r-- 1 root root  453 Aug 20 01:31 /usr/lib/rust/1.71.1/lib/rustlib/manifest-rustfmt-preview

rustfmt and rustfmt-${PV} are hardlinks, but rustfmt.old is a separate binary.

> mattst88@framework ~ % md5sum $(qlist rust | grep rustfmt)
> 04319727100d7705981c648801c3e944  /usr/lib/rust/1.71.1/lib/rustlib/manifest-rustfmt-preview
> 79ff95d363ddf5a2b44d2e89d0750a9c  /usr/lib/rust/1.71.1/bin/rustfmt.old
> 79ff95d363ddf5a2b44d2e89d0750a9c  /usr/lib/rust/1.71.1/bin/rustfmt
> 79ff95d363ddf5a2b44d2e89d0750a9c  /usr/lib/rust/1.71.1/bin/rustfmt-1.71.1
> 79ff95d363ddf5a2b44d2e89d0750a9c  /usr/bin/rustfmt-1.71.1

But it turns out that rustfmt.old is identical to the others?

What is rustfmt.old? Should it be installed? Should it be identical to rustfmt? I see rust's src_install does this:

> rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
> rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die

Are we just missing an rm -rf for bin/ as well?
Comment 1 Larry the Git Cow gentoo-dev 2023-09-13 17:23:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad61cba42c8543a98b35f15424109aa73d255618

commit ad61cba42c8543a98b35f15424109aa73d255618
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2023-09-13 17:23:26 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2023-09-13 17:23:48 +0000

    dev-lang/rust: Don't install rustfmt.old binary
    
    Closes: https://bugs.gentoo.org/912757
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 dev-lang/rust/rust-1.71.1.ebuild | 1 +
 dev-lang/rust/rust-1.72.0.ebuild | 1 +
 2 files changed, 2 insertions(+)