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