[packages/ca-certificates] fix %pretrans on first install; rel 3

atler atler at pld-linux.org
Tue Nov 2 01:33:19 CET 2021


commit 503bab60a0a55246c82f141f951f440629622af7
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Nov 2 01:30:54 2021 +0100

    fix %pretrans on first install; rel 3
    
    if /etc/ssl/certs does not exist yet stat() returns nil:
    
    error: lua script failed: [string "%pretrans(ca-certificates-20211016-2.noarch)"]:2: attempt to index a nil value (local 'mode')

 ca-certificates.spec | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/ca-certificates.spec b/ca-certificates.spec
index 49e1f6f..4233376 100644
--- a/ca-certificates.spec
+++ b/ca-certificates.spec
@@ -13,7 +13,7 @@ Summary(pl.UTF-8):	Pliki PEM popularnych certyfikatów CA
 Name:		ca-certificates
 %define	ver_date	20211016
 Version:	%{ver_date}
-Release:	2
+Release:	3
 License:	GPL v2 (scripts), MPL v2 (mozilla certs), distributable (other certs)
 Group:		Base
 Source0:	http://ftp.debian.org/debian/pool/main/c/ca-certificates/%{name}_%{version}.tar.xz
@@ -248,7 +248,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %pretrans -p <lua>
 local mode = posix.stat("/etc/ssl/certs")
-if mode["type"] == "link" then
+if mode and mode["type"] == "link" then
 	posix.unlink("/etc/ssl/certs")
 end
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ca-certificates.git/commitdiff/503bab60a0a55246c82f141f951f440629622af7



More information about the pld-cvs-commit mailing list