[packages/rpm-build-macros] - more checking

arekm arekm at pld-linux.org
Sat Jul 6 21:44:38 CEST 2013


commit b7e89f706a4992d2b1eeeac413a8fa54acea6847
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Jul 6 21:44:34 2013 +0200

    - more checking

 rpm-build-macros.spec | 2 +-
 rpm.macros            | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec
index bfb1d2f..4621da6 100644
--- a/rpm-build-macros.spec
+++ b/rpm-build-macros.spec
@@ -5,7 +5,7 @@
 %if "%{pld_release}" == "ac"
 %define	with_rpm4	1
 %endif
-%define		rpm_macros_rev	1.668
+%define		rpm_macros_rev	1.669
 %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
diff --git a/rpm.macros b/rpm.macros
index 8064a61..843f44b 100644
--- a/rpm.macros
+++ b/rpm.macros
@@ -1608,7 +1608,7 @@ 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() \
+	f:close() \
 end \
 %{nil}
 
@@ -1969,7 +1969,10 @@ end\
 for _, s in ipairs({%{expand:%%__lua_split %*}}) do\
 	if not t[s] then\
 		print("Adding "..s.." to /etc/shells")\
-		f = io.open("/etc/shells", "a"); f:write(s.."\\n"); f:close()\
+		f = io.open("/etc/shells", "a")
+		if f then\
+			f:write(s.."\\n")\
+			f:close()\
 	end\
 end\
 %{nil}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-macros.git/commitdiff/b7e89f706a4992d2b1eeeac413a8fa54acea6847



More information about the pld-cvs-commit mailing list