Commit afa01b8f authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm install: add --download_only (save after repack) and --direct +…

epm install: add --download_only (save after repack) and --direct + --download_only (save before repack)
parent 38b06f9c
......@@ -549,7 +549,7 @@ if [ -n "$quiet" ] ; then
fi
# fill
export EPM_OPTIONS="$nodeps $force $verbose $quiet $non_interactive"
export EPM_OPTIONS="$nodeps $direct $force $verbose $quiet $non_interactive $download_only"
# if input is not console and run script from file, get pkgs from stdin too
if [ ! -n "$inscript" ] && ! inputisatty && [ -n "$PROGDIR" ] ; then
......
......@@ -326,6 +326,12 @@ epm_install_files()
files="$repacked_pkgs"
fi
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
return
fi
__epm_check_if_src_rpm $files
if [ -z "$repacked_pkgs" ] ; then
......@@ -376,6 +382,12 @@ epm_install_files()
#__epm_remove_tmp_files
fi
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
return
fi
# TODO: if dpkg can't install due missed deps, trying with apt (as for now, --refuse-depends, --refuse-breaks don't help me)
if [ -n "$nodeps" ] ; then
......@@ -425,6 +437,12 @@ epm_install_files()
#__epm_remove_tmp_files
fi
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
return
fi
__epm_check_if_src_rpm $files
sudocmd rpm -Uvh $force $noscripts $nodeps $files && return
local RES=$?
......@@ -463,6 +481,14 @@ epm_install_files()
esac
# check download_only before commands without repack supporting
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
return
fi
case $PMTYPE in
packagekit)
docmd pkcon install-local $files
......@@ -705,6 +731,13 @@ epm_install()
# FIXME: see to_remove below
epm_install_names $names || return
# save files before install and repack
if [ -n "$direct" ] && [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
return
fi
# repack binary files
if [ -n "$repack" ] ; then
__epm_repack $files || return
......
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