diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-05-04 05:23:31 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-05-04 05:23:31 +0000 |
commit | 993cade96ca3f5fe760a5f5df777cff24948f964 (patch) | |
tree | 06c16e4cd1984d4acbf6e5dce1df039e1c996818 /eclass/libtool.eclass | |
parent | New package app-i18n/zinnia-tomoe. New package required for ibus-handwrite. (diff) | |
download | gentoo-2-993cade96ca3f5fe760a5f5df777cff24948f964.tar.gz gentoo-2-993cade96ca3f5fe760a5f5df777cff24948f964.tar.bz2 gentoo-2-993cade96ca3f5fe760a5f5df777cff24948f964.zip |
make sure we save/restore chmod bits in case `patch` is broken and does not do it for us
Diffstat (limited to 'eclass/libtool.eclass')
-rw-r--r-- | eclass/libtool.eclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass index 71bf4d248e07..a735de060285 100644 --- a/eclass/libtool.eclass +++ b/eclass/libtool.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.102 2012/09/15 16:16:53 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.103 2013/05/04 05:23:31 vapier Exp $ # @ECLASS: libtool.eclass # @MAINTAINER: @@ -49,6 +49,8 @@ ELT_try_and_apply_patch() { fi printf '\nTrying %s\n' "${disp}" >> "${log}" + # Save file for permission restoration. `patch` sometimes resets things. + cp -p "${file}" "${file}.gentoo.elt" # We only support patchlevel of 0 - why worry if its static patches? if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then einfo " Applying ${disp} ..." @@ -58,6 +60,8 @@ ELT_try_and_apply_patch() { else ret=1 fi + chmod --reference="${file}.gentoo.elt" "${file}" + rm -f "${file}.gentoo.elt" return "${ret}" } |