Commit df96b29c authored by Vitaly Lipatov's avatar Vitaly Lipatov

etersoft: replace version only in last or unstable component

parent 0f7b408d
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# return local path to publish srpm # return local path to publish srpm
get_etersoft_srpm_path() get_etersoft_srpm_path()
{ {
local SOURCE local SOURCE BSOURCE BNSOURCE
local ALPHA=$2 local ALPHA=$2
local SOURCEFTP=$(eval_spec $1 | get_var "Source") local SOURCEFTP=$(eval_spec $1 | get_var "Source")
...@@ -16,6 +16,8 @@ get_etersoft_srpm_path() ...@@ -16,6 +16,8 @@ get_etersoft_srpm_path()
fi fi
[ -n "$SOURCEFTP" ] || fatal "Can't get Source from spec" [ -n "$SOURCEFTP" ] || fatal "Can't get Source from spec"
# drop tarball name
SOURCEFTP=$(dirname "$SOURCEFTP") SOURCEFTP=$(dirname "$SOURCEFTP")
# FIXME: pass foreign path, needs to handle proto:// separately from ftp.eter:/path # FIXME: pass foreign path, needs to handle proto:// separately from ftp.eter:/path
...@@ -33,8 +35,11 @@ get_etersoft_srpm_path() ...@@ -33,8 +35,11 @@ get_etersoft_srpm_path()
# rewrite V.E.R./sources with $ALPHA/sources # rewrite V.E.R./sources with $ALPHA/sources
if [ -n "$ALPHA" ] ; then if [ -n "$ALPHA" ] ; then
SOURCE=$(dirname $SOURCE) BSOURCE=$(dirname $SOURCE)
SOURCE=$(dirname $SOURCE)/$ALPHA/sources BNSOURCE=$(basename $BSOURCE)
if [ "$BSOURCE" = "last" ] || [ "$BSOURCE" = "unstable" ] ; then
SOURCE=$(dirname $SOURCE)/$ALPHA/sources
fi
fi fi
echo $SOURCE echo $SOURCE
...@@ -46,6 +51,8 @@ set_last_link() ...@@ -46,6 +51,8 @@ set_last_link()
echo $1 | grep -q /testing/sources && return echo $1 | grep -q /testing/sources && return
# do not change last if unstable publish # do not change last if unstable publish
echo $1 | grep -q /unstable/sources && return echo $1 | grep -q /unstable/sources && return
rm -f $1/../last # do not update last link if it is not exists
ln -s $2 $1/../last # test -L "$1/../last" || return
rm -f "$1/../last"
ln -s "$2" "$1/../last"
} }
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