From c5a35a62d874cfcaaef3623ec2a2339835a56cd3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 9 Jan 2016 18:31:13 +0200 Subject: [PATCH] define specdir 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shrc.sh b/shrc.sh index b616a41..5210ece 100755 --- 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 } -- 2.44.0