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 ...@@ -549,7 +549,7 @@ if [ -n "$quiet" ] ; then
fi fi
# fill # 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 input is not console and run script from file, get pkgs from stdin too
if [ ! -n "$inscript" ] && ! inputisatty && [ -n "$PROGDIR" ] ; then if [ ! -n "$inscript" ] && ! inputisatty && [ -n "$PROGDIR" ] ; then
......
...@@ -326,6 +326,12 @@ epm_install_files() ...@@ -326,6 +326,12 @@ epm_install_files()
files="$repacked_pkgs" files="$repacked_pkgs"
fi fi
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
return
fi
__epm_check_if_src_rpm $files __epm_check_if_src_rpm $files
if [ -z "$repacked_pkgs" ] ; then if [ -z "$repacked_pkgs" ] ; then
...@@ -376,6 +382,12 @@ epm_install_files() ...@@ -376,6 +382,12 @@ epm_install_files()
#__epm_remove_tmp_files #__epm_remove_tmp_files
fi 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) # 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 if [ -n "$nodeps" ] ; then
...@@ -425,6 +437,12 @@ epm_install_files() ...@@ -425,6 +437,12 @@ epm_install_files()
#__epm_remove_tmp_files #__epm_remove_tmp_files
fi fi
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
return
fi
__epm_check_if_src_rpm $files __epm_check_if_src_rpm $files
sudocmd rpm -Uvh $force $noscripts $nodeps $files && return sudocmd rpm -Uvh $force $noscripts $nodeps $files && return
local RES=$? local RES=$?
...@@ -463,6 +481,14 @@ epm_install_files() ...@@ -463,6 +481,14 @@ epm_install_files()
esac esac
# check download_only before commands without repack supporting
if [ -n "$download_only" ] ; then
echo
cp -v $files "$CURDIR"
return
fi
case $PMTYPE in case $PMTYPE in
packagekit) packagekit)
docmd pkcon install-local $files docmd pkcon install-local $files
...@@ -705,6 +731,13 @@ epm_install() ...@@ -705,6 +731,13 @@ epm_install()
# FIXME: see to_remove below # FIXME: see to_remove below
epm_install_names $names || return 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 # repack binary files
if [ -n "$repack" ] ; then if [ -n "$repack" ] ; then
__epm_repack $files || return __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