Commit 14292c89 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmbsh: add -w for build via gear --hasher and make src.rpm in hasher (ALT bug #31673)

parent 47c8ca02
......@@ -37,13 +37,15 @@ 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 " -w build with gear --hasher myhsh directly"
echog " -b REPONAME binary repository name (4.1, p5, t6 and so on)"
}
while getopts :hitb: opt; do
while getopts :hitwb: opt; do
case $opt in
h) phelp; exit 0;;
t) COMMIT="--commit" ;;
w) THOROUGH=1 ;;
i) INSTALLPKG=1 ;;
b) BINARYREPONAME=$OPTARG ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
......@@ -80,21 +82,20 @@ if estrlist has spec "$LISTNAMES" ; then
add_changelog_helper "- new version" $LISTNAMES
fi
# We do not not pass args for myhsh here...
# FIXME: не обрабатывает два пропускаемых вместе параметра
pack_src_rpm $COMMIT $(drop_args "$LISTRPMARGS" s u c l f a A)
# TODO: use gear --hasher directly, drop myhsh
# use later for is_gear
if rhas "$LISTNAMES" .spec ; then
set_specdir $LISTNAMES
if [ -n "$THOROUGH" ] ; then
# TODO: use gear --hasher for fix macro problem (https://bugzilla.altlinux.org/show_bug.cgi?id=31673)
docmd time gear --hasher -- $ETERBUILDBIN/myhsh $MENVARG $(drop_args "$LISTRPMARGS" f u a A) $LISTBUILT
exit
else
# We do not not pass args for myhsh here...
# FIXME: не обрабатывает два пропускаемых вместе параметра
pack_src_rpm $COMMIT $(drop_args "$LISTRPMARGS" s u c l f a A)
# build in hasher
docmd time $ETERBUILDBIN/myhsh $MENVARG $(drop_args "$LISTRPMARGS" f u a A) $LISTBUILT
RESULT=$?
fi
# build in hasher
docmd time $ETERBUILDBIN/myhsh $MENVARG $(drop_args "$LISTRPMARGS" f u a A) $LISTBUILT
RESULT=$?
# if ok and requested test install, do it
if [ "$RESULT" = "0" ] && [ -n "$INSTALLPKG" ] ; then
BINPACKAGES=$($ETERBUILDBIN/myhsh -b $LISTBUILT | estrlist reg_exclude debuginfo -) || fatal "Can't get binary packages for $LISTBUILT"
......
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