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

Adam Weinberger adamw at adamw.org
Tue Jan 10 15:15:03 UTC 2017


> On 10 Jan, 2017, at 3:59, Tijl Coosemans <tijl at freebsd.org> wrote:
> 
> 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

Thanks, Tijl. Please, feel free to make the changes you recommend to all 3 gnupg ports!

# Adam


-- 
Adam Weinberger
adamw at adamw.org
https://www.adamw.org




More information about the svn-ports-all mailing list