]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
define specdir
authorElan Ruusamäe <glen@delfi.ee>
Sat, 9 Jan 2016 16:31:13 +0000 (18:31 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 9 Jan 2016 16:31:17 +0000 (18:31 +0200)
this solves issues that rpm tries to access every source
and it does that in wrong dir in packages like php.spec (tries php53
dir)

really rpm should check the files if only want to parse simple things
like version

similar issue in the past:
http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2015-November/024529.html

shrc.sh

diff --git a/shrc.sh b/shrc.sh
index b616a4109da1d6da31657c96460002359172bbe6..5210ecee851a2ba23db51ad6c6476ca36be37422 100755 (executable)
--- a/shrc.sh
+++ b/shrc.sh
@@ -337,6 +337,6 @@ __bash_parse_git_branch() {
 __package_rpmversion() {
        if [[ $PWD =~ $(rpm -E %_topdir) ]] && [ "$(\ls *.spec 2>/dev/null | wc -w)" = 1 ]; then
                # give only first version (ignore subpackages)
-               rpm --specfile *.spec -q --qf '%{VERSION}\n' | head -n1
+               rpm --define "_specdir $PWD" --specfile *.spec -q --qf '%{VERSION}\n' | head -n1
        fi
 }
This page took 0.04181 seconds and 4 git commands to generate.