Bug 264498

Summary: korean/nanumfonts: Wrong PORTNAME causes Poudriere problems: stale package: unwanted origin
Product: Ports & Packages Reporter: Robert Clausecker <fuz>
Component: Individual Port(s)Assignee: Jung-uk Kim <jkim>
Status: Closed FIXED    
Severity: Affects Only Me CC: bdrewery
Priority: --- Flags: bugzilla: maintainer-feedback? (jkim)
koobs: maintainer-feedback? (bdrewery)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Do not use PKGNAMESUFFIX none

Description Robert Clausecker freebsd_committer freebsd_triage 2022-06-06 12:33:39 UTC
When I'm trying to build all ports with Poudriere, I keep seeing that the nanum font packages are being removed for rebuilding:

[00:52:50] Deleting ko-nanum-barun-gothic-20220210.pkg: stale package: unwanted origin korean/nanum-barun-gothic@ttf
[00:52:50] Deleting ko-nanum-barun-pen-20220210.pkg: stale package: unwanted origin korean/nanum-barun-pen@ttf
[00:52:51] Deleting ko-nanum-brush-20220210.pkg: stale package: unwanted origin korean/nanum-brush@ttf
[00:52:51] Deleting ko-nanum-gothic-20220210.pkg: stale package: unwanted origin korean/nanum-gothic@ttf
[00:52:51] Deleting ko-nanum-myeongjo-20220210.pkg: stale package: unwanted origin korean/nanum-myeongjo@ttf
[00:52:51] Deleting ko-nanum-pen-20220210.pkg: stale package: unwanted origin korean/nanum-pen@ttf
[00:52:52] Deleting ko-nanum-pen-20220210.txz: dead symlink
[00:52:52] Deleting ko-nanum-square-20220210.pkg: stale package: unwanted origin korean/nanum-square@ttf
[00:52:52] Deleting ko-nanum-square-round-20220210.pkg: stale package: unwanted origin korean/nanum-square-round@ttf

This could be because you don't set up PORTNAME in the slave ports, causing Poudriere to think that all these ports have the same origin when they don't.  To fix this, change the ports such that each slave port has its own PORTNAME.
Comment 1 Jung-uk Kim freebsd_committer freebsd_triage 2022-06-06 18:10:39 UTC
PKGNAMESUFFIX is set instead.  Do you mean Poudriere cannot handle origin properly if I combine it with FLAVORS?  If so, it sounds like a Poudriere bug to me.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2022-06-06 19:49:07 UTC
(In reply to Jung-uk Kim from comment #1)

I don't really know.
Comment 3 Jung-uk Kim freebsd_committer freebsd_triage 2022-06-06 22:35:21 UTC
Created attachment 234507 [details]
Do not use PKGNAMESUFFIX

Can you please try this patch?  This patch removes PKGNAMESUFFIX.
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2022-06-08 12:43:03 UTC
(In reply to Jung-uk Kim from comment #3)

Hi,

This does not seem to change anything, so the problem might be something else.

One possible other reason could be is that you define the default flavour as

FLAVOR?=        ${FLAVORS:[2]}

whereas the manual says that the default flavour must always be the first flavour in the list.  If I flip these two around so it says

FLAVORS=        ttf otf
FLAVOR?=        ${FLAVORS:[1]}

instead, then the error no longer appears.  I think your original patch is not necessary in this case either.
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-06-08 21:38:44 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=41157c7ddb3ae60dfc1d3477afbf6b47d5c17ed3

commit 41157c7ddb3ae60dfc1d3477afbf6b47d5c17ed3
Author:     Jung-uk Kim <jkim@FreeBSD.org>
AuthorDate: 2022-06-08 21:29:18 +0000
Commit:     Jung-uk Kim <jkim@FreeBSD.org>
CommitDate: 2022-06-08 21:29:18 +0000

    korean/nanum-*: Make the first flavor in FLAVORS default

    PR:             264498

 korean/nanumfonts/Makefile.common | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Comment 6 Jung-uk Kim freebsd_committer freebsd_triage 2022-06-08 21:39:53 UTC
Committed, thanks!