Bug 233442

Summary: games/anki FLAVOR is defined while port does not have FLAVORS
Product: Ports & Packages Reporter: Rob Belics <robbelics>
Component: Individual Port(s)Assignee: Kai Knoblich <kai>
Status: Closed Works As Intended    
Severity: Affects Only Me CC: kai, miwi
Priority: --- Flags: kai: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
anki-noflavors.patch / Variant A: The preferred way
kai: maintainer-approval+
anki-noflavors-hack.patch / Variant B: Same as variant A with FLAVOR/S hack kai: maintainer-approval+

Description Rob Belics 2018-11-23 15:52:42 UTC
11.2p4-RELEASE

===>>> Returning to dependency check for games/anki
===>>> Dependency check complete for games/anki

===>  anki-2.0.52_1 FLAVOR is defined (to py27) while this port does not have
FLAVORS..
*** Error code 1

Stop.
make: stopped in /usr/ports/games/anki
Comment 1 Kai Knoblich freebsd_committer freebsd_triage 2018-11-24 15:41:54 UTC
Created attachment 199512 [details]
anki-noflavors.patch / Variant A: The preferred way
Comment 2 Kai Knoblich freebsd_committer freebsd_triage 2018-11-24 15:42:55 UTC
Created attachment 199513 [details]
anki-noflavors-hack.patch / Variant B: Same as variant A with FLAVOR/S hack
Comment 3 Kai Knoblich freebsd_committer freebsd_triage 2018-11-24 15:51:48 UTC
(In reply to Rob Belics from comment #0)

Thank you for your info. I could not reproduce it by upgrading from 2.0.52 to 2.0.52_1 but I've played around a bit with the FLAVOR/FLAVORS variables and was then able to get the error message.

I attached two patches which should remedy the issue:

Variant A:
- added USE_PYTHON with keyword 'noflavors'
- sorted variables a bit according to PHB
- pet portlint

Variant B:
- Same as variant A but it sets also the variables FLAVORS and FLAVOR to 'py27' (games/anki supports only Python 2.7)

Please try the patch with variant A first if it works for you. If not, try the other variant then.
Comment 4 Rob Belics 2018-11-24 16:59:10 UTC
Using portmaster, anki was uninstalled when I had tried the upgrade. Re-installing anki was successful without making any changes. You, or I, can close this as fixed, I guess, unless you wish to leave it open but, since you were able to reproduce it in your way, I don't know if you want to close it.
Comment 5 Kai Knoblich freebsd_committer freebsd_triage 2018-11-24 19:10:59 UTC
(In reply to Rob Belics from comment #4)

Allright, that's nice to hear that you got the issue resolved. 

For the sake of completeness the error message can be reproduced by:

> $ cd /usr/ports/games/anki
> $ make FLAVOR=py27

The issue persists if USE_PYTHON=noflavors is set thus I created another patch, variant B, which sets FLAVORS=py27 and FLAVOR=${FLAVORS[1]} which remedies the issue then.

But I'm not sure if that an ideal way to resolve that problem so I approved both patches and let a committer to decide which variant is the better one.
Comment 6 Martin Wilke freebsd_committer freebsd_triage 2019-02-13 19:39:46 UTC
submitter is committer now
Comment 7 Kai Knoblich freebsd_committer freebsd_triage 2019-07-03 22:36:56 UTC
Closing this bug now. The issue was related to portmaster and after reinstalling the package the issue was solved.