From nobody Fri Mar 1 08:39:15 2024 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmM2W4Vvrz5CCFZ for ; Fri, 1 Mar 2024 08:39:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TmM2W1Ff9z4sWv for ; Fri, 1 Mar 2024 08:39:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709282355; a=rsa-sha256; cv=none; b=ajZ2X0kWlFDJUE2S71lrdRKcFNBHGD7wUarOH0mcQUmrTNQPDlc4L13orywqsfsPJqxvBX 4/msBto8kWvKFO6NDfEDapNaXonXcCzDm5UfS2eL5G//60njDyxKkp088nsP9NH1ktg18Z WAu1ZR6HVpATozn3hlZ/I83ydBRW7hYd3Wgem/RDg2mncCipn+9FVMuTWe340Ph1t0Odym omtYfNlo0NmrmxQLSdgAfrtB7SsrzlUPO+BrOWd46wkh1fG0GQB+M4OPHiqR5TuxUSP6U/ RSZcn6+i61TpFqPtbzSB2UBKNv8Z6sKPYAe1dHzde2PhHZDgrtyJE5apJUMn7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709282355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vda17kFdrnvrVIKvvgC1i+/u1SRzKVYgNav5OtuIO3E=; b=nvU4EEE8sqKkCZLwRXUMyT1niTw10CeftjCcSMqyUrf73S8/kCRlVoHWAKz1qmRzF/+cHY Vx2mFFjonJ/w/810yfQnto6syKZxVen/byIx2hdRHDAVE0uE8XXQFvZr9GLf2FoNJyP9TG c7S0JWJlD9PTN2UEdazmW17h0XdkFVAveQky84tqQhzXtykbkxxlSlqvhP5OcOrMXbnqUO CvPAFDubpYapkkqLTsgY1hmcYP+7yvznx66bX7/bec5CpXDyyjhm3U4g3uyJtpYLy6+oWS B8DSkyIwdLH8cVbR6EU55BVaTAzB4M7kL9RtwQVagB7oZZdmp5JyKlL1U3QE3A== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmM2W0lb2zJl0 for ; Fri, 1 Mar 2024 08:39:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4218dFch053891 for ; Fri, 1 Mar 2024 08:39:15 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4218dFcp053890 for ports-bugs@FreeBSD.org; Fri, 1 Mar 2024 08:39:15 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [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 08:39:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yasu@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pkg@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277411 Bug ID: 277411 Summary: ports-mgmt/pkg: @postunexec command in pkg-plist isn't executed when package is upgraded with `pkg upgrade` Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: pkg@FreeBSD.org Reporter: yasu@freebsd.org Assignee: pkg@FreeBSD.org Flags: maintainer-feedback?(pkg@FreeBSD.org) Created attachment 248845 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D248845&action= =3Dedit Patch to add misc/foo to ports tree Attached patch add 'misc/foo', a sample port to reproduce the problem, to t= he ports tree. misc/foo is very simple. It installs only one shell script 'foo' to ${PREFIX}/bin. But pkg-plist does something more. ---------------------------------------------------------------------- % pwd /usr/ports/misc/foo % cat pkg-plist bin/foo @preexec echo "Executing @preexec command of %%PKGNAME%%." @postexec echo "Executing @postexec command of %%PKGNAME%%." @preunexec echo "Executing @preunexec command of %%PKGNAME%%." @postunexec echo "Executing @postunexec command of %%PKGNAME%%." % ---------------------------------------------------------------------- It includes @preexec/@postexec/@preunexec/@postunexec commands showing mess= age that each command is executed. I build the port with poudriere and install the package with `pkg install`. Then I get following result. ---------------------------------------------------------------------- # pkg install -y foo Updating Poudriere repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01=20=20=20=20 Fetching packagesite.pkg: 100% 29 KiB 30.1kB/s 00:01=20=20=20=20 Processing entries: 100% Poudriere repository update completed. 103 packages processed. All repositories are up to date. Checking integrity... done (0 conflicting) The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: foo: 1.0 Number of packages to be installed: 1 [1/1] Installing foo-1.0... Executing @preexec command of foo-1.0. [1/1] Extracting foo-1.0: 100% Executing @postexec command of foo-1.0. # ---------------------------------------------------------------------- And if I uninstall the package with `pkg delete` then I get following resul= t. ---------------------------------------------------------------------- # pkg delete -y foo Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packag= es in the universe): Installed packages to be REMOVED: foo: 1.0 Number of packages to be removed: 1 [1/1] Deinstalling foo-1.0... Executing @preunexec command of foo-1.0. [1/1] Deleting files for foo-1.0: 100% Executing @postunexec command of foo-1.0. # ---------------------------------------------------------------------- All of @preexec/@postexec/@preunexec/@postunexec work as is expected Next, I install foo-1.0 again, bump PORTREVISION of Makefile, rebuild the package with poudriere, and upgrade from 1.0 to 1.0_1 with `pkg upgrade`. T= hen I get following result. ---------------------------------------------------------------------- # pkg info -aq | fgrep foo foo-1.0 # pkg upgrade -y Updating Poudriere repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01=20=20=20=20 Fetching packagesite.pkg: 100% 29 KiB 30.0kB/s 00:01=20=20=20=20 Processing entries: 100% Poudriere repository update completed. 103 packages processed. All repositories are up to date. Checking for upgrades (2 candidates): 100% Processing candidates (2 candidates): 100% Checking integrity... done (0 conflicting) The following 1 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: foo: 1.0 -> 1.0_1 Number of packages to be upgraded: 1 [1/1] Upgrading foo from 1.0 to 1.0_1... Executing @preexec command of foo-1.0_1. [1/1] Extracting foo-1.0_1: 100% Executing @preunexec command of foo-1.0. Executing @postexec command of foo-1.0_1. root@rolling-vm-freebsd4[73]# ---------------------------------------------------------------------- While @preexec of foo-1.0_1, @preunexec of foo-1.0 and @posttexec of foo-1.= 0_1 are executed, @postunexec of foo-1.0 isn't executed. --=20 You are receiving this mail because: You are the assignee for the bug.=