[packages/rpm-build-tools] define specdir
    glen 
    glen at pld-linux.org
       
    Sat Jan  9 18:09:49 CET 2016
    
    
  
commit c5a35a62d874cfcaaef3623ec2a2339835a56cd3
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Jan 9 18:31:13 2016 +0200
    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
 }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/e362a27a47948e29e94b17e6bbed3e91dff7a20c
    
    
More information about the pld-cvs-commit
mailing list