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