commit d6a296398149eb8ad4051ba452cd766c3183c81d
Author: Elan Ruusamäe <[email protected]>
Date:   Sun Oct 28 13:52:55 2012 +0200

    add support for sending rpm --define to builders

 make-request.sh | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/make-request.sh b/make-request.sh
index 7251406..830d13a 100755
--- a/make-request.sh
+++ b/make-request.sh
@@ -61,6 +61,7 @@ fi
 specs=
 df_fetch=no
 upgrade_macros=no
+cr=$(printf "\r")
 
 # Set colors
 c_star=$(tput setaf 2)
@@ -219,6 +220,8 @@ Mandatory arguments to long options are mandatory for short 
options too.
             set alt_kernel to VALUE
       --target VALUE
             set --target to VALUE
+      -D "NAME VALUE"|--define "NAME VALUE"
+            define macro named NAME with value VALUE
       -s BUILD_ID, --skip BUILD_ID[,BUILD_ID][,BUILD_ID]
             mark build ids on src builder to be skipped
       --branch VALUE
@@ -345,6 +348,13 @@ while [ $# -gt 0 ]; do
                        shift
                        ;;
 
+               -D|--define)
+                       value=${2#* }
+                       name=${2%% *}
+                       define="$define$cr$name=$value"
+                       shift
+                       ;;
+
                -s|--skip)
                        skip="$2"
                        shift
@@ -685,7 +695,7 @@ gen_req() {
 
        # job to depend on
        local depend=
-       local b i=1
+       local b i=1 val
        local name branch builders_xml
 
        for b in $builders; do
@@ -729,6 +739,16 @@ gen_req() {
                echo "           <branch>$branch</branch>"
                echo "           ${kernel:+<kernel>$kernel</kernel>}"
                echo "           ${target:+<target>$target</target>}"
+
+               oIFS=$IFS; IFS=$cr
+               for b in $define; do
+                       [ -z "$b" ] && continue
+                       value=${b#*=}
+                       b=${b%%=*}
+                       echo "           <define name='$(hsc $b)'>$(hsc 
"$value")</define>"
+               done
+               IFS=$oIFS
+
                echo "           <info></info>"
                echo
                for b in $with; do
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/cca6584b96e6c33d0732d559e43e100d804e2ecd

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to