Bug 222989 - print/hplip will not install unless options DOC and X11 are selected
Summary: print/hplip will not install unless options DOC and X11 are selected
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Ben Woods
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-13 18:39 UTC by freebsd
Modified: 2017-12-24 08:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd 2017-10-13 18:39:41 UTC
If one selects the following options for hplip:
  DOCS, SNMP, QT4
the install fails with messages like:
===>  Installing for hplip-3.17.9
===>  Checking if hplip already installed
===>   Registering installation for hplip-3.17.9
pkg-static: Unable to access file /usr/ports/print/hplip/work/stage/usr/local/share/hplip/ui4/__init__.py:No such file or directory
pkg-static: Unable to access file /usr/ports/print/hplip/work/stage/usr/local/share/hplip/ui4/aboutdialog.py:No such file or directo
ry

Turning on X11 should be unnecessary to get the DOCS, and it can result in a boatload of unwanted qt4 stuff being installed.
If DOCS is turned off as well as X11, with only SNMP selected, the same errors occur.
Comment 1 Ben Woods freebsd_committer freebsd_triage 2017-12-24 08:45:36 UTC
Thanks for pointing this out.

The QT4 or QT5 option should only actually do anything if the X11 option is also set. If X11 is disabled, the QT4 and QT5 options should do nothing (the GUI will be entirely disabled, including disabling both QT4 and QT5).

The port Makefile successfully implements this logic. The problem with the port is that the pkg-plist was only looking at whether QT4 or QT5 was enabled, and not paying attention to whether X11 was disabled but one of the QT options was enabled.

This can be fixed by making the pkg-plist only include the QT files if both the X11 option and the QT4/5 option are enabled.

I.e. Change entries in the pkg-plist file as follows:
OLD: %%QT4%%file
NEW: %%X11%%%%QT4%%file
Comment 2 Ben Woods freebsd_committer freebsd_triage 2017-12-24 08:49:13 UTC
Committed. Thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-12-24 08:49:52 UTC
A commit references this bug:

Author: woodsb02
Date: Sun Dec 24 08:49:05 UTC 2017
New revision: 457131
URL: https://svnweb.freebsd.org/changeset/ports/457131

Log:
  print/hplip: Fix pkg-plist when X11 disabled but QT4 or QT5 enabled

  PR:		222989
  Reported by:	freebsd@dreamchaser.org

Changes:
  head/print/hplip/pkg-plist