commit:     9a23794a3dc75c2248fbb6546b6428480fb91ead
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 28 13:41:32 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 28 13:42:02 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a23794a

sys-devel/binutils: Detect and log binutils-config errors. Eventually we want 
to act on them...

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/binutils/binutils-2.42-r2.ebuild | 8 ++++----
 sys-devel/binutils/binutils-9999.ebuild    | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/sys-devel/binutils/binutils-2.42-r2.ebuild 
b/sys-devel/binutils/binutils-2.42-r2.ebuild
index 5e6ae95311f5..7b0f6ea29f53 100644
--- a/sys-devel/binutils/binutils-2.42-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.42-r2.ebuild
@@ -500,7 +500,7 @@ src_install() {
 pkg_postinst() {
        # Make sure this ${CTARGET} has a binutils version selected
        [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-       binutils-config ${CTARGET}-${PV}
+       binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an 
error
 }
 
 pkg_postrm() {
@@ -517,12 +517,12 @@ pkg_postrm() {
                choice=${choice//$'\n'/ }
                choice=${choice/* }
                if [[ -z ${choice} ]] ; then
-                       binutils-config -u ${CTARGET}
+                       binutils-config -u ${CTARGET} || eerror binutils-config 
returned an error
                else
-                       binutils-config ${choice}
+                       binutils-config ${choice} || eerror binutils-config 
returned an error
                fi
        elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; 
then
-               binutils-config ${CTARGET}-${PV}
+               binutils-config ${CTARGET}-${PV} || eerror binutils-config 
returned an error
        fi
 }
 

diff --git a/sys-devel/binutils/binutils-9999.ebuild 
b/sys-devel/binutils/binutils-9999.ebuild
index ec36fb66e100..ccf31a101405 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -494,7 +494,7 @@ src_install() {
 pkg_postinst() {
        # Make sure this ${CTARGET} has a binutils version selected
        [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
-       binutils-config ${CTARGET}-${PV}
+       binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an 
error
 }
 
 pkg_postrm() {
@@ -511,12 +511,12 @@ pkg_postrm() {
                choice=${choice//$'\n'/ }
                choice=${choice/* }
                if [[ -z ${choice} ]] ; then
-                       binutils-config -u ${CTARGET}
+                       binutils-config -u ${CTARGET} || eerror binutils-config 
returned an error
                else
-                       binutils-config ${choice}
+                       binutils-config ${choice} || eerror binutils-config 
returned an error
                fi
        elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; 
then
-               binutils-config ${CTARGET}-${PV}
+               binutils-config ${CTARGET}-${PV} || eerror binutils-config 
returned an error
        fi
 }
 

Reply via email to