Commit e1b0e984 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: implement --put-to-repo=/path/repo support

parent 5fa5c5c1
......@@ -533,6 +533,9 @@ check_option()
--save-only) # HELPOPT: save the package/tarball after all convertations (instead of install it)
save_only="--save-only"
;;
--put-to-repo=*) # HELPOPT: put the package after all transformations to the repo (--put-to-repo=/path/to/repo)
put_to_repo="$(echo "$1" | sed -e 's|--put-to-repo=||')"
;;
--download-only) # HELPOPT: download only the package/tarball (before any convertation)
download_only="--download-only"
;;
......
......@@ -375,6 +375,12 @@ epm_install_files()
return
fi
if [ -n "$put_to_repo" ] ; then
load_helper epm-repopkg
epm_put_to_repo $files
return
fi
case $PMTYPE in
packagekit)
......
......@@ -40,6 +40,12 @@ epm_install_files_alt()
return
fi
if [ -n "$put_to_repo" ] ; then
load_helper epm-repopkg
epm_put_to_repo $files
return
fi
__epm_check_if_src_rpm $files
if [ -z "$repacked_pkgs" ] ; then
......
......@@ -38,6 +38,13 @@ epm_install_files_apt_dpkg()
return
fi
if [ -n "$put_to_repo" ] ; then
load_helper epm-repopkg
epm_put_to_repo $files
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
......
......@@ -21,7 +21,7 @@ epm_install_files_rpm()
{
local files="$*"
[ -z "$files" ] && return
if __epm_repack_if_needed $files ; then
[ -n "$repacked_pkgs" ] || fatal "Can't convert $files"
files="$repacked_pkgs"
......@@ -33,6 +33,13 @@ epm_install_files_rpm()
return
fi
if [ -n "$put_to_repo" ] ; then
load_helper epm-repopkg
epm_put_to_repo $files
return
fi
__epm_check_if_src_rpm $files
# --replacepkgs: Install the Package Even If Already Installed
......
......@@ -136,3 +136,8 @@ esac
}
# call with packages to put to $put_to_repo
epm_put_to_repo()
{
epm_repo_pkgupdate "$put_to_repo" "$@"
}
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