Commit c3ffc040 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm update: add --content-index for debug purposes

parent 722b6b37
...@@ -63,9 +63,12 @@ esac ...@@ -63,9 +63,12 @@ esac
case $PMTYPE in case $PMTYPE in
apt-dpkg|aptitude-dpkg) apt-dpkg|aptitude-dpkg)
# move to update? if ! is_command apt-file ; then
assure_exists apt-file assure_exists apt-file
sudocmd apt-file update sudocmd apt-file update
else
update_repo_if_needed
fi
docmd apt-file search $pkg_filenames docmd apt-file search $pkg_filenames
return ;; return ;;
packagekit) packagekit)
......
...@@ -55,14 +55,23 @@ __save_available_packages() ...@@ -55,14 +55,23 @@ __save_available_packages()
epm_update() epm_update()
{ {
local content_index
[ "$1" = "--content-index" ] && content_index=1 && shift
[ -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 update the package index files from remote package repository database ..."
local ret=0 local ret=0
warmup_hibase warmup_hibase
case $BASEDISTRNAME in case $BASEDISTRNAME in
"alt") "alt")
if [ -n "$content_index" ] ; then
load_helper epm-sh-altlinux-contents-index
update_alt_contents_index
return
fi
# 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
...@@ -70,7 +79,6 @@ case $BASEDISTRNAME in ...@@ -70,7 +79,6 @@ case $BASEDISTRNAME in
cd - >/dev/null cd - >/dev/null
[ "$ret" = "0" ] || return [ "$ret" = "0" ] || return
__check_for_epm_version __check_for_epm_version
#sudocmd apt-get -f install || exit
__epm_touch_pkg __epm_touch_pkg
...@@ -94,9 +102,13 @@ case $PMTYPE in ...@@ -94,9 +102,13 @@ case $PMTYPE in
[ "$ret" = "0" ] || return [ "$ret" = "0" ] || return
;; ;;
apt-dpkg) apt-dpkg)
if [ -n "$content_index" ] ; then
sudocmd apt-file update
return
fi
sudocmd apt-get update || return sudocmd apt-get update || return
#sudocmd apt-get -f install || exit # apt-get update retrieve Contents file too
#sudocmd apt-get autoremove #sudocmd apt-file update
;; ;;
packagekit) packagekit)
docmd pkcon refresh docmd pkcon refresh
......
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