Commit 71f6ec13 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmgp: fix for get via public url

parent a315e553
...@@ -195,11 +195,12 @@ phelp() ...@@ -195,11 +195,12 @@ phelp()
echog " -i install packages needed for build (use epm)" echog " -i install packages needed for build (use epm)"
echog " -l list packages needed for build (in local pkg system notation) (experimental)" echog " -l list packages needed for build (in local pkg system notation) (experimental)"
echog " -r refresh package list (download it again)" echog " -r refresh package list (download it again)"
echog " -p force use public access to the git repo"
echog " -s list all known remote repositories" echog " -s list all known remote repositories"
exit 0 exit 0
} }
while getopts :hab:icdglmprs opt; do while getopts :hab:icdglmpprs opt; do
case $opt in case $opt in
h) phelp; exit 0;; h) phelp; exit 0;;
a) ALLSYSTEM=1 ;; a) ALLSYSTEM=1 ;;
...@@ -294,10 +295,12 @@ git_clone() ...@@ -294,10 +295,12 @@ git_clone()
{ {
local RREPO="$1" local RREPO="$1"
# Test if ssh access is available # Test if ssh access is available
if [ -z "$PUBLICACCESS" ] && giter check girar access ; then if [ -z "$PUBLICACCESS" ] && giter $GITHOST check girar access ; then
docmd git clone $GIRARHOST:$RREPO docmd git clone $GIRARHOST:$RREPO
else else
docmd git clone $GIRARURL/$RREPO local GIRARURL=$(get_git_url $GITHOST)
[ -n "$GIRARURL" ] || fatal "Can't get public URL for $GIRHOST"
docmd git clone $GIRARURL$RREPO.git
fi fi
} }
...@@ -345,7 +348,7 @@ if [ -n "$CLONEGIT" ] ; then ...@@ -345,7 +348,7 @@ if [ -n "$CLONEGIT" ] ; then
fi fi
echo "See other repos at $GIRARHOST:" echo "See other repos at $GIRARHOST:"
giter list packages $PKGNAME giter $GITHOST list packages $PKGNAME
exit $? exit $?
fi fi
...@@ -399,7 +402,9 @@ if [ -n "$CHECKONLINE" ] ; then ...@@ -399,7 +402,9 @@ if [ -n "$CHECKONLINE" ] ; then
if [ -n "$GIRAR_USER" ] ; then if [ -n "$GIRAR_USER" ] ; then
# FIXME: we have a function to get correct url # FIXME: we have a function to get correct url
GITURL="$GIRARURL/people/$GIRAR_USER/packages/$PKGNAME.git" local GIRARURL=$(get_git_url $GITHOST)
[ -n "$GIRARURL" ] || fatal "Can't get public URL for $GIRHOST"
GITURL="${GIRARURL}people/$GIRAR_USER/packages/$PKGNAME.git"
if $GET -d $GITURL ; then if $GET -d $GITURL ; then
echog "Published at $GITURL by $GIRAR_USER" echog "Published at $GITURL by $GIRAR_USER"
else else
...@@ -407,7 +412,7 @@ if [ -n "$CHECKONLINE" ] ; then ...@@ -407,7 +412,7 @@ if [ -n "$CHECKONLINE" ] ; then
fi fi
fi fi
echo "Get repositories at $GIRARHOST:" echo "Get repositories at $GIRARHOST:"
giter list packages $PKGNAME giter $GITHOST list packages $PKGNAME
set_binaryrepo $MENV set_binaryrepo $MENV
......
...@@ -62,7 +62,6 @@ MENV=SS ...@@ -62,7 +62,6 @@ MENV=SS
#SSH_KEYFILE=~/.ssh/id_dsa #SSH_KEYFILE=~/.ssh/id_dsa
GIRARHOST=git.alt GIRARHOST=git.alt
GIRARURL="http://git.altlinux.org"
# Timeout in sec for ssh commands # Timeout in sec for ssh commands
SSHTIMEOUT=300 SSHTIMEOUT=300
......
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