[packages/rpm-build-tools] - globals - match also non -devel BRs

witekfl witekfl at pld-linux.org
Fri May 23 13:34:43 CEST 2014


commit fdc410000cd68ffe7e485241bfcdb4a19361372b
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date:   Fri May 23 13:32:45 2014 +0200

    - globals
    - match also non -devel BRs

 sort-pkgs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/sort-pkgs b/sort-pkgs
index acd5bdd..2d00aef 100755
--- a/sort-pkgs
+++ b/sort-pkgs
@@ -12,13 +12,14 @@ import os
 import re
 import sys
 
-PATTERN = re.compile('BuildRequires:\t(.*)-devel')
+PATTERN = re.compile('BuildRequires:\s+(.*?)(\s|$|-devel)')
 DIR = '/home/users/builder/rpm/packages'
 
 packages = {}
 packages_res = {}
 
 def build_requires(name):
+	global packages
 	res = []
 	with open(os.path.join(DIR, name, name + '.spec'), 'r') as f:
 		for line in f:
@@ -30,6 +31,7 @@ def build_requires(name):
 	return res
 
 def print_packages(p):
+	global packages, packages_res
 	if packages_res[p] == 1:
 		return
 	for pp in packages[p]:
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list