Commit 0c8bafc3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

introduce get_default_txtrelease instead RELEASEPREFIX from config

parent 3c8de5d5
......@@ -98,12 +98,15 @@ get_altdistr_mod()
# Проверяем, соответствует ли релиз пакетов указанному в MENV
pkg_release_check()
{
local STREL=$RELEASEPREFIX
# assert MENV
local STREL=$(get_default_txtrelease)
local STRELDEF=alt
# FIXME: do we need it?
[ -z "$KORINFTARGETRELEASE" ] || STREL=$KORINFTARGETRELEASE
if [ "$MENV" = "SS" ] || [ "$MENV" = "DD" ] ; then
for i in $@ ; do
if [ -z "${i/*$STREL[0-9].M[0-9][0-9]*/}" ] ; then
if [ -z "${i/*$STREL[0-9].M[0-9][0-9]*/}" ] && [ -z "${i/*$STRELDEF[0-9].M[0-9][0-9]*/}" ] ; then
# Значит не тот релиз
fatal "Incorrect release in $i package: was prepared for Sisyphus"
fi
......@@ -111,9 +114,9 @@ pkg_release_check()
return
fi
for i in $@ ; do
if [ -n "${i/*$STREL[0-9].$MENV*/}" ] ; then
if [ -n "${i/*$STREL[0-9].$MENV*/}" ] && [ -n "${i/*$STRELDEF[0-9].$MENV*/}" ] ; then
# Значит не тот релиз
fatal "Incorrect release in $i package: was prepared for $MENV"
fatal "Incorrect release in $i package: was prepared for $MENV (wait for $STREL[0-9].$MENV)"
fi
done
}
......
......@@ -58,7 +58,6 @@ MENV=SS
[ -n "$DEBUG" ] && HASHERARG="-v $HASHERARG"
#SSH_KEYFILE=~/.ssh/id_dsa
RELEASEPREFIX=alt
GIRARHOST=git.alt
GIRARURL="http://git.altlinux.org"
......
......@@ -59,10 +59,16 @@ get_numrelease()
get_release "$1" | sed -e "s|\([a-zA-Z]*\)\([0-9\.]\)[^0-9\.]*|\2|" || echo "0"
}
get_default_txtrelease()
{
# assert GIRARHOST
echo ${GIRARHOST/git./}
}
# get alt from alt11
get_txtrelease()
{
get_release "$1" | sed -e "s|\([a-zA-Z]*\)\([0-9\.]\).*|\1|" || echo "$RELEASEPREFIX"
get_release "$1" | sed -e "s|\([a-zA-Z]*\)\([0-9\.]\).*|\1|" || get_default_txtrelease
}
set_var()
......@@ -73,7 +79,7 @@ set_var()
set_release()
{
local RELEASE=$2
[ -n "$RELEASE" ] || RELEASE="${RELEASEPREFIX}1"
[ -n "$RELEASE" ] || RELEASE="$(get_default_txtrelease)1"
set_var $1 Release $RELEASE
}
......
......@@ -80,6 +80,15 @@ check get_numpartrelease 3 `get_numpartrelease $TESTREL`
TESTREL=eter26.svn724archlinux
check get_numpartrelease 26 `get_numpartrelease $TESTREL`
GIRARHOST=git.alt
check get_default_txtrelease alt `get_default_txtrelease`
GIRARHOST=git.eter
check get_default_txtrelease eter `get_default_txtrelease`
GIRARHOST=giteter
check get_default_txtrelease eter `get_default_txtrelease`
BASERELEASE=27.5
get_mn_fromspec
check MAJOR 27 $MAJOR
......
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