From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8775A1581B9 for ; Tue, 30 Sep 2025 20:15:00 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 72812340E5C for ; Tue, 30 Sep 2025 20:15:00 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id DD762110574; Tue, 30 Sep 2025 20:14:53 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id D6453110574 for ; Tue, 30 Sep 2025 20:14:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4E991340F2B for ; Tue, 30 Sep 2025 20:14:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AB5CB3A67 for ; Tue, 30 Sep 2025 20:14:51 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1759263244.82ef038c820564201ffc9f7c3e742be12a6c421c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-shells/bash/bash-5.2_p37-r4.ebuild app-shells/bash/bash-5.3_p3-r1.ebuild app-shells/bash/bash-5.3_p3-r2.ebuild app-shells/bash/bash-5.4_alpha_pre20250918-r1.ebuild app-shells/bash/bash-9999.ebuild X-VCS-Directories: app-shells/bash/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 82ef038c820564201ffc9f7c3e742be12a6c421c X-VCS-Branch: master Date: Tue, 30 Sep 2025 20:14:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 57d771fe-7ca7-4721-87b1-70b04c52da34 X-Archives-Hash: 62a082d864fb3ebfe04eaebcedb22d37 commit: 82ef038c820564201ffc9f7c3e742be12a6c421c Author: Kerin Millar plushkava net> AuthorDate: Thu Sep 25 17:24:41 2025 +0000 Commit: Sam James gentoo org> CommitDate: Tue Sep 30 20:14:04 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82ef038c app-shells/bash: overhaul SLOT 0 ebuilds; minimise their differences The bash ebuilds in SLOT 0 continue to diverge from one another in small but irksome ways, which makes working on them a chore. As such, the main purpose of this commit is to minimise the differences between them. Beyond that, several other changes have been made. All of the changes are described herewith. As regards the matter of difference minimisation: - order the patterns of the first case statement in a consistent way - declare BASH_COMMIT within the scope of the first case statement - always declare BASH_COMMIT (even if as a null string or dead code) - remove a redundant ;; operator from the first case statement - always acknowledge that BASH_COMMIT might be set - declare S within the scope of the second case statement - consistently mention that Chet advises against the use of byacc In pkg_postinst(), incorporate a warning to the effect of the "15-gentoo-bashrc-check.bash" file being safe to delete. Restructure the pkg_postinst() code so as to make it easier to incorporate additional, version-dependent, upgrade notices. In pkg_postinst(), if the terminal is found to be more than 80 columns wide, invoke the fmt(1) utility so as to reflow the upgrade notice(s). Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> app-shells/bash/bash-5.2_p37-r4.ebuild | 57 ++++++++++++++++++---- app-shells/bash/bash-5.3_p3-r1.ebuild | 44 +++++++++++++---- app-shells/bash/bash-5.3_p3-r2.ebuild | 44 +++++++++++++---- .../bash/bash-5.4_alpha_pre20250918-r1.ebuild | 44 +++++++++++++---- app-shells/bash/bash-9999.ebuild | 40 ++++++++++++--- 5 files changed, 184 insertions(+), 45 deletions(-) diff --git a/app-shells/bash/bash-5.2_p37-r4.ebuild b/app-shells/bash/bash-5.2_p37-r4.ebuild index 50da6638e250..1066db240020 100644 --- a/app-shells/bash/bash-5.2_p37-r4.ebuild +++ b/app-shells/bash/bash-5.2_p37-r4.ebuild @@ -17,12 +17,15 @@ MY_PATCHES=() # Determine the patchlevel. See https://ftp.gnu.org/gnu/bash/bash-5.2-patches/. case ${PV} in - *_p*) - PLEVEL=${PV##*_p} - ;; 9999|*_alpha*|*_beta*|*_rc*) # Set a negative patchlevel to indicate that it's a pre-release. PLEVEL=-1 + if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then + BASH_COMMIT= + fi + ;; + *_p*) + PLEVEL=${PV##*_p} ;; *) PLEVEL=0 @@ -39,6 +42,14 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" EGIT_BRANCH=devel inherit git-r3 +elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then + # It can be useful to have snapshots in the pre-release period once + # the first alpha is out, as various bugs get reported and fixed from + # the alpha, and the next pre-release is usually quite far away. + # + # i.e. if it's worth packaging the alpha, it's worth packaging a followup. + SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz" + S=${WORKDIR}/${PN}-${BASH_COMMIT} else my_urls=( "mirror://gnu/bash/${MY_P}.tar.gz" ) @@ -52,6 +63,7 @@ else done SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )" + S=${WORKDIR}/${MY_P} unset -v my_urls my_p my_patch_idx my_patch_ver fi @@ -60,8 +72,6 @@ if [[ ${GENTOO_PATCH_VER} ]]; then SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz" fi -S=${WORKDIR}/${MY_P} - LICENSE="GPL-3+" SLOT="0" if (( PLEVEL >= 0 )); then @@ -121,6 +131,8 @@ src_unpack() { if [[ ${PV} == 9999 ]]; then git-r3_src_unpack + elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then + default else if use verify-sig; then verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig} @@ -172,8 +184,10 @@ src_configure() { # Upstream only test with Bison and require GNUisms like YYEOF and # YYERRCODE. The former at least may be in POSIX soon: # https://www.austingroupbugs.net/view.php?id=1269. + # # configure warns on use of non-Bison but doesn't abort. The result - # may misbehave at runtime. + # may misbehave at runtime. Chet also advises against use of byacc: + # https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00115.html unset -v YACC # bash 5.3 drops unprototyped functions, earlier versions are @@ -380,6 +394,11 @@ pkg_postinst() { ln -sf -- bash "${EROOT}"/bin/sh || die fi + if [[ -e ${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash ]]; then + ewarn "The following file is no longer packaged and can safely be deleted:" + ewarn "${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash" + fi + read -rd '' -a versions <<<"${REPLACING_VERSIONS}" for ver in "${versions[@]}"; do if [[ ! ${old_ver} ]] || ver_test "${ver}" -lt "${old_ver}"; then @@ -387,13 +406,21 @@ pkg_postinst() { fi done - if [[ ! $old_ver ]]; then - : - elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + if [[ ! ${old_ver} ]]; then return fi - while read -r; do ewarn "${REPLY}"; done <<'EOF' + { + if ver_test "${old_ver}" -ge "5.2" \ + && ver_test "${old_ver}" -ge "5.2_p26-r8" + then + : + elif ver_test "${old_ver}" -lt "5.2" \ + && ver_test "${old_ver}" -ge "5.1_p16-r8" + then + : + else + cat <<'EOF' Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the @@ -416,4 +443,14 @@ Those who would prefer for bash never to interfere with the window title may now opt out of the default title setting behaviour, either with the "unset -v PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. EOF + fi + } \ + | if [[ ${COLUMNS} == [1-9]*([0-9]) ]] && (( COLUMNS > 80 )); then + fmt -w "$(( COLUMNS - 3 ))" + else + cat + fi \ + | while read -r; do + ewarn "${REPLY}" + done } diff --git a/app-shells/bash/bash-5.3_p3-r1.ebuild b/app-shells/bash/bash-5.3_p3-r1.ebuild index fe9698321a81..beed9733e70d 100644 --- a/app-shells/bash/bash-5.3_p3-r1.ebuild +++ b/app-shells/bash/bash-5.3_p3-r1.ebuild @@ -20,13 +20,15 @@ case ${PV} in 9999|*_alpha*|*_beta*|*_rc*) # Set a negative patchlevel to indicate that it's a pre-release. PLEVEL=-1 + if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then + BASH_COMMIT= + fi ;; *_p*) PLEVEL=${PV##*_p} ;; *) PLEVEL=0 - ;; esac # The version of readline this bash normally ships with. Note that we only use @@ -40,13 +42,12 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" EGIT_BRANCH=devel inherit git-r3 -elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then +elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then # It can be useful to have snapshots in the pre-release period once # the first alpha is out, as various bugs get reported and fixed from # the alpha, and the next pre-release is usually quite far away. # # i.e. if it's worth packaging the alpha, it's worth packaging a followup. - BASH_COMMIT="b35866a2891a9b069e37ca5684d4309c0391e261" SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz" S=${WORKDIR}/${PN}-${BASH_COMMIT} else @@ -124,7 +125,7 @@ src_unpack() { if [[ ${PV} == 9999 ]]; then git-r3_src_unpack - elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then default else if use verify-sig; then @@ -168,8 +169,10 @@ src_configure() { # Upstream only test with Bison and require GNUisms like YYEOF and # YYERRCODE. The former at least may be in POSIX soon: # https://www.austingroupbugs.net/view.php?id=1269. + # # configure warns on use of non-Bison but doesn't abort. The result - # may misbehave at runtime. + # may misbehave at runtime. Chet also advises against use of byacc: + # https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00115.html unset -v YACC if tc-is-cross-compiler; then @@ -372,6 +375,11 @@ pkg_postinst() { ln -sf -- bash "${EROOT}"/bin/sh || die fi + if [[ -e ${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash ]]; then + ewarn "The following file is no longer packaged and can safely be deleted:" + ewarn "${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash" + fi + read -rd '' -a versions <<<"${REPLACING_VERSIONS}" for ver in "${versions[@]}"; do if [[ ! ${old_ver} ]] || ver_test "${ver}" -lt "${old_ver}"; then @@ -379,13 +387,21 @@ pkg_postinst() { fi done - if [[ ! $old_ver ]]; then - : - elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + if [[ ! ${old_ver} ]]; then return fi - while read -r; do ewarn "${REPLY}"; done <<'EOF' + { + if ver_test "${old_ver}" -ge "5.2" \ + && ver_test "${old_ver}" -ge "5.2_p26-r8" + then + : + elif ver_test "${old_ver}" -lt "5.2" \ + && ver_test "${old_ver}" -ge "5.1_p16-r8" + then + : + else + cat <<'EOF' Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the @@ -408,4 +424,14 @@ Those who would prefer for bash never to interfere with the window title may now opt out of the default title setting behaviour, either with the "unset -v PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. EOF + fi + } \ + | if [[ ${COLUMNS} == [1-9]*([0-9]) ]] && (( COLUMNS > 80 )); then + fmt -w "$(( COLUMNS - 3 ))" + else + cat + fi \ + | while read -r; do + ewarn "${REPLY}" + done } diff --git a/app-shells/bash/bash-5.3_p3-r2.ebuild b/app-shells/bash/bash-5.3_p3-r2.ebuild index b04e96695eaa..7e1f47f54895 100644 --- a/app-shells/bash/bash-5.3_p3-r2.ebuild +++ b/app-shells/bash/bash-5.3_p3-r2.ebuild @@ -20,13 +20,15 @@ case ${PV} in 9999|*_alpha*|*_beta*|*_rc*) # Set a negative patchlevel to indicate that it's a pre-release. PLEVEL=-1 + if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then + BASH_COMMIT= + fi ;; *_p*) PLEVEL=${PV##*_p} ;; *) PLEVEL=0 - ;; esac # The version of readline this bash normally ships with. Note that we only use @@ -40,13 +42,12 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" EGIT_BRANCH=devel inherit git-r3 -elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then +elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then # It can be useful to have snapshots in the pre-release period once # the first alpha is out, as various bugs get reported and fixed from # the alpha, and the next pre-release is usually quite far away. # # i.e. if it's worth packaging the alpha, it's worth packaging a followup. - BASH_COMMIT="b35866a2891a9b069e37ca5684d4309c0391e261" SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz" S=${WORKDIR}/${PN}-${BASH_COMMIT} else @@ -124,7 +125,7 @@ src_unpack() { if [[ ${PV} == 9999 ]]; then git-r3_src_unpack - elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then default else if use verify-sig; then @@ -168,8 +169,10 @@ src_configure() { # Upstream only test with Bison and require GNUisms like YYEOF and # YYERRCODE. The former at least may be in POSIX soon: # https://www.austingroupbugs.net/view.php?id=1269. + # # configure warns on use of non-Bison but doesn't abort. The result - # may misbehave at runtime. + # may misbehave at runtime. Chet also advises against use of byacc: + # https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00115.html unset -v YACC if tc-is-cross-compiler; then @@ -373,6 +376,11 @@ pkg_postinst() { ln -sf -- bash "${EROOT}"/bin/sh || die fi + if [[ -e ${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash ]]; then + ewarn "The following file is no longer packaged and can safely be deleted:" + ewarn "${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash" + fi + read -rd '' -a versions <<<"${REPLACING_VERSIONS}" for ver in "${versions[@]}"; do if [[ ! ${old_ver} ]] || ver_test "${ver}" -lt "${old_ver}"; then @@ -380,13 +388,21 @@ pkg_postinst() { fi done - if [[ ! $old_ver ]]; then - : - elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + if [[ ! ${old_ver} ]]; then return fi - while read -r; do ewarn "${REPLY}"; done <<'EOF' + { + if ver_test "${old_ver}" -ge "5.2" \ + && ver_test "${old_ver}" -ge "5.2_p26-r8" + then + : + elif ver_test "${old_ver}" -lt "5.2" \ + && ver_test "${old_ver}" -ge "5.1_p16-r8" + then + : + else + cat <<'EOF' Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the @@ -409,4 +425,14 @@ Those who would prefer for bash never to interfere with the window title may now opt out of the default title setting behaviour, either with the "unset -v PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. EOF + fi + } \ + | if [[ ${COLUMNS} == [1-9]*([0-9]) ]] && (( COLUMNS > 80 )); then + fmt -w "$(( COLUMNS - 3 ))" + else + cat + fi \ + | while read -r; do + ewarn "${REPLY}" + done } diff --git a/app-shells/bash/bash-5.4_alpha_pre20250918-r1.ebuild b/app-shells/bash/bash-5.4_alpha_pre20250918-r1.ebuild index 657225a804f9..10edeed625e6 100644 --- a/app-shells/bash/bash-5.4_alpha_pre20250918-r1.ebuild +++ b/app-shells/bash/bash-5.4_alpha_pre20250918-r1.ebuild @@ -20,13 +20,15 @@ case ${PV} in 9999|*_alpha*|*_beta*|*_rc*) # Set a negative patchlevel to indicate that it's a pre-release. PLEVEL=-1 + if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then + BASH_COMMIT="cf8a2518c8b94f75b330d398f5daa0ee21417e1b" + fi ;; *_p*) PLEVEL=${PV##*_p} ;; *) PLEVEL=0 - ;; esac # The version of readline this bash normally ships with. Note that we only use @@ -40,13 +42,12 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" EGIT_BRANCH=devel inherit git-r3 -elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then +elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then # It can be useful to have snapshots in the pre-release period once # the first alpha is out, as various bugs get reported and fixed from # the alpha, and the next pre-release is usually quite far away. # # i.e. if it's worth packaging the alpha, it's worth packaging a followup. - BASH_COMMIT="cf8a2518c8b94f75b330d398f5daa0ee21417e1b" SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz" S=${WORKDIR}/${PN}-${BASH_COMMIT} else @@ -123,7 +124,7 @@ src_unpack() { if [[ ${PV} == 9999 ]]; then git-r3_src_unpack - elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then default else if use verify-sig; then @@ -167,8 +168,10 @@ src_configure() { # Upstream only test with Bison and require GNUisms like YYEOF and # YYERRCODE. The former at least may be in POSIX soon: # https://www.austingroupbugs.net/view.php?id=1269. + # # configure warns on use of non-Bison but doesn't abort. The result - # may misbehave at runtime. + # may misbehave at runtime. Chet also advises against use of byacc: + # https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00115.html unset -v YACC if tc-is-cross-compiler; then @@ -369,6 +372,11 @@ pkg_postinst() { ln -sf -- bash "${EROOT}"/bin/sh || die fi + if [[ -e ${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash ]]; then + ewarn "The following file is no longer packaged and can safely be deleted:" + ewarn "${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash" + fi + read -rd '' -a versions <<<"${REPLACING_VERSIONS}" for ver in "${versions[@]}"; do if [[ ! ${old_ver} ]] || ver_test "${ver}" -lt "${old_ver}"; then @@ -376,13 +384,21 @@ pkg_postinst() { fi done - if [[ ! $old_ver ]]; then - : - elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + if [[ ! ${old_ver} ]]; then return fi - while read -r; do ewarn "${REPLY}"; done <<'EOF' + { + if ver_test "${old_ver}" -ge "5.2" \ + && ver_test "${old_ver}" -ge "5.2_p26-r8" + then + : + elif ver_test "${old_ver}" -lt "5.2" \ + && ver_test "${old_ver}" -ge "5.1_p16-r8" + then + : + else + cat <<'EOF' Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the @@ -405,4 +421,14 @@ Those who would prefer for bash never to interfere with the window title may now opt out of the default title setting behaviour, either with the "unset -v PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. EOF + fi + } \ + | if [[ ${COLUMNS} == [1-9]*([0-9]) ]] && (( COLUMNS > 80 )); then + fmt -w "$(( COLUMNS - 3 ))" + else + cat + fi \ + | while read -r; do + ewarn "${REPLY}" + done } diff --git a/app-shells/bash/bash-9999.ebuild b/app-shells/bash/bash-9999.ebuild index 7e576e31249a..6211b96f2a29 100644 --- a/app-shells/bash/bash-9999.ebuild +++ b/app-shells/bash/bash-9999.ebuild @@ -20,13 +20,15 @@ case ${PV} in 9999|*_alpha*|*_beta*|*_rc*) # Set a negative patchlevel to indicate that it's a pre-release. PLEVEL=-1 + if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then + BASH_COMMIT= + fi ;; *_p*) PLEVEL=${PV##*_p} ;; *) PLEVEL=0 - ;; esac # The version of readline this bash normally ships with. Note that we only use @@ -40,13 +42,12 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" EGIT_BRANCH=devel inherit git-r3 -elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then +elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then # It can be useful to have snapshots in the pre-release period once # the first alpha is out, as various bugs get reported and fixed from # the alpha, and the next pre-release is usually quite far away. # # i.e. if it's worth packaging the alpha, it's worth packaging a followup. - BASH_COMMIT="b35866a2891a9b069e37ca5684d4309c0391e261" SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz" S=${WORKDIR}/${PN}-${BASH_COMMIT} else @@ -123,7 +124,7 @@ src_unpack() { if [[ ${PV} == 9999 ]]; then git-r3_src_unpack - elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then default else if use verify-sig; then @@ -374,6 +375,11 @@ pkg_postinst() { ln -sf -- bash "${EROOT}"/bin/sh || die fi + if [[ -e ${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash ]]; then + ewarn "The following file is no longer packaged and can safely be deleted:" + ewarn "${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash" + fi + read -rd '' -a versions <<<"${REPLACING_VERSIONS}" for ver in "${versions[@]}"; do if [[ ! ${old_ver} ]] || ver_test "${ver}" -lt "${old_ver}"; then @@ -381,13 +387,21 @@ pkg_postinst() { fi done - if [[ ! $old_ver ]]; then - : - elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + if [[ ! ${old_ver} ]]; then return fi - while read -r; do ewarn "${REPLY}"; done <<'EOF' + { + if ver_test "${old_ver}" -ge "5.2" \ + && ver_test "${old_ver}" -ge "5.2_p26-r8" + then + : + elif ver_test "${old_ver}" -lt "5.2" \ + && ver_test "${old_ver}" -ge "5.1_p16-r8" + then + : + else + cat <<'EOF' Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the @@ -410,4 +424,14 @@ Those who would prefer for bash never to interfere with the window title may now opt out of the default title setting behaviour, either with the "unset -v PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. EOF + fi + } \ + | if [[ ${COLUMNS} == [1-9]*([0-9]) ]] && (( COLUMNS > 80 )); then + fmt -w "$(( COLUMNS - 3 ))" + else + cat + fi \ + | while read -r; do + ewarn "${REPLY}" + done }