]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- ignore if/endif in desc
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 11 Feb 2007 20:40:29 +0000 (20:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    spec_utf8 -> 1.13

spec_utf8

index b3c38122945a8b862161b3bc7a119ec0b775493c..149a39cddc5b6c392076a465727a0bae5eba831e 100644 (file)
--- a/spec_utf8
+++ b/spec_utf8
@@ -62,6 +62,7 @@ def parse_spec(infile, outfile):
   re_utf = re.compile("^utf-8$", re.I)
   re_desc = re.compile("^(%description.*\s)-l\s+([\S]+)($|\s.*$)")
   re_proc = re.compile("^%[^{]")
+  re_ignore_proc = re.compile("^%(if|endif)")
   re_changelog = re.compile("^%changelog")
   in_desc = False
   in_changelog = False
@@ -82,7 +83,7 @@ def parse_spec(infile, outfile):
         in_desc = True
         outline = "%s-l %s.UTF-8%s\n" % (r.group(1), pure_lang, r.group(3))
     elif in_desc:
-      if re_proc.search(l):
+      if re_proc.search(l) and not re_ignore_proc.search(l):
         in_desc = False
       else:
         # %description continues
This page took 0.033322 seconds and 4 git commands to generate.