local TMP_CONFCACHE_DIR CONFCACHE_ARG
if hasq confcache $FEATURES && ! hasq confcache $RESTRICT; then
- CONFCACHE="$(type -p confcache)"
+ CONFCACHE="$(type -P confcache)"
if [ -z "${CONFCACHE}" ]; then
ewarn "disabling confcache, binary cannot be found"
else
return 1
fi
- if type -p chflags &>/dev/null; then
+ if type -P chflags > /dev/null ; then
chflags -R noschg,nouchg,nosappnd,nouappnd "${PORTAGE_BUILDDIR}"
chflags -R nosunlnk,nouunlnk "${PORTAGE_BUILDDIR}" 2>/dev/null
fi
# level the QA interceptors if we're in depend
if hasq "depend" "${EBUILD_SH_ARGS}"; then
for BIN in ${QA_INTERCEPTORS}; do
- BIN_PATH=$(type -pf ${BIN})
+ BIN_PATH=$(type -Pf ${BIN})
if [ "$?" != "0" ]; then
BODY="echo \"*** missing command: ${BIN}\" >&2; return 127"
else
fi
fi
-if type -p md5sum > /dev/null; then
+if type -P md5sum > /dev/null; then
md5_com='md5sum -c "${FILE}.md5sum"'
-elif type -p md5 > /dev/null; then
+elif type -P md5 > /dev/null; then
md5_com='[ "$(md5 -q ${FILE})" == "$(cut -d \ -f 1 ${FILE}.md5sum)" ]'
else
echo "warning, unable to do md5 verification of the snapshot!"
sync_local() {
echo Syncing local tree...
- if type -p tarsync &> /dev/null; then
+ if type -P tarsync &> /dev/null; then
# tarsync doesn't take numeric uid/gid so we need to convert them.
local inst_user="$(python -c "import pwd; print pwd.getpwuid(int('${PORTAGE_INST_UID:-0}'))[0]")"
local inst_group="$(python -c "import grp; print grp.getgrgid(int('${PORTAGE_INST_GID:-0}'))[0]")"
# Leo Lipelis <aeoo@gentoo.org>
# Karl Trygve Kalleberg <karltk@gentoo.org>
-if type -p gsed >/dev/null ; then
+if type -P gsed >/dev/null ; then
function sed() { gsed "$@"; }
fi
sleep 1
done
- if type -p scanelf > /dev/null && ! hasq binchecks ${RESTRICT}; then
+ if type -P scanelf > /dev/null && ! hasq binchecks ${RESTRICT}; then
local qa_var insecure_rpath=0 tmp_quiet=${PORTAGE_QUIET}
# display warnings when using stricter because we die afterwards
}
preinst_bsdflags() {
- type -p chflags &>/dev/null || return 0
- type -p mtree &>/dev/null || return 1
+ type -P chflags > /dev/null || return 0
+ type -P mtree > /dev/null || return 1
# Save all the file flags for restoration after installation.
mtree -c -p "${D}" -k flags > "${T}/bsdflags.mtree"
# Remove all the file flags so that the merge phase can do anything
}
postinst_bsdflags() {
- type -p chflags &>/dev/null || return 0
- type -p mtree &>/dev/null || return 1
+ type -P chflags > /dev/null || return 0
+ type -P mtree > /dev/null || return 1
# Restore all the file flags that were saved before installation.
mtree -e -p "${ROOT}" -U -k flags < "${T}/bsdflags.mtree" &> /dev/null
}
source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-if type -p chflags &>/dev/null && type -p mtree &>/dev/null; then
+if type -P chflags > /dev/null && type -P mtree > /dev/null ; then
# Save all the file flags for restoration at the end of prepall.
mtree -c -p "${D}" -k flags > "${T}/bsdflags.mtree"
# Remove all the file flags so that prepall can do anything necessary.
prepallinfo
prepallstrip
-if type -p chflags &>/dev/null && type -p mtree &>/dev/null; then
+if type -P chflags > /dev/null && type -P mtree > /dev/null; then
# Restore all the file flags that were saved at the beginning of prepall.
mtree -U -e -p "${D}" -k flags < "${T}/bsdflags.mtree" &> /dev/null
fi
fi
STRIP=${STRIP:-${CHOST}-strip}
-type -p -- ${STRIP} > /dev/null || STRIP=strip
+type -P -- ${STRIP} > /dev/null || STRIP=strip
OBJCOPY=${OBJCOPY:-${CHOST}-objcopy}
-type -p -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy
+type -P -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy
export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS:---strip-unneeded}
if [[ -n ${ESED} ]]; then
exec ${ESED} "$@"
-elif type -p gsed > /dev/null ; then
+elif type -P gsed > /dev/null ; then
exec gsed "$@"
else
old_IFS="${IFS}"