commit:     b3d5707738167a15b9a12d73b855d16784f63d05
Author:     Joakim Tjernlund <Joakim.Tjernlund <AT> infinera <DOT> com>
AuthorDate: Tue Jan  4 09:19:06 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 07:42:52 2022 +0000
URL:        
https://gitweb.gentoo.org/proj/binutils-config.git/commit/?id=b3d57077

binutils-config: skip updating empty env.d files

If the package doesn't have any info or man pages, we won't create
an env.d file, so don't try moving it.

Closes: https://bugs.gentoo.org/796260
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund <AT> infinera.com>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 src/binutils-config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/binutils-config b/src/binutils-config
index 28bb044..8b62868 100755
--- a/src/binutils-config
+++ b/src/binutils-config
@@ -253,7 +253,7 @@ switch_profile() {
                rm -f "${ee}"
                [[ -d ${ROOT}/${DATAPATH}/man  ]] && echo 
"MANPATH=${DATAPATH}/man"   >> "${ee}"
                [[ -d ${ROOT}/${DATAPATH}/info ]] && echo 
"INFOPATH=${DATAPATH}/info" >> "${ee}"
-               mv_if_diff "${ee}" "${e}"
+               [[ -e "${ee}" ]] && mv_if_diff "${ee}" "${e}"
        fi
 
        local c="${ENV_D}/config-${TARGET}"

Reply via email to