Permalink
Browse files

substitution fix

  • Loading branch information...
1 parent b2def64 commit 55399124c0dbbd64a7518732e3df472e7fcd32d5 @goldmann goldmann committed Mar 17, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/cantiere/rpm.rb
View
5 lib/cantiere/rpm.rb
@@ -88,11 +88,12 @@ def handle_requirement(rpm_file, requirement)
end
def substitute_defined_data(str, version=nil, release=nil)
+
substitutes = {}
File.open( @spec_file).each_line do |line|
- match = line.match(/^%define (.*) (.*)$/)
- substitutes[match[1].strip] = match[2].strip if match
+ match = line.match(/^%define (\w+) (.*)$/)
+ substitutes[match[1].strip] = match[2].strip if match
end
s = str.dup

0 comments on commit 5539912

Please sign in to comment.