git: 10a0f1814bac - main - sysutils/pacman: fix packaging archlinux flavour on official builders

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Tue, 06 Jan 2026 02:13:26 UTC
The branch main has been updated by vishwin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=10a0f1814bac4f2d9711925ce2deb0743e705f3d

commit 10a0f1814bac4f2d9711925ce2deb0743e705f3d
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2026-01-06 02:05:16 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2026-01-06 02:05:16 +0000

    sysutils/pacman: fix packaging archlinux flavour on official builders
    
    Apparently ${PREFIX} is strictly enforced and prepended on entries
    in ${PLIST} on the official builders so trying to list anything
    outside of ${PREFIX} like /compat ends up as ${PREFIX}/compat, so
    move these entries to ${PLIST_DIRS}. The ${PLIST} listing approach
    results in errors like:
    
    ===>   Building archlinux-pacman-7.1.0
    pkg-static: Unable to access file /wrkdirs/usr/ports/sysutils/pacman/work-archlinux/stage/usr/local/compat/archlinux/var/cache/pacman/pkg/:No such file or directory
    
    Reported by: fallout
---
 sysutils/pacman/Makefile  | 7 +++++++
 sysutils/pacman/pkg-plist | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sysutils/pacman/Makefile b/sysutils/pacman/Makefile
index d4a06aff1b9f..aebe79c2e842 100644
--- a/sysutils/pacman/Makefile
+++ b/sysutils/pacman/Makefile
@@ -36,6 +36,13 @@ USE_LDCONFIG=	yes
 SUB_FILES=	pkg-message pkg-deinstall
 SUB_LIST=	PACMAN_ROOT="${PACMAN_ROOT}" PREFIX="${PREFIX}"
 PLIST_SUB=	PACMAN_ROOT="${PACMAN_ROOT:C,^${PREFIX}/,,}"
+PLIST_DIRS=	%%PACMAN_ROOT%%/var/cache/pacman/pkg \
+		%%PACMAN_ROOT%%/var/cache/pacman \
+		%%PACMAN_ROOT%%/var/cache \
+		%%PACMAN_ROOT%%/var/lib/pacman \
+		%%PACMAN_ROOT%%/var/lib \
+		%%PACMAN_ROOT%%/var \
+		%%PACMAN_ROOT%%
 
 PORTEXAMPLES=	*
 PKGMESSAGE=	${PKGDIR}/pkg-message-${FLAVOR:U}
diff --git a/sysutils/pacman/pkg-plist b/sysutils/pacman/pkg-plist
index d9575fdbcd39..b0c5045d6908 100644
--- a/sysutils/pacman/pkg-plist
+++ b/sysutils/pacman/pkg-plist
@@ -266,10 +266,3 @@ share/makepkg/util/util.sh
 share/zsh/site-functions/_pacman
 @dir share/libalpm/hooks
 @dir share/makepkg-template
-@dir %%PACMAN_ROOT%%/var/cache/pacman/pkg
-@dir %%PACMAN_ROOT%%/var/cache/pacman
-@dir %%PACMAN_ROOT%%/var/cache
-@dir %%PACMAN_ROOT%%/var/lib/pacman
-@dir %%PACMAN_ROOT%%/var/lib
-@dir %%PACMAN_ROOT%%/var
-@dir %%PACMAN_ROOT%%