Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2021 13:30:47 -0700
From:      Bryan Drewery <bryan-lists@shatow.net>
To:        lev@FreeBSD.org, freebsd-ports@freebsd.org
Subject:   Re: poudriere builds unneeded dependencies for non-default flavor of ports
Message-ID:  <e55a4747-724e-85af-ffcd-26bb2315ba27@shatow.net>
In-Reply-To: <85e46806-3585-93e2-79d8-501f3b816aea@FreeBSD.org>
References:  <85e46806-3585-93e2-79d8-501f3b816aea@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/22/2021 6:04 AM, Lev Serebryakov wrote:
> 
>  I'm trying to build headless `net-p2p/qbittorrent` with poudriere:
> 
> $ sudo poudriere bulk -j sysmirror `pkg prime-origins ; echo
> net-p2p/qbittorrent@nox
> ....
> [00:19:18] [02] [00:00:00] Building x11-toolkits/qt5-gui | qt5-gui-5.15.2_7
> [00:20:22] [02] [00:01:04] Finished x11-toolkits/qt5-gui |
> qt5-gui-5.15.2_7: Failed: lib-depends
> [00:20:24] [02] [00:01:06] Skipping net-p2p/qbittorrent@nox |
> qbittorrent-nox-4.3.8: Dependent port x11-toolkits/qt5-gui |
> qt5-gui-5.15.2_7 failed
> [00:20:24] [02] [00:01:06] Skipping x11-toolkits/qt5-declarative |
> qt5-declarative-5.15.2_3: Dependent port x11-toolkits/qt5-gui |
> qt5-gui-5.15.2_7 failed
> [00:20:24] [02] [00:01:06] Skipping devel/qt5-linguisttools |
> qt5-linguisttools-5.15.2_1: Dependent port x11-toolkits/qt5-gui |
> qt5-gui-5.15.2_7 failed
> [00:20:24] [02] [00:01:06] Skipping x11-toolkits/qt5-widgets |
> qt5-widgets-5.15.2_3: Dependent port x11-toolkits/qt5-gui |
> qt5-gui-5.15.2_7 failed
> ....
> $
> 
>  Why does it try to build x11-toolkits/qt5-gui at all?!
> net-p2p/qbittorrent@nox don't need it:
> 
> ....
> nox_PKGNAMESUFFIX=      -nox
> nox_PLIST=              ${MASTERDIR}/pkg-plist-nox
> 
> USES=                   compiler:c++14-lang cpe pkgconfig qmake:no_env
> qt:5 ssl tar:xz
> GNU_CONFIGURE=          yes
> USE_QT=                 core network xml buildtools_build
> linguisttools_build qmake_build
   ^^^^^
> DESTDIRNAME=            INSTALL_ROOT
> CONFIGURE_ENV+=         openssl_CFLAGS="-I${OPENSSLINC}"
> openssl_LIBS="-L${OPENSSLLIB} -lssl"
> 
> .if ${FLAVOR} == default
> USES+=                  desktop-file-utils gl
> USE_QT+=                concurrent gui svg widgets
> USE_GL=                 gl
> .endif
> ....
> 

With bulk -v:

[00:00:16] net-p2p/qbittorrent@nox depends on devel/qt5-linguisttools
...
[00:00:16] devel/qt5-linguisttools depends on x11-toolkits/qt5-declarative
...
[00:00:16] x11-toolkits/qt5-declarative depends on x11-toolkits/qt5-widgets
^^ this unconditionally builds qt5-gui and qt5-widgets
...
[00:00:16] x11-toolkits/qt5-widgets depends on x11-toolkits/qt5-gui

None of these ports have FLAVORS. If they did then we would want to pass
it down in the DEPENDS lines like we do for python with $PY_FLAVOR.

In general, this problem of absurd/unneeded dependencies is widespread
and noticeable if you inspect everything that builds. Poudriere
carefully removes dependencies that do not appear to be needed currently
but soon I am removing that, but I'll expand on that when I send a HEADS
UP out.

-- 
Bryan Drewery



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e55a4747-724e-85af-ffcd-26bb2315ba27>