freebsd / poudriere

Port/Package build and test system
https://github.com/freebsd/poudriere/wiki
BSD 2-Clause "Simplified" License
391 stars 162 forks source link

stale package: unwanted origin #978

Open Helmut1972 opened 2 years ago

Helmut1972 commented 2 years ago

Prerequisites

The issue is described in #846 but without solution:

[00:00:20] Deleting git-tiny-2.35.1.pkg: stale package: unwanted origin devel/git@tiny [00:00:21] Deleting open-vm-tools-nox11-11.3.5_2,2.pkg: stale package: unwanted origin emulators/open-vm-tools@nox11 [00:00:22] Deleting porttools-1.10.pkg: missing dependency: git-tiny-2.35.1

Those 3 ports are rebuilt every run of poudriere.

.if ${.CURDIR:M/devel/git} FLAVOR= tiny .endif .if ${.CURDIR:M/emulators/open-vm-tools} FLAVOR= nox11 .endif

arrowd commented 3 weeks ago

I bumped into this with a more clear reproducer:

Deleting gammaray-3.1.0.pkg: stale package: unwanted origin devel/gammaray@qt6

The culprit code is common.sh

    stale_pkg=0
    if have_ports_feature FLAVORS && \
        ! get_pkgname_from_originspec "${originspec}" new_pkgname; then
        stale_pkg=1
    fi

and the get_pkgname_from_originspec itself. The ${DEFAULT_FLAVOR} variable looks particularly strange.

Anyways, the important thing about this port is that it has FLAVORS= qt5 qt6, defaulting to qt6. It doesn't have a flavor named default, which is probably a root for the issue. Porter's Handbook doesn't state that a default flavor should always be named default, so this is a Poudriere bug.

arrowd commented 3 weeks ago

Oh, maybe I'm mistaken a bit and the root cause is that the resulting package is named gammaray for @qt6 and gammaray-qt5 for @qt5.