svn commit: r431051 - in head/security/gnupg20: . files

Tijl Coosemans tijl at FreeBSD.org
Tue Jan 10 11:00:29 UTC 2017


On Tue, 10 Jan 2017 02:34:33 +0000 (UTC) Adam Weinberger <adamw at 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
> - at unexec [ -L %D/bin/gpg ] && rm -f %D/bin/gpg || true
> + at 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.

> + at 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


More information about the svn-ports-all mailing list