Date: Tue, 10 Jan 2017 11:59:13 +0100 From: Tijl Coosemans <tijl@FreeBSD.org> To: Adam Weinberger <adamw@FreeBSD.org> Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r431051 - in head/security/gnupg20: . files Message-ID: <20170110115913.3acb4642@kalimero.tijl.coosemans.org> In-Reply-To: <201701100234.v0A2YXP8023349@repo.freebsd.org> References: <201701100234.v0A2YXP8023349@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 10 Jan 2017 02:34:33 +0000 (UTC) Adam Weinberger <adamw@FreeBSD.org> wrote: > @@ -112,4 +111,5 @@ sbin/applygnupgdefaults > %%NLS%%share/locale/uk/LC_MESSAGES/gnupg2.mo > %%NLS%%share/locale/zh_CN/LC_MESSAGES/gnupg2.mo > %%NLS%%share/locale/zh_TW/LC_MESSAGES/gnupg2.mo > -@unexec [ -L %D/bin/gpg ] && rm -f %D/bin/gpg || true > +@postexec [ -e %D/bin/gpg ] || ln -s gpg2 %D/bin/gpg When %D/bin/gpg is a symlink -e will test if the target exists so ln may be executed with %D/bin/gpg a symlink to a nonexistent file which means you should use "ln -sf" so ln can replace the dead link. > +@postunexec [ "$(readlink %D/bin/gpg)" = "gpg2" ] && rm -f %D/bin/gpg || true You can also use test -e here and also, if there's an error I think it should be reported to the user instead of being masked with true. @postunexec [ -e %D/bin/gpg ] || rm -f %D/bin/gpg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170110115913.3acb4642>