[Bug 277411] ports-mgmt/pkg: @postunexec command in pkg-plist isn't executed when package is upgraded with `pkg upgrade`
Date: Fri, 01 Mar 2024 09:23:53 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277411
Yasuhiro Kimura <yasu@freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|New |Open
--- Comment #2 from Yasuhiro Kimura <yasu@freebsd.org> ---
(In reply to Baptiste Daroussin from comment #1)
Thanks for quick reply.
I found the problem(?) while testing attached patch of bug #276990. Currently
security/gnupg/pkg-plist includes following lines.
----------------------------------------------------------------------
@postexec [ -e %D/man/man1/gpg.1.gz ] || ln -sf gpg2.1.gz %D/man/man1/gpg.1.gz
@postunexec [ -e %D/man/man1/gpg.1.gz ] || rm -f %D/man/man1/gpg.1.gz
----------------------------------------------------------------------
The intention of them is to make manpage of gpg2(1) also accessible as gpg(1)
when security/gpg1 isn't installed. And when manpages of the port were move to
share/man these lines shold also have been adjusted. But they didn't and, as a
result, ${PREFIX}/man/man1/gpg.1.gz is stale symlink now.
So the patch of bug #276990 changes above lines as following.
----------------------------------------------------------------------
@postexec [ -e %D/share/man/man1/gpg.1.gz ] || ln -sf gpg2.1.gz
%D/share/man/man1/gpg.1.gz
@postunexec [ -e %D/share/man/man1/gpg.1.gz ] || rm -f
%D/share/man/man1/gpg.1.gz
----------------------------------------------------------------------
But ${PREFIX}/man/man1/gpg.1.gz isn't removed after the package is upgraded
with `pkg upgrade` because @postunexec command of old version isn't executed.
In bug #276990, comment #3 it is proposed to keep old @postunexec command line.
But it doesn't solve the problem.
So is there any way to remove old ${PREFIX}/man/man1/gpg.1.gz with `pkg
upgrade`?
--
You are receiving this mail because:
You are the assignee for the bug.