]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
- close only if f is valid auto/th/rpm-build-macros-1.668-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 6 Jul 2013 19:38:36 +0000 (21:38 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 6 Jul 2013 19:38:36 +0000 (21:38 +0200)
rpm-build-macros.spec
rpm.macros

index 5faf7228f169b94d5f2cc21642dd1552187f5b1c..bfb1d2f49a590654c49d50fc7adc7bdaaebc688c 100644 (file)
@@ -5,7 +5,7 @@
 %if "%{pld_release}" == "ac"
 %define        with_rpm4       1
 %endif
-%define                rpm_macros_rev  1.667
+%define                rpm_macros_rev  1.668
 %define                find_lang_rev   1.36
 Summary:       PLD Linux RPM build macros
 Summary(pl.UTF-8):     Makra do budowania pakietów RPM dla Linuksa PLD
index d4a3fd4eeeef222a1776c8359815b475e618306f..8064a617355b118a39bcc11c77b7b1344ce49091 100644 (file)
@@ -1608,8 +1608,8 @@ fi \
 f = io.open("%{_docdir}/%{name}-%{version}/optional-packages.txt", "r") \
 if f then \
        for l in f:lines() do print(l); end \
+       f.close() \
 end \
-f:close() \
 %{nil}
 
 
@@ -1989,7 +1989,11 @@ s=""\
 for _, l in pairs(t) do\
        s=s..l.."\\n"\
 end\
-f = io.open("/etc/shells", "w"); f:write(s); f:close()\
+f = io.open("/etc/shells", "w")\
+if f then\
+       write(s)\
+       f:close()\
+end\
 %{nil}
 
 # Backwards compat. Use of %lua_ prefixed macros is preferred as these are cleaner to read.
This page took 0.056616 seconds and 4 git commands to generate.