Bug 202701 - bsd.options.mk: OPTIONS_(SLAVE|EXCLUDE) fail to honor ${opt}_IMPLIES
Summary: bsd.options.mk: OPTIONS_(SLAVE|EXCLUDE) fail to honor ${opt}_IMPLIES
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords: needs-patch
Depends on: 207460
Blocks: 208218
  Show dependency treegraph
 
Reported: 2015-08-27 21:39 UTC by Jan Beich
Modified: 2022-09-07 15:21 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2015-08-27 21:39:29 UTC
In order to avoid leaking details of master port intra-dependencies into slave Makefiles OPTIONS_SLAVE and OPTIONS_EXCLUDE should chase _IMPLIES. Here're examples to illustrate:

  MASTERDIR=	${PORTSDIR}/audio/alsa-plugins
  OPTIONS_SLAVE=	JACK # should append SAMPLERATE
  .include "${MASTERDIR}/Makefile"


  MASTERDIR=	${PORTSDIR}/editors/emacs
  OPTIONS_EXCLUDE=	X11 # should append long list of X11 consumers
  .include "${MASTERDIR}/Makefile"
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2016-04-13 11:33:43 UTC
This was fixed since.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2016-04-13 12:15:22 UTC
When? I don't see any recent relevant commits to Mk/bsd.options.mk. Besides, "Overcome By Events" is weak rationale without referencing a commit i.e., reserved mostly for submitter.

See bug dependencies for examples to reproduce.
Comment 4 Mathieu Arnold freebsd_committer freebsd_triage 2016-04-13 14:20:51 UTC
I was under the impression that this had been fixed.
The thing is, without a patch, there is not a lot of chances that this is going to be fixed.
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-05-03 18:36:49 UTC
A commit references this bug:

Author: bdrewery
Date: Tue May  3 18:36:29 UTC 2016
New revision: 414547
URL: https://svnweb.freebsd.org/changeset/ports/414547

Log:
  Fix excluding implied options.

  This fixes the devel/git-lite port to not get PERL despite being excluded.

  PR:		207460
  PR:		202701
  With hat:	portmgr
  Differential Revision:	https://reviews.freebsd.org/D5538

Changes:
  head/Mk/bsd.options.mk
Comment 6 Jan Beich freebsd_committer freebsd_triage 2016-05-04 02:30:43 UTC
_EXCLUDE doesn't work as expected (see bug 208218) and _SLAVE wasn't fixed by r414547.
Comment 7 Bryan Drewery freebsd_committer freebsd_triage 2016-05-06 18:08:30 UTC
(In reply to Jan Beich from comment #6)
> _EXCLUDE doesn't work as expected (see bug 208218) and _SLAVE wasn't fixed
> by r414547.

Why do we need 2 bugs? And what is a port that shows the problem you're still seeing?

The one I fixed is in devel/git-lite.
Without my patch:
~/svn/ports/devel/git-lite # make -V ALL_OPTIONS
CURL HTMLDOCS ICONV NLS SEND_EMAIL
With my patch:
~/svn/ports/devel/git-lite # make -V ALL_OPTIONS
CURL HTMLDOCS ICONV NLS

It is because PERL implies SEND_EMAIL, and PERL is excluded for git-lite.
Comment 8 Jan Beich freebsd_committer freebsd_triage 2016-05-16 22:38:01 UTC
(In reply to Bryan Drewery from comment #7)
> Why do we need 2 bugs?

This bug is a superset. As I haven't analyzed ports maintained by other folks comment 0 has very few examples. _EXCLUDE one moved into bug 208218 but _SLAVE was for a port not yet created (worse is better?).

(In reply to Bryan Drewery from comment #7)
> ~/svn/ports/devel/git-lite # make -V ALL_OPTIONS

Illustrating a feature via undocumented variable won't show corner cases. devel/git is a simple options consumer, so with ALL_OPTIONS you've missed _SINGLE, _RADIO, _MULTI, _GROUP which also define valid options but not handled by ports r414547.

# before bug 208218 
$ make showconfig -C editors/emacs-nox11
===> The following configuration options are available for emacs-nox11-24.5_3,3:
     ACL=off: ACL support
     DBUS=off: D-Bus IPC system support
     FILENOTIFY=off: File notification support
     GNUTLS=off: SSL/TLS support via GnuTLS
     LTO=off: Enable link-time optimization (requires GCC 4.6+)
     SOUND=off: Sound support
     SOURCES=on: Install sources
     XML=on: XML format or parser support
====> Sound support: you can only select none or one of them
     ALSA=off: ALSA audio architecture support
     OSS=off: Open Sound System support
===> Use 'make config' to modify these settings

# after bug 208218
$ make showconfig -C editors/emacs-nox11
===> The following configuration options are available for emacs-nox11-24.5_3,3:
     ACL=off: ACL support
     DBUS=off: D-Bus IPC system support
     FILENOTIFY=off: File notification support
     GNUTLS=off: SSL/TLS support via GnuTLS
     LTO=off: Enable link-time optimization (requires GCC 4.6+)
     M17N=off: M17N support for text-shaping
     OTF=off: Opentype fonts suport
     SOUND=off: Sound support
     SOURCES=on: Install sources
     XML=on: XML format or parser support
====> X11 (graphics) support: you can only select none or one of them
     GTK2=off: GTK+ 2 GUI toolkit support
     GTK3=off: GTK+ 3 GUI toolkit support
     XAW=off: Athena widgets
     XAW3D=off: Athena3D widgets
     MOTIF=off: Motif widget library support
====> Sound support: you can only select none or one of them
     ALSA=off: ALSA audio architecture support
     OSS=off: Open Sound System support
===> Use 'make config' to modify these settings

Notice M17N, OTF and X11 group aren't excluded but should via options intra-dependencies (i.e. _IMPLIES).
Comment 9 Jan Beich freebsd_committer freebsd_triage 2016-05-16 23:06:46 UTC
(In reply to Bryan Drewery from comment #7)
> Why do we need 2 bugs?

Also, I'd prefer if portmgr peers don't hijack issues for drive-by fixes but look at the bigger picture as well. Bugzilla is a tool for collaboration, not an indicator how bad your software is that needs every bug squashed ASAP. Bugs without patches often don't attract attention until at least more than 1 person is affected. And no one (or very few) would be motivated to submit a fix if such bugs are closed shortly after being opened.
Comment 10 Tobias C. Berner freebsd_committer freebsd_triage 2022-09-07 15:21:10 UTC
Moin moin 

Closing this, due to old age. Please re-open the issue, if it is still relevant.


mfg Tobias