summaryrefslogtreecommitdiff
path: root/dev-lang/rust
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-11-26 02:00:48 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-11-26 02:00:48 +0000
commit403335d7014372971e9e9267493a808d08bab48e (patch)
treeffd28ddc69e6fe6543b018a00c9fad058bdda027 /dev-lang/rust
parent7f0b7329b3aa78ea82792fdf68ab48415fe4cc35 (diff)
gentoo auto-resync : 26:11:2024 - 02:00:48
Diffstat (limited to 'dev-lang/rust')
-rw-r--r--dev-lang/rust/Manifest16
-rw-r--r--dev-lang/rust/rust-1.71.1-r100.ebuild37
-rw-r--r--dev-lang/rust/rust-1.74.1-r100.ebuild37
-rw-r--r--dev-lang/rust/rust-1.75.0-r100.ebuild37
-rw-r--r--dev-lang/rust/rust-1.77.1-r100.ebuild37
-rw-r--r--dev-lang/rust/rust-1.79.0-r100.ebuild37
-rw-r--r--dev-lang/rust/rust-1.80.1-r100.ebuild37
-rw-r--r--dev-lang/rust/rust-1.81.0-r100.ebuild37
-rw-r--r--dev-lang/rust/rust-1.82.0-r100.ebuild37
9 files changed, 304 insertions, 8 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index ba8501034489..2625e17d085a 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -260,20 +260,20 @@ DIST rustc-1.81.0-src.tar.xz 216743872 BLAKE2B d9f52da9092d0723c862ebbb2dc351cad
DIST rustc-1.81.0-src.tar.xz.asc 801 BLAKE2B 01cd9f386d3fd73f4eb43b14d7d479ebababb8640abbff170e697817b94b8a18edd801c6047ecf3c084a0a51764c5e4f3f4bd6b00e8ae000ef0b850e9506572a SHA512 19c0da9d67f2bd9fd79a2078f0f486ee7fad5646a09a609b7e30d9531851955ae8df0ec69f9ddc09e2fd6e74d529648335b0fda833839c88c54c84494ec1988e
DIST rustc-1.82.0-src.tar.xz 219769328 BLAKE2B 611f33e134c2d459c9af1695c0a4d033df93afc986e91a17fceb0dd293fb4ffbd5f7475ef571d36cecf49da6c3fdb3801c98d7f72f9dd1c39e42502f649b192f SHA512 d158c7c71c1814bde2a3ec3cbeabe34949bd3201b730c0d7ec6baad4158bb28dd13696c430a6b99dc38b9d23ad7ddf8dde7d2487cbfbbbe9c3473016994210f0
DIST rustc-1.82.0-src.tar.xz.asc 801 BLAKE2B 8138fb15b8d7ec15be45378fe663207a8e87e3c527348ab079995b1840a771ed6e9d5464eb8855ac9e006c0cfcf54b1a4fea489d31e6c9899cb03e6f4c737b67 SHA512 3cd6b27e72041baf9996efa10f25aca2e04f3e3727b60ecfd90c1bef9c52d216d2dc130802f935b110e35766645a27637a01661aa8d5acf02bf64b02a107c93c
-EBUILD rust-1.71.1-r100.ebuild 19554 BLAKE2B 8274e2bf33baf695afdb8899a9966c4a7276598c39d481557c3bfd3d3643bf3fdaeb49f10e123184c91ffc9fffb944bc28f548ef5ac34eacc239a0acc317b229 SHA512 1e8f80e9dc941d7c1dbdf23f681a6500cce7cd0bcd95605b04ca9b83fa1c842542ea37226cf7a37f27e4fd176008d8a62236a782de893d401f4f3af14fd33df1
+EBUILD rust-1.71.1-r100.ebuild 20987 BLAKE2B 283d7857619ea1750f83099885616be555b9a737eff04f60088a3e179d2a54d6778b0557d771ab3be4fd870411982f6cf56f999895c9b80d7a1f767e8f3eb06a SHA512 586a5448d5cdd9ecab71fd7f58d7f6d14cb90d0ebe8ed5e0f96bd1eea09ee5e9455bbd8c6bf9b103734ff6113f863efb138377ac4fabaf5da8f24ff519072b8a
EBUILD rust-1.71.1.ebuild 23467 BLAKE2B cc179525f8be2375e4bb0651b3210986254d027414bdef178a33309a7d99deba0a656454b5f1c84a852be104c93edaf5eec24c6f65f067365ed0a202d140fde0 SHA512 2a81e2a2c49d19d88c7794d809648a4630ca476410ea3270a772fa8d315b56c1b1698fc523ff5451a4336e23993f76d444c6c3b12d491ed89019f075a6fceb83
-EBUILD rust-1.74.1-r100.ebuild 20898 BLAKE2B 9e3d904fde480ba8f91dcc2b48d018dfd293a78698efdf111fa1ab8a045a16166930f0b2eb1168e9feffc4f253c64d9c293435c66de5d205fb6867b0196d48c0 SHA512 ea9efcfcc78a3f1d6bf2eabf4156f36632d7aaa0dc9fb2fef095f39c520ef4367a7a2a92257ec0ba4d9fa9531beceb64e1606cfa1ccb556d8dbe4fd0950b058d
+EBUILD rust-1.74.1-r100.ebuild 22331 BLAKE2B bb3160476b6a3b0b2ec35487527df6b49dbef09506076daa96d2b4064a8ab1854bd03c35424b3e084b4fc0e7a45898a3ec5ce800dfa1f8bb630ba802aa79315f SHA512 748a534614957abcba347f7f69029fdabe2b826b0f6e4b2cd994d7a16ac61d47b95f91c51554b5cf1dcb9cfcbb46ef18fde0f19ab3013c85d8a2392eb6ec998f
EBUILD rust-1.74.1.ebuild 25118 BLAKE2B 4de0c3973eb9fff948c6254f6696f0de0b36f4d507fba035ef3873de2cbb92842bf409b371036fda337f6c66fb89fd156f4fbe21c12a72b3ef5ccada586ecfae SHA512 c24a3a85ba60916f12be526f0641546e921b5433f883516bf8e7c5b74362b0c8205c27533094911edc1eca8235bfebfeb820fb316d954509a96d200cf2574151
EBUILD rust-1.75.0-r1.ebuild 25282 BLAKE2B eebe5ea3b922221821b6dba77dea369248e5c6d952c45d1ca70d6952596b97c891fc29f502dad0192a690939a8f3fad6b5b2538daf72365b0113e8669a7f43d2 SHA512 96aaaccaf93d27b099ba0ec85882ff26b2eaa2021ca17768f607b5043b872a36e4c9d3ac13b4a7b8cbda6f3d7084edb1db11173d081a8972c51aa71a0e506935
-EBUILD rust-1.75.0-r100.ebuild 21061 BLAKE2B 9a7f5ba100216ea5538edd8958765f70ccd03c4a303565f38ba3ebaf43a353e570c8dd310dc8754923c9b253a4287defbca23201c017dd09fb9bc241b994ef75 SHA512 f678841168a0af052889e2d741b1e6bdeaafe18efe1085691fa2bad172ce7bd5018239c69cb4c9df835ce9b3cba938ee038466cd23b70288f19d3bf624bf8861
-EBUILD rust-1.77.1-r100.ebuild 21024 BLAKE2B f3f7ae427fa8e04f798331e14e92b0993fb333f0b167a53e21784dd78429220dc0ba4fae1f7025ee2ac3abec689a05d8fb03036828c648033e254a5b5f9ab96c SHA512 1a18df6c72dd0c2989109bad51be8979fcaf05a12daee08e0e27358724789b1a153f834adc185dc864498b08dcc478e077945afd3bad89d7d28b35e226a2f192
+EBUILD rust-1.75.0-r100.ebuild 22494 BLAKE2B ccf399dfeeeb818bb5fc362ebb709f01a263bc442626721ff1022b94bb71ccf0e1d8219472fea93844bd4945f66f1a5bc3aa2924dea17167649d249aff18a2bf SHA512 a2f70afcefdd0966b9636c41100d065c874dee784a24d19273ca0af4421876b88613df189e5002ce0d304e5c9ccc0040995fefbf97320c4030e00260afd57be8
+EBUILD rust-1.77.1-r100.ebuild 22457 BLAKE2B 43808968c0019c090403857a5e65035a3b4915e8d77b5a3a74f1d27763dbb3780f61eec6e47706a604cf1641380171bb9d1134dd4529ff8a7985659cb029b628 SHA512 6a15e73dac58b18b02ec2a03e31c11317638cb9b94fc08532e34090a1aefdc0e7f302dae35bf553835cbb065f3772a02be4685e311a56202416c7b95e4831579
EBUILD rust-1.77.1.ebuild 25245 BLAKE2B d514569674cc230e4959a9e73d38f14b263dac22fa7ec3f91c417d142caf65f5920ab44bc28e0e23c32bc7113f73c1b27fbf74a82215e35c33dd97ac4b3f2ee4 SHA512 b36d066101a248f31560fd7db39f9367e42618ba882c43df3807fc70823ec319365096623e2d41dd37a9babd83d2d55c007145ae7185a1818bd926783ad3eb5c
-EBUILD rust-1.79.0-r100.ebuild 21259 BLAKE2B 00eda229b9f521b15f57751beca019a1d7fea9f9cb908d6b6469a46fbe9a8ab01902cb3aa4804f8ea5f5989acad40fb8b412bd1bf40a4dfb4e3c0119351ca34d SHA512 def5f3d90d1daaca29acd1f786360b50d3aafeb7adf8acfc551e34108399019163d1aab15eb6f0e10c53dd603c23a9bc106bea455aec7626b7444e43b617d70c
+EBUILD rust-1.79.0-r100.ebuild 22692 BLAKE2B 08d1ba01ad6df8b293ff637041d1616da601c455de28badf2ba9e3804dca8df8f495bd7bb25d39ee18b049bea7634a4c982bf0146e4abb266dac8e77f574a307 SHA512 fc7277e38a65b88cf8d10b05955db3ba0909bec4df56a94711cae3b5df662ee5f3709129d58a33aa2633ebcf19b212fff75892ffda8bef590a47f127763ebe2e
EBUILD rust-1.79.0.ebuild 25480 BLAKE2B d2087cce728db5d5383e324476ba5380f95776d0d4742917742d9bd332b643c498f7a30ae32045d44a7aaeba7f235a614add12aa739765e4c308a02027ef02b4 SHA512 04ca9c5dcf088a0398ab05a39eb77119dd495248217fffe7451736cdee3c3ab1a274a54c4b6257384d39678cc87102d3e2ea3f0dcb40cbd657a0e07b7b93eaac
-EBUILD rust-1.80.1-r100.ebuild 21131 BLAKE2B 44625833e4eff762791ed8b8144bcc2212c971f6a0f14fe1e53c19cc2dd962b37dd8fbf847f14c25c907476ccb5fd4b6d790b6033842f79196a589476901fab5 SHA512 a976105ad8dfd619323b97311a65126ddd8bfc2a4abb59212c1e86c21a91f726c177ade65b09f00a70fba0f96cb1f66433bd0d6149fc3b956d2a260921644492
+EBUILD rust-1.80.1-r100.ebuild 22564 BLAKE2B d8db34bd3635877256b4ed998c2a5470f49dd137629fc6adbb85bf5789a4309d6ce53548c493e45e88c8ff9bc07b097589a2291bb1d36e89a153748ebe40ddc7 SHA512 d83f157bfb045066e6a83d13b00566320d9c117824dad8e9683b56f085c37c32403c6b1f92b63c93fa2afb376a9b2273f534277ab819c9f00bdd50dc6eb61a5f
EBUILD rust-1.80.1.ebuild 25412 BLAKE2B 4905111b95c2710d39f414f7eb645a5906e24258608a3fd4b3e4d160846ca0a546a113474079ff8772012469bda7d7b915dc3de0ebd7c3f8038df3e35ef5efe2 SHA512 e10c2e029100faa54caec1fe98fb19c23c8b06a1f6b1a52b899eb1761945e7de1a835e4aa2526c060b952cd12d52f70a28118bff80d2ba51053cf88eef460dde
-EBUILD rust-1.81.0-r100.ebuild 21319 BLAKE2B 758a5f6ad877cc4eb7dd7ca9adb913c54886a7b23e410456cb310465f1a6fbb00e124b14f513f42a23edddc365349decbd7c7298ac08553543690b4d722c81ae SHA512 08813a66858c618430cf3cd3d35d6d01bb1c814f06d124bf24dd4291a858858224c5b89252c75c7a3a48e4c59eca11085236170f7218ad8102a5245a7b255ca8
+EBUILD rust-1.81.0-r100.ebuild 22752 BLAKE2B e4ab06763fb90ac9c3453f359b56158f3420e16b421397b7183b276735c28444831a0eb3eb9f2815f247556047ebecaa8326a09715122d1fba26bb1177c0076c SHA512 57b4a0db5469015bab172cb29e7792e8a53cde914f8f7d10782c5c22ab1e79ca47fcb5f6a6ccbd3af9b398a4912e55c4ed461b0c463875fe6ba9e72004547111
EBUILD rust-1.81.0.ebuild 25380 BLAKE2B c213ba368f9f49be7e3c6f0260684f9b7c7f1afa7727ca7a7db7802b5a40a9009756464f9fb5a3165cbb5161e3e18181973a67d97a2e1cde13e4d6733ac5f2b9 SHA512 56501ddc2d06c2e7ff98e704a255d850897028d115588bca21ba43530f6d8a39ad684642e802faded8ae83da06dd6d6e503c76759e6d1df9f0fdebc0f6d6ec6c
-EBUILD rust-1.82.0-r100.ebuild 21472 BLAKE2B 72de75412df8f38517c105ed776c578a0d3626d039d12ecebab39f7fe0e08735d1ba36ec019b6bdec315ddce94d0b2b2799d46025d5e30d8d1f8445dc7885c33 SHA512 413abdbf867e4acfc1f0d4759a27b02e604356ba84ee0cae4e1f43a7309544109950774ef24e613d7b206b0d132c6ca38ae8ac5b5ed3e6a3b0b6645a3076ecbd
+EBUILD rust-1.82.0-r100.ebuild 22905 BLAKE2B dda6c110666a1408a9391cc0437e91a241440077a11c10489d447ff323bfa0cc259c19d43a32e26d34bf5d77dffd6b3cbe9851879e18cb016b75a3a1e00cc901 SHA512 e6dec9b7c6cd384685ca3b2045207661e713bd2278b9e44f8928c9829e5d0ca7c18a635d2970a3d235318e78432b717dd3b75ee39d30e38f6c6fe389778b7b66
EBUILD rust-1.82.0.ebuild 25639 BLAKE2B 276ef627db58d7d7cb85f4f84f0c68ef36da91822d75c83f13c14ac73b35729b2ce354f79506122449cdb8517bb34a6c1f13dc158987e05b088ae96e1ec33f11 SHA512 8dd95a85eff44f5567ab6f038399cddbd111213810a1390dbef0ed9d68284c46368511006158935db3d9b70f06851e7e3a562a9c0044f85a532dc6c812a38c24
MISC metadata.xml 1945 BLAKE2B cf3ed0b2550564faee94e53e21deb0e905b38cd45c503ba18f55c36f13093fa65c4dac8e544c891c9378b2ce32912cab1a1a0b61a277ff29f5288b672f4a218d SHA512 a28dc5b78e15aaeec5ccf028a053c3df6a12b24bcfb6e8948e2e25b3c04cc8ede5973f1e57c723081355853152baa8c8219e36bb603b714628e71587d2bba45e
diff --git a/dev-lang/rust/rust-1.71.1-r100.ebuild b/dev-lang/rust/rust-1.71.1-r100.ebuild
index 18b1b9fe6fc5..78f8d663cf0d 100644
--- a/dev-lang/rust/rust-1.71.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.71.1-r100.ebuild
@@ -624,7 +624,44 @@ 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 dev-debug/lldb; then
diff --git a/dev-lang/rust/rust-1.74.1-r100.ebuild b/dev-lang/rust/rust-1.74.1-r100.ebuild
index d446b5263782..7d362a51d3ed 100644
--- a/dev-lang/rust/rust-1.74.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.74.1-r100.ebuild
@@ -654,7 +654,44 @@ 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 dev-debug/lldb; then
diff --git a/dev-lang/rust/rust-1.75.0-r100.ebuild b/dev-lang/rust/rust-1.75.0-r100.ebuild
index 40ab20831e94..6a5b34dda65a 100644
--- a/dev-lang/rust/rust-1.75.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.75.0-r100.ebuild
@@ -656,7 +656,44 @@ 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 dev-debug/lldb; then
diff --git a/dev-lang/rust/rust-1.77.1-r100.ebuild b/dev-lang/rust/rust-1.77.1-r100.ebuild
index 372322af3e8f..2aa9d06c5418 100644
--- a/dev-lang/rust/rust-1.77.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.77.1-r100.ebuild
@@ -655,7 +655,44 @@ 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 dev-debug/lldb; then
diff --git a/dev-lang/rust/rust-1.79.0-r100.ebuild b/dev-lang/rust/rust-1.79.0-r100.ebuild
index e1878c76dba4..392cc8f26840 100644
--- a/dev-lang/rust/rust-1.79.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.79.0-r100.ebuild
@@ -658,7 +658,44 @@ 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 dev-debug/lldb; then
diff --git a/dev-lang/rust/rust-1.80.1-r100.ebuild b/dev-lang/rust/rust-1.80.1-r100.ebuild
index 9dbccd98b9a6..72080e2236fe 100644
--- a/dev-lang/rust/rust-1.80.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.80.1-r100.ebuild
@@ -655,7 +655,44 @@ 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 dev-debug/lldb; then
diff --git a/dev-lang/rust/rust-1.81.0-r100.ebuild b/dev-lang/rust/rust-1.81.0-r100.ebuild
index 8d7100d336d7..54695b7209d5 100644
--- a/dev-lang/rust/rust-1.81.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.81.0-r100.ebuild
@@ -659,7 +659,44 @@ 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 dev-debug/lldb; then
diff --git a/dev-lang/rust/rust-1.82.0-r100.ebuild b/dev-lang/rust/rust-1.82.0-r100.ebuild
index 63c8e27e3eaa..714ff39f1a8e 100644
--- a/dev-lang/rust/rust-1.82.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.82.0-r100.ebuild
@@ -669,7 +669,44 @@ 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 dev-debug/lldb; then