]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - builder.sh
adapter: cleanup r= from sf urls
[packages/rpm-build-tools.git] / builder.sh
index 4e3748fc86a04a1e9c9c8bb03cc2fb2d8bd59424..90e1b93eb434620b977749088bfd6c9938664dda 100755 (executable)
@@ -463,7 +463,7 @@ tempdir() {
 }
 
 # inserts git log instead of %changelog
-# outputs name of modified file created by tempfile
+# @output directory containing modified specfile
 insert_gitlog() {
        local SPECFILE=$1 specdir=$(tempdir) gitlog=$(tempfile) speclog=$(tempfile)
 
@@ -656,7 +656,7 @@ minirpm() {
 %remove_etc_shells(p) %{p:<lua>}
 %lua_add_etc_shells()  %{nil}
 %lua_remove_etc_shells() %{nil}
-%required_jdk %{nil}
+%required_jdk jdk
 %buildrequires_jdk %{nil}
 %pear_package_print_optionalpackages %{nil}
 EOF
@@ -1828,7 +1828,7 @@ run_sub_builder() {
 # this requires following sudo rules:
 # - poldek --noask --caplookup -uG
 poldek_install() {
-       LANG=C $POLDEK_CMD --noask --caplookup -uG "$@"
+       LANG=C $POLDEK_CMD --noask --caplookup --uniq -uG "$@"
 }
 
 # install packages
@@ -1928,21 +1928,21 @@ display_branches() {
 # outputs all dependencies which current rpmdb doesn't satisfy.
 # input can be either STDIN or parameters
 _rpm_prov_check() {
-       local DEPS
+       local deps out
 
        if [ $# -gt 0 ]; then
-               DEPS="$@"
+               deps="$@"
        else
-               DEPS=$(cat)
+               deps=$(cat)
        fi
 
-       DEPS=$(LANG=C rpm -q --whatprovides $DEPS 2>&1 | awk '/^(error:|no package provides)/ { print }')
+       out=$(LC_ALL=C rpm -q --whatprovides $deps 2>&1)
 
        # packages
-       echo "$DEPS" | awk '/^no package provides/ { print $NF }'
+       echo "$out" | awk '/^no package provides/ { print $NF }'
 
        # other deps (files)
-       echo "$DEPS" | awk -F: '/^error:.*No such file/{o = $2; gsub("^ file ", "", o); print o}'
+       echo "$out" | sed -rne 's/file (.*): No such file or directory/\1/p'
 }
 
 # checks if given package/files/provides exists in rpmdb.
@@ -1974,12 +1974,12 @@ install_build_requires_rpmdeps() {
        fi
 
        if [ -n "$CNFL" ]; then
-               echo "Uninstall conflicting packages ($CNFL):"
+               echo "Uninstall conflicting packages: $CNFL"
                uninstall_packages $CNFL
        fi
 
        if [ -n "$DEPS" ]; then
-               echo "Install dependencies ($DEPS):"
+               echo "Install dependencies: $DEPS"
                install_packages $DEPS
        fi
 }
@@ -2052,6 +2052,11 @@ if [ $# = 0 ]; then
        exit 1
 fi
 
+# stuff global $BUILDER_OPTS from env as args
+if [ "$BUILDER_OPTS" ]; then
+       set -- "$BUILDER_OPTS" "$@"
+fi
+
 while [ $# -gt 0 ]; do
        case "${1}" in
                -4|-6)
@@ -2310,7 +2315,7 @@ while [ $# -gt 0 ]; do
                        ;;
                --alt_kernel)
                        shift
-                       RPMOPTS="${RPMOPTS} --define \"alt_kernel $1\""
+                       RPMOPTS="${RPMOPTS} --define \"alt_kernel $1\" --define \"build_kernels $1\""
                        shift
                        ;;
                --short-circuit)
This page took 0.035948 seconds and 4 git commands to generate.