diff options
| author | Matt Jolly <kangie@gentoo.org> | 2025-02-09 11:15:14 +1000 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-02-10 00:16:35 +0000 |
| commit | 321a4cf17c0e4c5829b3a2d4582472a920fc9189 (patch) | |
| tree | 51c62c3f19826c6a049163702f858516f0e81920 /dev-lang/rust/rust-1.84.0-r1.ebuild | |
| parent | 201924167bcc6a1ba7406065973f17995136dc2a (diff) | |
| download | gentoo-321a4cf17c0e4c5829b3a2d4582472a920fc9189.tar.gz gentoo-321a4cf17c0e4c5829b3a2d4582472a920fc9189.tar.bz2 gentoo-321a4cf17c0e4c5829b3a2d4582472a920fc9189.zip | |
dev-lang/rust: drop preinst/postinst workaround for 1.84.{0,1}
This workaround is only required when migrating from non-slotted
Rust to slotted Rust. Since these versions have never had
a non-slotted counterpart, this step is superfluous.
Remove it now in conjunction with an unrelated revbump so that
the workaround isn't carried forward any further.
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/rust/rust-1.84.0-r1.ebuild')
| -rw-r--r-- | dev-lang/rust/rust-1.84.0-r1.ebuild | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/dev-lang/rust/rust-1.84.0-r1.ebuild b/dev-lang/rust/rust-1.84.0-r1.ebuild index 3fbaeec5c488..10294bcfad06 100644 --- a/dev-lang/rust/rust-1.84.0-r1.ebuild +++ b/dev-lang/rust/rust-1.84.0-r1.ebuild @@ -681,44 +681,8 @@ src_install() { fi } -pkg_preinst() { - # 943308 and friends; basically --keep-going can forget to unmerge old rust - # but the soft blocker allows us to install conflicting files. - # This results in duplicated .{rlib,so} files which confuses rustc and results in - # the need for manual intervention. - if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then - # we need to find all .{rlib,so} files in the old rust lib directory - # and store them in an array for later use - readarray -d '' old_rust_libs < <( - find "${EROOT}/usr/lib/rust/${PV}/lib/rustlib" \ - -type f \( -name '*.rlib' -o -name '*.so' \) -print0) - export old_rust_libs - if [[ ${#old_rust_libs[@]} -gt 0 ]]; then - einfo "Found old .rlib and .so files in the old rust lib directory" - else - die "Found no old .rlib and .so files but old rust version is installed. Bailing!" - fi - fi -} - pkg_postinst() { - if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then - # Be _extra_ careful here as we're removing files from the live filesystem - local f - for f in "${old_rust_libs[@]}"; do - [[ -f ${f} ]] || die "old_rust_libs array contains non-existent file" - local base_name="${f%-*}" - local ext="${f##*.}" - local matching_files=("${base_name}"-*.${ext}) - if [[ ${#matching_files[@]} -ne 2 ]]; then - die "Expected exactly two files matching ${base_name}-\*.rlib, but found ${#matching_files[@]}" - fi - einfo "Removing old .rlib file ${f}" - rm "${f}" || die - done - fi - eselect rust update if has_version dev-debug/gdb || has_version llvm-core/lldb; then |
