Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Mar 2024 09:23:53 +0000
From:      bugzilla-noreply@freebsd.org
To:        pkg@FreeBSD.org
Subject:   [Bug 277411] ports-mgmt/pkg: @postunexec command in pkg-plist isn't executed when package is upgraded with `pkg upgrade`
Message-ID:  <bug-277411-32340-vsbLoSPdQg@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-277411-32340@https.bugs.freebsd.org/bugzilla/>
References:  <bug-277411-32340@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277411

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. Current=
ly
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, a=
s 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 execute=
d.

In bug #276990, comment #3 it is proposed to keep old @postunexec command l=
ine.
But it doesn't solve the problem.

So is there any way to remove old ${PREFIX}/man/man1/gpg.1.gz with `pkg
upgrade`?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277411-32340-vsbLoSPdQg>