Created attachment 238488 [details] Patch to conditionally remove data/images Hello, With X11-off, I get a build failure due to the data/images directory missing: /bin/rmdir /wrkdirs/usr/ports/print/hplip/work/stage/usr/local/share/hplip/data/images/* /wrkdirs/usr/ports/print/hplip/work/stage/usr/local/share/hplip/data/images rmdir: /wrkdirs/usr/ports/print/hplip/work/stage/usr/local/share/hplip/data/images/*: No such file or directory rmdir: /wrkdirs/usr/ports/print/hplip/work/stage/usr/local/share/hplip/data/images: No such file or directory *** Error code 1 The attached patch simply wraps this in an "if exists" test and builds, so hope that helps somebody; but perhaps the correct fix would be forceful removal (rm -rf), or to simply remove the whole post-install-X11-off make target? (I've tested neither of those options). Thanks, Stewart.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f1865a3c0ab76341e5131165e11d25fcd5f478df commit f1865a3c0ab76341e5131165e11d25fcd5f478df Author: Tijl Coosemans <tijl@FreeBSD.org> AuthorDate: 2022-12-02 16:26:23 +0000 Commit: Tijl Coosemans <tijl@FreeBSD.org> CommitDate: 2022-12-02 16:30:54 +0000 print/hplip: Fix staging with X11 off PR: 268125 print/hplip/Makefile | 4 ---- 1 file changed, 4 deletions(-)
The solution is to remove the post-install-X11-off target. .if exists won't work because it is interpreted when make parses the Makefile which happens before it runs any commands so the files may not exist yet. You would have to use test(1) like this: post-install-X11-off: if test -e /some/file; then rm ...; fi
Ah, of course :facepalm: Thanks! :) Stewart.