Commit d5ef400c authored by Vitaly Lipatov's avatar Vitaly Lipatov

restore all remove_on_exit for mktemp

parent 731dc91c
......@@ -69,6 +69,7 @@ __download_pkg_urls()
for url in $pkg_urls ; do
local tmppkg
tmppkg="$(mktemp -d --tmpdir=$BIGTMPDIR)" || fatal
remove_on_exit $tmppkg
docmd chmod $verbose a+rX $tmppkg
showcmd cd $tmppkg
cd $tmppkg || fatal
......@@ -149,6 +150,7 @@ __epm_print_url_alt_check()
shift
local tm
tm="$(mktemp)" || fatal
remove_on_exit $tm
assure_exists curl
load_helper epm-site
quiet=1
......
......@@ -26,6 +26,7 @@ __epm_get_file_from_url()
local url="$1"
local tmpfile
tmpfile=$(mktemp) || fatal
remove_on_exit $tmpfile
eget -O "$tmpfile" "$url" >/dev/null
echo "$tmpfile"
}
......
......@@ -399,6 +399,7 @@ __epm_restore_meson()
if [ -n "$dryrun" ] ; then
local lt
lt=$(mktemp) || fatal
remove_on_exit $lt
echo
__epm_restore_print_comment "$req_file" " dependency"
grep "dependency(" $req_file | sed -e 's|.*dependency(||' -e 's|).*||' -e 's|, required.*||' -e 's|, version:||' -e "s|'||g" >$lt
......@@ -410,6 +411,7 @@ __epm_restore_meson()
info "Install requirements from $req_file ..."
local lt
lt=$(mktemp) || fatal
remove_on_exit $lt
grep "dependency(" $req_file | sed -e 's|.*dependency(||' -e 's|).*||' -e 's|, required.*||' -e 's|, version:||' -e "s|'||g" >$lt
ilist="$ilist $(__epm_print_meson_list "" $lt)"
......@@ -428,6 +430,7 @@ __epm_restore_npm()
if [ -n "$dryrun" ] ; then
local lt
lt=$(mktemp) || fatal
remove_on_exit $lt
a= jq .dependencies <$req_file >$lt
echo
__epm_restore_print_comment "$req_file"
......@@ -444,6 +447,7 @@ __epm_restore_npm()
info "Install requirements from $req_file ..."
local lt
lt=$(mktemp) || fatal
remove_on_exit $lt
a= jq .dependencies <$req_file >$lt
ilist="$(__epm_print_npm_list "" $lt)"
a= jq .devDependencies <$req_file >$lt
......@@ -460,6 +464,7 @@ __epm_restore_perl()
if [ -n "$dryrun" ] ; then
local lt
lt=$(mktemp) || fatal
remove_on_exit $lt
a= /usr/bin/perl $req_file PRINT_PREREQ=1 >$lt
# all requirements will autodetected during packing, put it to the buildreq
echo
......@@ -472,6 +477,7 @@ __epm_restore_perl()
info "Install requirements from $req_file ..."
local lt
lt=$(mktemp) || exit
remove_on_exit $lt
a= /usr/bin/perl $req_file PRINT_PREREQ=1 >$lt
ilist="$(__epm_print_perl_list "" $lt)"
rm -f $lt
......@@ -488,6 +494,7 @@ __epm_restore_perl_shyaml()
if [ -n "$dryrun" ] ; then
local lt
lt=$(mktemp) || fatal
remove_on_exit $lt
a= shyaml get-value requires <$req_file >$lt
# all requirements will autodetected during packing, put it to the buildreq
echo
......@@ -505,6 +512,7 @@ __epm_restore_perl_shyaml()
info "Install requirements from $req_file ..."
local lt
lt=$(mktemp) || fatal
remove_on_exit $lt
a= shyaml get-value requires <$req_file >$lt
ilist="$(__epm_print_perl_list "" $lt)"
a= shyaml get-value build_requires <$req_file >$lt
......
......@@ -255,6 +255,7 @@ store_output()
{
# use make_temp_file from etersoft-build-utils
RC_STDOUT="$(mktemp)" || fatal
remove_on_exit $RC_STDOUT
local CMDSTATUS=$RC_STDOUT.pipestatus
echo 1 >$CMDSTATUS
#RC_STDERR=$(mktemp)
......
......@@ -38,6 +38,7 @@ __epm_package_name_ok_scripts()
[ -s "$alf" ] || return 1
[ -n "$name" ] || return 1
local tmpalf=$(__convert_pkgallowscripts_to_regexp "$alf")
remove_on_exit $tmpalf
echo "$name" | grep -q -f $tmpalf
local res=$?
rm $tmpalf
......@@ -61,6 +62,7 @@ __epm_vendor_ok_scripts()
[ -s "$alf" ] || return 1
[ -n "$vendor" ] || return 1
local tmpalf=$(__convert_pkgallowscripts_to_regexp "$alf")
remove_on_exit $tmpalf
echo "$vendor" | grep -q -f $tmpalf
local res=$?
rm $tmpalf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment