Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Feb 2012 09:34:22 -0500 (EST)
From:      "Mikhail T." <mi@aldan.algebra.com>
To:        gecko@FreeBSD.org
Subject:   ca_root_nss fails to install if /etc/ssl/cert.pem alredy exists
Message-ID:  <201202261434.q1QEYMbN006147@narawntapu.narawntapu>

next in thread | raw e-mail | index | archive | help
Hello!

The simple patch below fixes the scenario, when one is updating
the port -- and it fails to finish installing, because the sym-
-link already exists:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/security/ca_root_nss/Makefile,v
retrieving revision 1.18
diff -U 2 -r1.18 Makefile
--- Makefile	20 Feb 2012 21:41:44 -0000	1.18
+++ Makefile	26 Feb 2012 14:32:53 -0000
@@ -64,5 +64,6 @@
 	${INSTALL_DATA} ${WRKDIR}/ca-root-nss.crt ${PREFIX}/${CERTDIR}
 .if !defined(WITHOUT_ETCSYMLINK)
-	${LN} -s ${PREFIX}/${CERTDIR}/ca-root-nss.crt /etc/ssl/cert.pem
+	${TEST} -e /etc/ssl/cert.pem &&	\
+		${LN} -s ${PREFIX}/${CERTDIR}/ca-root-nss.crt /etc/ssl/cert.pem
 .endif
 

One could also use the `-f' option with LN, but I'm not sure, that's a
good idea... Yours,

	-mi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202261434.q1QEYMbN006147>