Bug 250281

Summary: devel/git: Convert slave ports to flavors
Product: Ports & Packages Reporter: Yasuhiro KIMURA <yasu>
Component: Individual Port(s)Assignee: Renato Botelho <garga>
Status: Closed FIXED    
Severity: Affects Only Me CC: andrew
Priority: --- Flags: bugzilla: maintainer-feedback? (garga)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch file
none
Additional patch file none

Description Yasuhiro KIMURA 2020-10-12 04:52:03 UTC
Created attachment 218676 [details]
Patch file

Convert slave ports to flavors.

To apply attached patch, please take following steps.

1. cd /usr/ports
2. svn move devel/git-gui/pkg-descr devel/git/pkg-descr-gui
3. svn delete devel/git-gui
4. svn move devel/git-lite/pkg-descr devel/git/pkg-descr-lite
5. svn delete devel/git-lite
6. svn patch /path/to/attached/patch
Comment 1 andrew 2020-10-12 15:51:45 UTC
I'm not sure the way this handles OPTIONS works well - I tried something similar in guile-gnome-platform and got pushback from mat (see D22189 on phab).

The main issue is that while slave ports get their own set of options (from OPTIONS_FILE or make.conf category_portname_[UN]SET= vars), flavors don't; they all share a port origin and hence one set of options variables.

I suggest putting this up on phab and soliciting wider review.

Also, typo:

+lite_CONFLISTS_INSTALL=		git git-gui
Comment 2 commit-hook freebsd_committer 2020-10-12 16:04:03 UTC
A commit references this bug:

Author: garga
Date: Mon Oct 12 16:03:45 UTC 2020
New revision: 552136
URL: https://svnweb.freebsd.org/changeset/ports/552136

Log:
  Convert git slave ports to flavors

  Create git@lite and git@gui flavors to replace slave ports

  PR:		250281
  Submitted by:	Yasuhiro KIMURA <yasu@utahime.org>
  Sponsored by:	Rubicon Communications, LLC (Netgate)

Changes:
  head/MOVED
  head/devel/Makefile
  head/devel/git/Makefile
  head/devel/git/pkg-descr-gui
  head/devel/git/pkg-descr-lite
  head/devel/git-gui/
  head/devel/git-lite/
Comment 3 Renato Botelho freebsd_committer 2020-10-12 16:07:06 UTC
(In reply to andrew from comment #1)
I'm sorry but I just saw your comment after I committed it.  I'll take a look
Comment 4 Yasuhiro KIMURA 2020-10-12 17:10:04 UTC
Created attachment 218698 [details]
Additional patch file

Thank you for committing. But I found my patch causes failure of `make index`. So would you please commit attached patch too?

Best Regards.
Comment 5 andrew 2020-10-12 17:33:27 UTC
So the problem this is causing for me is that I now can't easily turn off SUBTREE for git@lite (because it pulls in a ton of docs build dependencies, which is probably something that should be fixed) without also turning it off for git@default (which would be bad since it's a needed feature), due to the sharing of options.

(It can be done in make.conf using

devel_git_UNSET=${"${FLAVOR}"=="lite":?SUBTREE:}

but that's a really ugly workaround.)

I'm not sure what the best solution here is, but this isn't it. Maybe there should be support in the framework for flavors to have their own options?
Comment 6 commit-hook freebsd_committer 2020-10-13 11:30:56 UTC
A commit references this bug:

Author: garga
Date: Tue Oct 13 11:30:50 UTC 2020
New revision: 552231
URL: https://svnweb.freebsd.org/changeset/ports/552231

Log:
  Change dependencies of git-lite to git@lite

  PR:		250281
  Submitted by:	Yasuhiro KIMURA <yasu@utahime.org>

Changes:
  head/sysutils/iocage/Makefile
  head/sysutils/iocage-devel/Makefile
Comment 7 andrew 2020-10-16 18:38:27 UTC
Also, the "gui" flavor will build without a GUI if there exists a configuration file with GUI=off (e.g. created for use with the "default" flavor).
Comment 8 Renato Botelho freebsd_committer 2020-11-05 17:05:09 UTC
(In reply to andrew from comment #7)
I've added the support of having different OPTIONS for each flavor while framework doesn't support it yet.  Thanks!