Commit a18c5ff9 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.58.3

parent e3d7f9af
...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR ...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install # will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc CONFIGDIR=$PROGDIR/../etc
EPMVERSION="3.58.2" EPMVERSION="3.58.3"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -11698,12 +11698,20 @@ get_local_alt_mirror_path() ...@@ -11698,12 +11698,20 @@ get_local_alt_mirror_path()
ALT_CONTENTS_INDEX_LIST=$epm_cachedir/contents_index/contents_index_list ALT_CONTENTS_INDEX_LIST=$epm_cachedir/contents_index/contents_index_list
__rsync_check()
{
a= rsync -n "$1" >/dev/null 2>/dev/null
}
rsync_alt_contents_index() rsync_alt_contents_index()
{ {
local URL="$1" local URL="$1"
local TD="$2" local TD="$2"
local res local res
assure_exists rsync assure_exists rsync
__rsync_check "$URL" || return
mkdir -p "$(dirname "$TD")" mkdir -p "$(dirname "$TD")"
if [ -z "$quiet" ] ; then if [ -z "$quiet" ] ; then
docmd rsync --partial --inplace $3 -a --progress "$URL" "$TD" docmd rsync --partial --inplace $3 -a --progress "$URL" "$TD"
...@@ -11726,7 +11734,7 @@ get_url_to_etersoft_mirror() ...@@ -11726,7 +11734,7 @@ get_url_to_etersoft_mirror()
__add_to_contents_index_list() __add_to_contents_index_list()
{ {
[ -n "$quiet" ] || echo " $1 -> $2" [ -n "$verbose" ] && echo " $1 -> $2"
echo "$2" >>$ALT_CONTENTS_INDEX_LIST echo "$2" >>$ALT_CONTENTS_INDEX_LIST
} }
...@@ -12613,11 +12621,25 @@ __save_available_packages() ...@@ -12613,11 +12621,25 @@ __save_available_packages()
short=--short epm_list_available | sort | sudorun tee $epm_vardir/available-packages >/dev/null short=--short epm_list_available | sort | sudorun tee $epm_vardir/available-packages >/dev/null
} }
__epm_update_content_index()
{
case $BASEDISTRNAME in
"alt")
update_alt_contents_index
return
;;
esac
epm_update() case $PMTYPE in
apt-dpkg)
sudocmd apt-file update
;;
esac
}
__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"
...@@ -12628,24 +12650,11 @@ warmup_hibase ...@@ -12628,24 +12650,11 @@ warmup_hibase
case $BASEDISTRNAME in case $BASEDISTRNAME in
"alt") "alt")
if [ -n "$content_index" ] ; then
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
ret="$?" ret="$?"
cd - >/dev/null cd - >/dev/null
[ "$ret" = "0" ] || return
__check_for_epm_version
__epm_touch_pkg
__save_available_packages
update_alt_contents_index
return $ret return $ret
;; ;;
esac esac
...@@ -12658,13 +12667,9 @@ case $PMTYPE in ...@@ -12658,13 +12667,9 @@ case $PMTYPE in
sudocmd apt-get update sudocmd apt-get update
ret="$?" ret="$?"
cd - >/dev/null cd - >/dev/null
[ "$ret" = "0" ] || return return $ret
;; ;;
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
# apt-get update retrieve Contents file too # apt-get update retrieve Contents file too
#sudocmd apt-file update #sudocmd apt-file update
...@@ -12742,12 +12747,25 @@ case $PMTYPE in ...@@ -12742,12 +12747,25 @@ case $PMTYPE in
fatal "Have no suitable update command for $PMTYPE" fatal "Have no suitable update command for $PMTYPE"
;; ;;
esac esac
}
epm_update()
{
if [ "$1" = "--content-index" ] ; then
__epm_update_content_index
return
fi
__epm_update "$@" || return
__epm_touch_pkg __epm_touch_pkg
__save_available_packages __save_available_packages
return 0
__epm_update_content_index
return 0
} }
# File bin/epm-upgrade: # File bin/epm-upgrade:
...@@ -12779,7 +12797,8 @@ epm_upgrade() ...@@ -12779,7 +12797,8 @@ epm_upgrade()
try_change_alt_repo try_change_alt_repo
epm_addrepo "$@" epm_addrepo "$@"
(pkg_names="$installlist" epm_Install) || fatal "Can't update repo" __epm_update
(pkg_names="$installlist" epm_install) || fatal "Can't update repo"
epm_removerepo "$@" epm_removerepo "$@"
end_change_alt_repo end_change_alt_repo
......
...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR ...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install # will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc CONFIGDIR=$PROGDIR/../etc
EPMVERSION="3.58.2" EPMVERSION="3.58.3"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
......
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