[Bug 268125] print/hplip: Staging fails to remove nonexistant data/images with no-X11

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 02 Dec 2022 12:01:33 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268125

            Bug ID: 268125
           Summary: print/hplip: Staging fails to remove nonexistant
                    data/images with no-X11
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: tijl@FreeBSD.org
          Reporter: stewart+FreeBSD-BugZilla@arnos-vale.net
             Flags: maintainer-feedback?(tijl@FreeBSD.org)
          Assignee: tijl@FreeBSD.org

Created attachment 238488
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=238488&action=edit
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.

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