Commit 4ac5adad authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-addrepo: fixes for URLs to ALT repos

parent 42e4b0d3
...@@ -138,7 +138,7 @@ __epm_addrepo_altlinux_url() ...@@ -138,7 +138,7 @@ __epm_addrepo_altlinux_url()
if echo "$base" | grep -q "^RPMS\." ; then if echo "$base" | grep -q "^RPMS\." ; then
REPO_NAME="$(echo $base | sed -e 's|.*\.||')" REPO_NAME="$(echo $base | sed -e 's|.*\.||')"
url="$(dirname $url)" url="$(dirname $url)"
docmd epm repo add "rpm $url $REPO_NAME" __epm_addrepo_altlinux_short rpm "$url" "$REPO_NAME"
return return
fi fi
...@@ -147,8 +147,8 @@ __epm_addrepo_altlinux_url() ...@@ -147,8 +147,8 @@ __epm_addrepo_altlinux_url()
local baseurl="$(eget --list "$url/RPMS.*")" local baseurl="$(eget --list "$url/RPMS.*")"
base="$(basename "$baseurl")" base="$(basename "$baseurl")"
if echo "$base" | grep -q "^RPMS\." ; then if echo "$base" | grep -q "^RPMS\." ; then
REPO_NAME="$(echo $base | sed -e 's|.*\.||')" REPO_NAME="$(echo "$base" | sed -e 's|.*\.||')"
docmd epm repo add "rpm $url $REPO_NAME" __epm_addrepo_altlinux_short rpm "$url" "$REPO_NAME"
return return
fi fi
...@@ -156,9 +156,9 @@ __epm_addrepo_altlinux_url() ...@@ -156,9 +156,9 @@ __epm_addrepo_altlinux_url()
local res='' local res=''
for arch in $(get_archlist) ; do for arch in $(get_archlist) ; do
local rd="$(eget --list $url/$arch/RPMS.*)" local rd="$(eget --list $url/$arch/RPMS.*)"
# TODO: fix URL support! [ -n "$rd" ] || continue
[ -d "$rd" ] || continue local REPO_NAME="$(echo "$rd" | sed -e 's|/*$||' -e 's|.*\.||')"
local REPO_NAME="$(echo "$rd" | sed -e 's|.*\.||')" [ "$REPO_NAME" = "*" ] && continue
docmd epm repo add "rpm $url $arch $REPO_NAME" docmd epm repo add "rpm $url $arch $REPO_NAME"
res='1' res='1'
done done
......
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