From: Zac Medico Date: Mon, 4 Feb 2013 17:53:22 +0000 (-0800) Subject: econf: preserve configure timestamp, bug #440304 X-Git-Tag: v2.2.0_alpha162~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2a90b77f1606f4ab7b829672c87cba29670410e3;p=portage.git econf: preserve configure timestamp, bug #440304 --- diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 383f9ff5e..7426229a6 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -439,8 +439,13 @@ econf() { if [ -x "${ECONF_SOURCE}/configure" ]; then if [[ -n $CONFIG_SHELL && \ "$(head -n1 "$ECONF_SOURCE/configure")" =~ ^'#!'[[:space:]]*/bin/sh([[:space:]]|$) ]] ; then - sed -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" -i "$ECONF_SOURCE/configure" || \ + sed -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" "$ECONF_SOURCE/configure" > \ + "$ECONF_SOURCE/configure._portage_tmp_.$$" || \ die "Substition of shebang in '$ECONF_SOURCE/configure' failed" + # preserve timestamp, see bug #440304 + touch -r "$ECONF_SOURCE/configure" "$ECONF_SOURCE/configure._portage_tmp_.$$" || die + mv "$ECONF_SOURCE/configure._portage_tmp_.$$" "$ECONF_SOURCE/configure" || die + chmod +x "$ECONF_SOURCE/configure" || die fi if [ -e "${EPREFIX}"/usr/share/gnuconfig/ ]; then find "${WORKDIR}" -type f '(' \