diff options
author | Ulrich Müller <ulm@gentoo.org> | 2022-05-26 17:03:08 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2022-07-18 18:04:08 +0200 |
commit | d2967b3ce61fed3a7cc6d36d45371641c0d2eaee (patch) | |
tree | dc55f1bd481c13f4ecaff9aafae37f69eee7b8b6 /eclass | |
parent | eutils.eclass: Remove use_if_iuse (diff) | |
download | gentoo-d2967b3ce61fed3a7cc6d36d45371641c0d2eaee.tar.gz gentoo-d2967b3ce61fed3a7cc6d36d45371641c0d2eaee.tar.bz2 gentoo-d2967b3ce61fed3a7cc6d36d45371641c0d2eaee.zip |
eutils.eclass: Remove emktemp
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/eutils.eclass | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index e2b3ce0482a9..e7fae2c656c6 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -30,41 +30,10 @@ case ${EAPI} in *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -# @FUNCTION: emktemp -# @USAGE: [temp dir] -# @DESCRIPTION: -# Cheap replacement for when coreutils (and thus mktemp) does not exist -# on the user's system. emktemp() { - eqawarn "emktemp is deprecated. Create a temporary file in \${T} instead." - - local exe="touch" - [[ $1 == -d ]] && exe="mkdir" && shift - local topdir=$1 - - if [[ -z ${topdir} ]] ; then - [[ -z ${T} ]] \ - && topdir="/tmp" \ - || topdir=${T} - fi - - if ! type -P mktemp > /dev/null ; then - # system lacks `mktemp` so we have to fake it - local tmp=/ - while [[ -e ${tmp} ]] ; do - tmp=${topdir}/tmp.${RANDOM}.${RANDOM}.${RANDOM} - done - ${exe} "${tmp}" || ${exe} -p "${tmp}" - echo "${tmp}" - else - # the args here will give slightly wierd names on BSD, - # but should produce a usable file on all userlands - if [[ ${exe} == "touch" ]] ; then - TMPDIR="${topdir}" mktemp -t tmp.XXXXXXXXXX - else - TMPDIR="${topdir}" mktemp -dt tmp.XXXXXXXXXX - fi - fi + eerror "emktemp has been removed." + eerror "Create a temporary file in \${T} instead." + die "emktemp is banned" } path_exists() { |