Commit e6be9bc3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

detect MENV by current ALT Linux version, fix transfer target repo from rpmbp to rpmbsh

parent 129fb836
......@@ -75,6 +75,7 @@ LISTRPMARGS=$@
parse_cmd_pre "$@" --
mygetopts $LISTARGS
# see functions/alt:set_binaryrepo() for BINARYREPONAME
set_binaryrepo $MENV
......
......@@ -158,8 +158,6 @@ if [ "$PKGVENDOR" = "alt" ] && is_gear $SPECDIR ; then
exit $?
fi
unset MENV MENVARG
# handle src.rpm and spec both, LISTBUILT - result with full paths to src.rpms
pack_src_rpm $LISTNAMES
......@@ -179,7 +177,7 @@ for i in $LISTBUILT ; do
test -f "$SPECNAME" || fatal "Spec $SPECNAME is not found"
docmd $ETERBUILDBIN/rpmbps -b $BINARYREPO $SPECNAME
docmd $BUILDCOMMAND $LISTRPMARGS $UPLOADARG $SPECNAME || fatal "Can't build"
docmd $BUILDCOMMAND -b $BINARYREPO $LISTRPMARGS $UPLOADARG $SPECNAME || fatal "Can't build"
uni_rpmrm $SPECNAME || true
done
......
......@@ -37,12 +37,14 @@ phelp()
echog " -s sign (and move to dir ETERDESTSRPM if defined) after build"
echog " -t make temporary commit before build (rpmbb like behavior)"
echog " -l lazy cleanup (clean before build, not after)"
echog " -b REPONAME binary repository name (4.1, p5, t6 and so on)"
}
while getopts :ht opt; do
while getopts :htb: opt; do
case $opt in
h) phelp; exit 0;;
t) COMMIT="--commit" ;;
b) BINARYREPONAME=$OPTARG ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break;
......
......@@ -163,7 +163,6 @@ gear_update_from_tarball()
fatal "can't import tarball '$TARBALL'"
}
parse_cmd_pre_spec "$@"
mygetopts $LISTARGS
......
......@@ -59,12 +59,9 @@ get_type_by_current_branch()
# set BYNARYREPO var by MENV in arg (M70)
set_binaryrepo()
{
BINARYREPO="sisyphus"
if [ -n "$BINARYREPONAME" ] ; then
BINARYREPO="$BINARYREPONAME"
MENV="$(get_altdistr_mod $BINARYREPO)"
MENVARG="-$MENV"
# fill with updated $MENV
detect_target_env
return
......@@ -74,8 +71,8 @@ set_binaryrepo()
BINARYREPO=$(get_altdistr_version $MENV)
fi
# override by the function arg
test -z "$1" && return
BINARYREPO="`get_altdistr_version $1`"
return 0
......
......@@ -356,6 +356,7 @@ set_target_pkg_env()
PKGFORMAT=$($DISTRVENDOR -p "$DISTRNAME")
PKGVENDOR=$($DISTRVENDOR -s "$DISTRNAME")
RPMVENDOR=$($DISTRVENDOR -n "$DISTRNAME")
[ -n "$MENV" ] || MENV="$(get_altdistr_mod "$DISTRVERSION")"
}
# We believe that follow vars correctly in any way:
......
......@@ -55,10 +55,6 @@ EXAMPLEALTDISTRVERSION="p7"
# FIXME: obsoleted
CURRENTBRANCHNAME="M70"
# Build for Sisyphus by default
# TODO: REMOVE IT
MENV=SS
[ -n "$DEBUG" ] && HASHERARG="-v $HASHERARG"
#SSH_KEYFILE=~/.ssh/id_dsa
......
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