diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-10-09 23:27:16 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-10-09 23:27:16 -0700 |
commit | aeced1ac893951aec4992b2a1af7a4d057d6ce24 (patch) | |
tree | 5d7b9a2c1a2573b5bab6f7478f945c4f4cc5d290 | |
parent | 13a759213ec1fefe5e637e5467fe9d5f35d8f570 (diff) | |
download | portage-aeced1ac893951aec4992b2a1af7a4d057d6ce24.tar.gz portage-aeced1ac893951aec4992b2a1af7a4d057d6ce24.tar.bz2 portage-aeced1ac893951aec4992b2a1af7a4d057d6ce24.zip |
prepstrip: tweak style of debugedit checksv2.2.0_alpha65
Make the checks more like the FEATURES/RESTRICT checks from commit
286675a500998e536dbbf2ee2dfe1fedf4290b38.
-rwxr-xr-x | bin/ebuild-helpers/prepstrip | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip index bd518430e..68b2133e3 100755 --- a/bin/ebuild-helpers/prepstrip +++ b/bin/ebuild-helpers/prepstrip @@ -36,9 +36,9 @@ type -P -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy export SAFE_STRIP_FLAGS="--strip-unneeded" export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS-${SAFE_STRIP_FLAGS} -R .comment} prepstrip_sources_dir=/usr/src/debug/${CATEGORY}/${PF} -type -P debugedit >/dev/null -debugedit_found=$? -debugedit_warned= + +type -P debugedit >/dev/null && debugedit_found=true || debugedit_found=false +debugedit_warned=false unset ${!INODE_*} @@ -53,9 +53,9 @@ inode_var_name() { save_elf_sources() { ${FEATURES_installsources} || return 0 ${RESTRICT_installsources} && return 0 - if [ ${debugedit_found} -ne 0 ] ; then - if [ -z ${debugedit_warned} ] ; then - debugedit_warned=1 + if ! ${debugedit_found} ; then + if ! ${debugedit_warned} ; then + debugedit_warned=true ewarn "FEATURES=installsources is enabled but the debugedit binary could not" ewarn "be found. This feature will not work unless debugedit is installed!" fi @@ -79,7 +79,7 @@ save_elf_debug() { [[ ${x} == *".debug" ]] && return 0 # this will recompute the build-id, but for now that's ok - local buildid="$( [ ${debugedit_found} -eq 0 ] && debugedit -i "${x}" )" + local buildid="$( ${debugedit_found} && debugedit -i "${x}" )" mkdir -p $(dirname "${y}") @@ -191,7 +191,7 @@ done if [[ -s ${T}/debug.sources ]] && \ ${FEATURES_installsources} && \ ! ${RESTRICT_installsources} && \ - [ ${debugedit_found} -eq 0 ] + ${debugedit_found} then vecho "installsources: rsyncing source files" [[ -d ${D}${prepstrip_sources_dir} ]] || mkdir -p "${D}${prepstrip_sources_dir}" |