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