commit: e9361b31a4cc8ab641661ae077fb5c13314ddf2a
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Dec 10 16:46:40 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Dec 10 16:46:57 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=e9361b31
dev-lang/rust: sync ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.71.1-r100.ebuild | 48 ++++++++++++++++++++++++-----------
dev-lang/rust/rust-1.74.1-r100.ebuild | 48 ++++++++++++++++++++++++-----------
dev-lang/rust/rust-1.75.0-r100.ebuild | 48 ++++++++++++++++++++++++-----------
dev-lang/rust/rust-1.77.1-r100.ebuild | 48 ++++++++++++++++++++++++-----------
dev-lang/rust/rust-1.79.0-r100.ebuild | 48 ++++++++++++++++++++++++-----------
dev-lang/rust/rust-1.80.1-r100.ebuild | 48 ++++++++++++++++++++++++-----------
dev-lang/rust/rust-1.81.0-r100.ebuild | 44 ++++++++++++++++++++++----------
dev-lang/rust/rust-1.82.0-r100.ebuild | 46 +++++++++++++++++++++++----------
8 files changed, 261 insertions(+), 117 deletions(-)
diff --git a/dev-lang/rust/rust-1.71.1-r100.ebuild
b/dev-lang/rust/rust-1.71.1-r100.ebuild
index 19af311..09d6adf 100644
--- a/dev-lang/rust/rust-1.71.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.71.1-r100.ebuild
@@ -9,8 +9,8 @@ PYTHON_COMPAT=( python3_{10..12} )
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
-inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing \
- multilib multilib-build python-any-r1 rust rust-toolchain
toolchain-funcs verify-sig
+inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing multilib
multilib-build \
+ optfeature python-any-r1 rust rust-toolchain toolchain-funcs verify-sig
if [[ ${PV} = *beta* ]]; then
betaver=${PV//*beta}
@@ -660,20 +660,43 @@ pkg_preinst() {
pkg_postinst() {
- if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then
+ local old_rust="dev-lang/rust:stable/$(ver_cut 1-2)"
+ if has_version -b ${old_rust}; then
# Be _extra_ careful here as we're removing files from the live
filesystem
local f
+ local only_one_file=()
+ einfo "Tidying up libraries files from non-slotted
\`${old_rust}\`."
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
+ case ${#matching_files[@]} in
+ 2)
+ einfo "Removing old .${ext}: ${f}"
+ rm "${f}" || die
+ ;;
+ 1)
+ # Turns out fingerprints are not as
unique as we'd thought, _sometimes_ they collide,
+ # so we may have already installed over
the old file.
+ # We'll warn about this just in case,
but it's probably fine.
+ only_one_file+=( "${matching_files[0]}"
)
+ ;;
+ *)
+ die "Expected one or two files matching
${base_name}-\*.rlib, but found ${#matching_files[@]}"
+ ;;
+ esac
done
+ if [[ ${#only_one_file} -gt 0 ]]; then
+ einfo "While tidying up non-slotted rust libraries for
\`${old_rust}\`,"
+ einfo "the following file(s) did not have a duplicate
where one was expected:"
+ for f in "${only_one_file[@]}"; do
+ einfo " * ${f}"
+ done
+ einfo ""
+ einfo "This is unlikely to cause problems; the
fingerprint for the library ended up being the same."
+ einfo "However, if you encounter any issues please
report them to the Gentoo Rust Team."
+ fi
fi
eselect rust update
@@ -683,13 +706,8 @@ pkg_postinst() {
elog "for convenience they are installed under
/usr/bin/rust-{gdb,lldb}-${PV}."
fi
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for
rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
+ optfeature "Emacs support" "app-emacs/rust-mode"
+ optfeature "Vim support" "app-vim/rust-vim"
}
pkg_postrm() {
diff --git a/dev-lang/rust/rust-1.74.1-r100.ebuild
b/dev-lang/rust/rust-1.74.1-r100.ebuild
index 7041c7e..2df3613 100644
--- a/dev-lang/rust/rust-1.74.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.74.1-r100.ebuild
@@ -9,8 +9,8 @@ PYTHON_COMPAT=( python3_{10..12} )
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
-inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing \
- multilib multilib-build python-any-r1 rust rust-toolchain
toolchain-funcs verify-sig
+inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing multilib
multilib-build \
+ optfeature python-any-r1 rust rust-toolchain toolchain-funcs verify-sig
if [[ ${PV} = *beta* ]]; then
betaver=${PV//*beta}
@@ -688,20 +688,43 @@ pkg_preinst() {
pkg_postinst() {
- if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then
+ local old_rust="dev-lang/rust:stable/$(ver_cut 1-2)"
+ if has_version -b ${old_rust}; then
# Be _extra_ careful here as we're removing files from the live
filesystem
local f
+ local only_one_file=()
+ einfo "Tidying up libraries files from non-slotted
\`${old_rust}\`."
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
+ case ${#matching_files[@]} in
+ 2)
+ einfo "Removing old .${ext}: ${f}"
+ rm "${f}" || die
+ ;;
+ 1)
+ # Turns out fingerprints are not as
unique as we'd thought, _sometimes_ they collide,
+ # so we may have already installed over
the old file.
+ # We'll warn about this just in case,
but it's probably fine.
+ only_one_file+=( "${matching_files[0]}"
)
+ ;;
+ *)
+ die "Expected one or two files matching
${base_name}-\*.rlib, but found ${#matching_files[@]}"
+ ;;
+ esac
done
+ if [[ ${#only_one_file} -gt 0 ]]; then
+ einfo "While tidying up non-slotted rust libraries for
\`${old_rust}\`,"
+ einfo "the following file(s) did not have a duplicate
where one was expected:"
+ for f in "${only_one_file[@]}"; do
+ einfo " * ${f}"
+ done
+ einfo ""
+ einfo "This is unlikely to cause problems; the
fingerprint for the library ended up being the same."
+ einfo "However, if you encounter any issues please
report them to the Gentoo Rust Team."
+ fi
fi
eselect rust update
@@ -711,13 +734,8 @@ pkg_postinst() {
elog "for convenience they are installed under
/usr/bin/rust-{gdb,lldb}-${PV}."
fi
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for
rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
+ optfeature "Emacs support" "app-emacs/rust-mode"
+ optfeature "Vim support" "app-vim/rust-vim"
}
pkg_postrm() {
diff --git a/dev-lang/rust/rust-1.75.0-r100.ebuild
b/dev-lang/rust/rust-1.75.0-r100.ebuild
index 946ddb9..1846145 100644
--- a/dev-lang/rust/rust-1.75.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.75.0-r100.ebuild
@@ -9,8 +9,8 @@ PYTHON_COMPAT=( python3_{10..12} )
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
-inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing \
- multilib multilib-build python-any-r1 rust rust-toolchain
toolchain-funcs verify-sig
+inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing multilib
multilib-build \
+ optfeature python-any-r1 rust rust-toolchain toolchain-funcs verify-sig
if [[ ${PV} = *beta* ]]; then
betaver=${PV//*beta}
@@ -690,20 +690,43 @@ pkg_preinst() {
pkg_postinst() {
- if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then
+ local old_rust="dev-lang/rust:stable/$(ver_cut 1-2)"
+ if has_version -b ${old_rust}; then
# Be _extra_ careful here as we're removing files from the live
filesystem
local f
+ local only_one_file=()
+ einfo "Tidying up libraries files from non-slotted
\`${old_rust}\`."
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
+ case ${#matching_files[@]} in
+ 2)
+ einfo "Removing old .${ext}: ${f}"
+ rm "${f}" || die
+ ;;
+ 1)
+ # Turns out fingerprints are not as
unique as we'd thought, _sometimes_ they collide,
+ # so we may have already installed over
the old file.
+ # We'll warn about this just in case,
but it's probably fine.
+ only_one_file+=( "${matching_files[0]}"
)
+ ;;
+ *)
+ die "Expected one or two files matching
${base_name}-\*.rlib, but found ${#matching_files[@]}"
+ ;;
+ esac
done
+ if [[ ${#only_one_file} -gt 0 ]]; then
+ einfo "While tidying up non-slotted rust libraries for
\`${old_rust}\`,"
+ einfo "the following file(s) did not have a duplicate
where one was expected:"
+ for f in "${only_one_file[@]}"; do
+ einfo " * ${f}"
+ done
+ einfo ""
+ einfo "This is unlikely to cause problems; the
fingerprint for the library ended up being the same."
+ einfo "However, if you encounter any issues please
report them to the Gentoo Rust Team."
+ fi
fi
eselect rust update
@@ -713,13 +736,8 @@ pkg_postinst() {
elog "for convenience they are installed under
/usr/bin/rust-{gdb,lldb}-${PV}."
fi
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for
rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
+ optfeature "Emacs support" "app-emacs/rust-mode"
+ optfeature "Vim support" "app-vim/rust-vim"
}
pkg_postrm() {
diff --git a/dev-lang/rust/rust-1.77.1-r100.ebuild
b/dev-lang/rust/rust-1.77.1-r100.ebuild
index e42c510..9deec7e 100644
--- a/dev-lang/rust/rust-1.77.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.77.1-r100.ebuild
@@ -9,8 +9,8 @@ PYTHON_COMPAT=( python3_{10..12} )
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
-inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing \
- multilib multilib-build python-any-r1 rust rust-toolchain
toolchain-funcs verify-sig
+inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing multilib
multilib-build \
+ optfeature python-any-r1 rust rust-toolchain toolchain-funcs verify-sig
if [[ ${PV} = *beta* ]]; then
betaver=${PV//*beta}
@@ -690,20 +690,43 @@ pkg_preinst() {
pkg_postinst() {
- if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then
+ local old_rust="dev-lang/rust:stable/$(ver_cut 1-2)"
+ if has_version -b ${old_rust}; then
# Be _extra_ careful here as we're removing files from the live
filesystem
local f
+ local only_one_file=()
+ einfo "Tidying up libraries files from non-slotted
\`${old_rust}\`."
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
+ case ${#matching_files[@]} in
+ 2)
+ einfo "Removing old .${ext}: ${f}"
+ rm "${f}" || die
+ ;;
+ 1)
+ # Turns out fingerprints are not as
unique as we'd thought, _sometimes_ they collide,
+ # so we may have already installed over
the old file.
+ # We'll warn about this just in case,
but it's probably fine.
+ only_one_file+=( "${matching_files[0]}"
)
+ ;;
+ *)
+ die "Expected one or two files matching
${base_name}-\*.rlib, but found ${#matching_files[@]}"
+ ;;
+ esac
done
+ if [[ ${#only_one_file} -gt 0 ]]; then
+ einfo "While tidying up non-slotted rust libraries for
\`${old_rust}\`,"
+ einfo "the following file(s) did not have a duplicate
where one was expected:"
+ for f in "${only_one_file[@]}"; do
+ einfo " * ${f}"
+ done
+ einfo ""
+ einfo "This is unlikely to cause problems; the
fingerprint for the library ended up being the same."
+ einfo "However, if you encounter any issues please
report them to the Gentoo Rust Team."
+ fi
fi
eselect rust update
@@ -713,13 +736,8 @@ pkg_postinst() {
elog "for convenience they are installed under
/usr/bin/rust-{gdb,lldb}-${PV}."
fi
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for
rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
+ optfeature "Emacs support" "app-emacs/rust-mode"
+ optfeature "Vim support" "app-vim/rust-vim"
}
pkg_postrm() {
diff --git a/dev-lang/rust/rust-1.79.0-r100.ebuild
b/dev-lang/rust/rust-1.79.0-r100.ebuild
index 94d0dfb..4b0d1f4 100644
--- a/dev-lang/rust/rust-1.79.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.79.0-r100.ebuild
@@ -9,8 +9,8 @@ PYTHON_COMPAT=( python3_{10..13} )
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
-inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing \
- multilib multilib-build python-any-r1 rust rust-toolchain
toolchain-funcs verify-sig
+inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing multilib
multilib-build \
+ optfeature python-any-r1 rust rust-toolchain toolchain-funcs verify-sig
if [[ ${PV} = *beta* ]]; then
betaver=${PV//*beta}
@@ -693,20 +693,43 @@ pkg_preinst() {
pkg_postinst() {
- if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then
+ local old_rust="dev-lang/rust:stable/$(ver_cut 1-2)"
+ if has_version -b ${old_rust}; then
# Be _extra_ careful here as we're removing files from the live
filesystem
local f
+ local only_one_file=()
+ einfo "Tidying up libraries files from non-slotted
\`${old_rust}\`."
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
+ case ${#matching_files[@]} in
+ 2)
+ einfo "Removing old .${ext}: ${f}"
+ rm "${f}" || die
+ ;;
+ 1)
+ # Turns out fingerprints are not as
unique as we'd thought, _sometimes_ they collide,
+ # so we may have already installed over
the old file.
+ # We'll warn about this just in case,
but it's probably fine.
+ only_one_file+=( "${matching_files[0]}"
)
+ ;;
+ *)
+ die "Expected one or two files matching
${base_name}-\*.rlib, but found ${#matching_files[@]}"
+ ;;
+ esac
done
+ if [[ ${#only_one_file} -gt 0 ]]; then
+ einfo "While tidying up non-slotted rust libraries for
\`${old_rust}\`,"
+ einfo "the following file(s) did not have a duplicate
where one was expected:"
+ for f in "${only_one_file[@]}"; do
+ einfo " * ${f}"
+ done
+ einfo ""
+ einfo "This is unlikely to cause problems; the
fingerprint for the library ended up being the same."
+ einfo "However, if you encounter any issues please
report them to the Gentoo Rust Team."
+ fi
fi
eselect rust update
@@ -716,13 +739,8 @@ pkg_postinst() {
elog "for convenience they are installed under
/usr/bin/rust-{gdb,lldb}-${PV}."
fi
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for
rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
+ optfeature "Emacs support" "app-emacs/rust-mode"
+ optfeature "Vim support" "app-vim/rust-vim"
}
pkg_postrm() {
diff --git a/dev-lang/rust/rust-1.80.1-r100.ebuild
b/dev-lang/rust/rust-1.80.1-r100.ebuild
index 438ac18..a0ab435 100644
--- a/dev-lang/rust/rust-1.80.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.80.1-r100.ebuild
@@ -9,8 +9,8 @@ PYTHON_COMPAT=( python3_{10..13} )
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
-inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing \
- multilib multilib-build python-any-r1 rust rust-toolchain
toolchain-funcs verify-sig
+inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing multilib
multilib-build \
+ optfeature python-any-r1 rust rust-toolchain toolchain-funcs verify-sig
if [[ ${PV} = *beta* ]]; then
betaver=${PV//*beta}
@@ -690,20 +690,43 @@ pkg_preinst() {
pkg_postinst() {
- if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then
+ local old_rust="dev-lang/rust:stable/$(ver_cut 1-2)"
+ if has_version -b ${old_rust}; then
# Be _extra_ careful here as we're removing files from the live
filesystem
local f
+ local only_one_file=()
+ einfo "Tidying up libraries files from non-slotted
\`${old_rust}\`."
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
+ case ${#matching_files[@]} in
+ 2)
+ einfo "Removing old .${ext}: ${f}"
+ rm "${f}" || die
+ ;;
+ 1)
+ # Turns out fingerprints are not as
unique as we'd thought, _sometimes_ they collide,
+ # so we may have already installed over
the old file.
+ # We'll warn about this just in case,
but it's probably fine.
+ only_one_file+=( "${matching_files[0]}"
)
+ ;;
+ *)
+ die "Expected one or two files matching
${base_name}-\*.rlib, but found ${#matching_files[@]}"
+ ;;
+ esac
done
+ if [[ ${#only_one_file} -gt 0 ]]; then
+ einfo "While tidying up non-slotted rust libraries for
\`${old_rust}\`,"
+ einfo "the following file(s) did not have a duplicate
where one was expected:"
+ for f in "${only_one_file[@]}"; do
+ einfo " * ${f}"
+ done
+ einfo ""
+ einfo "This is unlikely to cause problems; the
fingerprint for the library ended up being the same."
+ einfo "However, if you encounter any issues please
report them to the Gentoo Rust Team."
+ fi
fi
eselect rust update
@@ -713,13 +736,8 @@ pkg_postinst() {
elog "for convenience they are installed under
/usr/bin/rust-{gdb,lldb}-${PV}."
fi
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for
rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
+ optfeature "Emacs support" "app-emacs/rust-mode"
+ optfeature "Vim support" "app-vim/rust-vim"
}
pkg_postrm() {
diff --git a/dev-lang/rust/rust-1.81.0-r100.ebuild
b/dev-lang/rust/rust-1.81.0-r100.ebuild
index 572442c..0539ede 100644
--- a/dev-lang/rust/rust-1.81.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.81.0-r100.ebuild
@@ -694,20 +694,43 @@ pkg_preinst() {
pkg_postinst() {
- if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then
+ local old_rust="dev-lang/rust:stable/$(ver_cut 1-2)"
+ if has_version -b ${old_rust}; then
# Be _extra_ careful here as we're removing files from the live
filesystem
local f
+ local only_one_file=()
+ einfo "Tidying up libraries files from non-slotted
\`${old_rust}\`."
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
+ case ${#matching_files[@]} in
+ 2)
+ einfo "Removing old .${ext}: ${f}"
+ rm "${f}" || die
+ ;;
+ 1)
+ # Turns out fingerprints are not as
unique as we'd thought, _sometimes_ they collide,
+ # so we may have already installed over
the old file.
+ # We'll warn about this just in case,
but it's probably fine.
+ only_one_file+=( "${matching_files[0]}"
)
+ ;;
+ *)
+ die "Expected one or two files matching
${base_name}-\*.rlib, but found ${#matching_files[@]}"
+ ;;
+ esac
done
+ if [[ ${#only_one_file} -gt 0 ]]; then
+ einfo "While tidying up non-slotted rust libraries for
\`${old_rust}\`,"
+ einfo "the following file(s) did not have a duplicate
where one was expected:"
+ for f in "${only_one_file[@]}"; do
+ einfo " * ${f}"
+ done
+ einfo ""
+ einfo "This is unlikely to cause problems; the
fingerprint for the library ended up being the same."
+ einfo "However, if you encounter any issues please
report them to the Gentoo Rust Team."
+ fi
fi
eselect rust update
@@ -717,13 +740,8 @@ pkg_postinst() {
elog "for convenience they are installed under
/usr/bin/rust-{gdb,lldb}-${PV}."
fi
- if has_version app-editors/emacs; then
- optfeature "emacs support for rust" app-emacs/rust-mode
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- optfeature "vim support for rust" app-vim/rust-vim
- fi
+ optfeature "Emacs support" "app-emacs/rust-mode"
+ optfeature "Vim support" "app-vim/rust-vim"
}
pkg_postrm() {
diff --git a/dev-lang/rust/rust-1.82.0-r100.ebuild
b/dev-lang/rust/rust-1.82.0-r100.ebuild
index b4c7c34..a8f3fd0 100644
--- a/dev-lang/rust/rust-1.82.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.82.0-r100.ebuild
@@ -20,7 +20,7 @@ if [[ ${PV} = *beta* ]]; then
else
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc
~x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
DESCRIPTION="Systems programming language from Mozilla"
@@ -701,20 +701,43 @@ pkg_preinst() {
pkg_postinst() {
- if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then
+ local old_rust="dev-lang/rust:stable/$(ver_cut 1-2)"
+ if has_version -b ${old_rust}; then
# Be _extra_ careful here as we're removing files from the live
filesystem
local f
+ local only_one_file=()
+ einfo "Tidying up libraries files from non-slotted
\`${old_rust}\`."
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
+ case ${#matching_files[@]} in
+ 2)
+ einfo "Removing old .${ext}: ${f}"
+ rm "${f}" || die
+ ;;
+ 1)
+ # Turns out fingerprints are not as
unique as we'd thought, _sometimes_ they collide,
+ # so we may have already installed over
the old file.
+ # We'll warn about this just in case,
but it's probably fine.
+ only_one_file+=( "${matching_files[0]}"
)
+ ;;
+ *)
+ die "Expected one or two files matching
${base_name}-\*.rlib, but found ${#matching_files[@]}"
+ ;;
+ esac
done
+ if [[ ${#only_one_file} -gt 0 ]]; then
+ einfo "While tidying up non-slotted rust libraries for
\`${old_rust}\`,"
+ einfo "the following file(s) did not have a duplicate
where one was expected:"
+ for f in "${only_one_file[@]}"; do
+ einfo " * ${f}"
+ done
+ einfo ""
+ einfo "This is unlikely to cause problems; the
fingerprint for the library ended up being the same."
+ einfo "However, if you encounter any issues please
report them to the Gentoo Rust Team."
+ fi
fi
eselect rust update
@@ -724,13 +747,8 @@ pkg_postinst() {
elog "for convenience they are installed under
/usr/bin/rust-{gdb,lldb}-${PV}."
fi
- if has_version app-editors/emacs; then
- optfeature "emacs support for rust" app-emacs/rust-mode
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- optfeature "vim support for rust" app-vim/rust-vim
- fi
+ optfeature "Emacs support" "app-emacs/rust-mode"
+ optfeature "Vim support" "app-vim/rust-vim"
}
pkg_postrm() {