Commit 504de8c8 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm update: save all available packages after update

parent a681dc9b
...@@ -40,11 +40,22 @@ __check_for_epm_version() ...@@ -40,11 +40,22 @@ __check_for_epm_version()
[ "$res" = "-1" ] && info "Latest EPM version in Korinf repository is $latest. You have version $EPMVERSION running." && info "You can update eepm with \$ epm ei command." [ "$res" = "-1" ] && info "Latest EPM version in Korinf repository is $latest. You have version $EPMVERSION running." && info "You can update eepm with \$ epm ei command."
} }
__save_available_packages()
{
[ -d "$epm_vardir" ] || return 0
info "Retrieve all available packages (for autocompletion) ..."
load_helper epm-list_available
short=--short epm_list_available | sort | sudorun tee $epm_vardir/available-packages >/dev/null
}
epm_update() epm_update()
{ {
[ -z "$*" ] || fatal "No arguments are allowed here" [ -z "$*" ] || fatal "No arguments are allowed here"
info "Running command for update remote package repository database" info "Running command for update remote package repository database"
local ret=0
warmup_hibase warmup_hibase
case $PMTYPE in case $PMTYPE in
...@@ -52,10 +63,10 @@ case $PMTYPE in ...@@ -52,10 +63,10 @@ case $PMTYPE in
# TODO: hack against cd to cwd in apt-get on ALT # TODO: hack against cd to cwd in apt-get on ALT
cd / cd /
sudocmd apt-get update sudocmd apt-get update
local ret="$?" ret="$?"
cd - >/dev/null cd - >/dev/null
[ "$ret" = "0" ] || return
__check_for_epm_version __check_for_epm_version
return $ret
#sudocmd apt-get -f install || exit #sudocmd apt-get -f install || exit
;; ;;
apt-dpkg) apt-dpkg)
...@@ -137,4 +148,7 @@ case $PMTYPE in ...@@ -137,4 +148,7 @@ case $PMTYPE in
;; ;;
esac esac
__save_available_packages
return 0
} }
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