Bug 251509 - Mk/Uses/gnome.mk: USE_GNOME_IMPL does not propagate :build etc, creating bogus dependencies
Summary: Mk/Uses/gnome.mk: USE_GNOME_IMPL does not propagate :build etc, creating bogu...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
Depends on:
Reported: 2020-12-01 18:46 UTC by Greg V
Modified: 2020-12-02 01:05 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Note You need to log in before you can comment on or make changes to this bug.
Description Greg V 2020-12-01 18:46:05 UTC
graphics/libdrm has this:

MANPAGES_USE=		GNOME=libxslt:build

Obviously the intention is to use libxslt only during the build.

Now, gnome.mk has:

libxslt_USE_GNOME_IMPL=	libxml2

and the way these implications are handled is (minus the unknown check):

. for component in ${USE_GNOME:C/^([^:]+).*/\1/}
_USE_GNOME+=	${${component}_USE_GNOME_IMPL} ${component}
. endfor

Oops, the :build flag is lost (literally deleted by the :C/../../ and never handled), not propagated, so we basically have USE_GNOME=libxml2 — so this ends up in the pkg +MANIFEST:

  "deps": {
    "libpciaccess": {
      "origin": "devel/libpciaccess",
      "version": "0.16"
    "libxml2": {
      "origin": "textproc/libxml2",
      "version": "2.9.10_1"
But libdrm does not actually depend on libxml2 at runtime!!


How I noticed this is that poudriere fails to install anything that depends on libdrm:

===>   mesa-devel-20.3.b.786 depends on package: libva>0 - not found
===>   Installing existing package /packages/All/libva-2.9.1.tzst
[unrelenting.technology] Installing libva-2.9.1...
[unrelenting.technology] `-- Installing libXfixes-5.0.3_2...
[unrelenting.technology] `-- Extracting libXfixes-5.0.3_2: .......... done
[unrelenting.technology] `-- Installing libdrm-2.4.103,1...
[unrelenting.technology] |   `-- Installing libpciaccess-0.16...
[unrelenting.technology] |   | `-- Installing pciids-20201025...
[unrelenting.technology] |   | `-- Extracting pciids-20201025: ..... done
[unrelenting.technology] |   `-- Extracting libpciaccess-0.16: ......... done
pkg-static: Missing dependency 'libxml2'

…granted, it *shouldn't* fail, it should find the libxml2 dependency, which of course *was* added to RUN_DEPENDS at the port level, so something went wrong in poudriere for me here. but I'm glad it did, because idk if anyone would've found that issue otherwise.
Comment 1 Niclas Zeising freebsd_committer 2020-12-01 20:01:34 UTC
To be honest, this looks like a bug in gnome.mk rather than libdrm.
Comment 2 Greg V 2020-12-02 01:05:14 UTC
(In reply to Niclas Zeising from comment #1)

Yes – that's why the title begins with gnome.mk :)

I wonder how bugzilla decided to assign to x11. First word of the text also counts, not just the title?