Commit cd36d7f7 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm addrepo: refactoring

parent de2a9942
...@@ -19,17 +19,15 @@ ...@@ -19,17 +19,15 @@
load_helper epm-sh-altlinux load_helper epm-sh-altlinux
epm_addrepo() __epm_addrepo_altlinux()
{ {
local repo="$(eval echo "$quoted_args")" local repo="$@"
case "$1" in
case $DISTRNAME in
ALTLinux)
case "$repo" in
etersoft) etersoft)
info "add Etersoft's addon repo" info "add Etersoft's addon repo"
load_helper epm-query load_helper epm-query
epm install --skip-installed apt-conf-etersoft-common apt-conf-etersoft-hold || fatal epm install --skip-installed apt-conf-etersoft-common apt-conf-etersoft-hold
# TODO: ignore only error code 22 (skipped) || fatal
local branch="$DISTRVERSION/branch" local branch="$DISTRVERSION/branch"
[ "$DISTRVERSION" = "Sisyphus" ] && branch="$DISTRVERSION" [ "$DISTRVERSION" = "Sisyphus" ] && branch="$DISTRVERSION"
# FIXME # FIXME
...@@ -50,6 +48,9 @@ case $DISTRNAME in ...@@ -50,6 +48,9 @@ case $DISTRNAME in
autoimports) autoimports)
[ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION" [ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION"
repo="$repo.$(echo "$DISTRVERSION" | tr "[:upper:]" "[:lower:]")" repo="$repo.$(echo "$DISTRVERSION" | tr "[:upper:]" "[:lower:]")"
;;
archive)
;;
esac esac
assure_exists apt-repo assure_exists apt-repo
...@@ -67,14 +68,22 @@ case $DISTRNAME in ...@@ -67,14 +68,22 @@ case $DISTRNAME in
sudocmd apt-repo add "$repo" sudocmd apt-repo add "$repo"
}
epm_addrepo()
{
local repo="$(eval echo "$quoted_args")"
case $DISTRNAME in
ALTLinux)
__epm_addrepo_altlinux $repo
return return
;; ;;
esac esac
case $PMTYPE in case $PMTYPE in
apt-dpkg|aptitude-dpkg) apt-dpkg|aptitude-dpkg)
info "You need manually add repo to /etc/apt/sources.list" info "You need manually add repo to /etc/apt/sources.list (TODO)"
;; ;;
yum-rpm) yum-rpm)
assure_exists yum-utils assure_exists yum-utils
......
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