]> git.pld-linux.org Git - packages/ca-certificates.git/commitdiff
fix %pretrans on first install; rel 3 auto/th/ca-certificates-20211016-3
authorJan Palus <atler@pld-linux.org>
Tue, 2 Nov 2021 00:30:54 +0000 (01:30 +0100)
committerJan Palus <atler@pld-linux.org>
Tue, 2 Nov 2021 00:30:54 +0000 (01:30 +0100)
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

index 49e1f6f0d2369f828ecca9da822b4e7cb7611fd8..4233376e34b56c3bf3ee7a96be4f1c25e79902c4 100644 (file)
@@ -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
 
This page took 0.116225 seconds and 4 git commands to generate.