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