nested port upgrading and variants

David Strubbe dstrubbe at macports.org
Thu Oct 27 11:12:10 PDT 2016


Hi René,

The purpose of the active_variants portgroup is to provide error messages
like the one you mentioned, after checking whether a certain variant was
used for a dependency. That's all it does. The only way I know of that you
could make opencv get installed with +qt5 in this context is to do "port
install kf5-digikam-devel +qt5" (whether that is a meaningful variant for
kf5-digikam-devel or not).

David

On Thu, Oct 27, 2016 at 3:15 AM, René J.V. Bertin <rjvbertin at gmail.com>
wrote:

> Hi,
>
> Marko tells me he's been having issues with upgrading one of my KF5 ports
> that uses the active_variants portgroup to "depend" on variants of one of
> its dependencies.
>
> From our exchange:
>
> > > >> BUT that’s not all yet. Once also needs to select the +contrib
> variant,
> > > >> otherwise you have to run another loop of building this port!
> Annoying
> > > >> is
> > > >> the word. What’s the reason for this odd behaviour?
> > > >
> > > > There's little I can do about that. digiKam needs +qt5 (evidently)
> but
> > > > also +contrib. The only way to increase the chance that opencv is
> > > > installed with those variants by default is to add the variants to
> > > > digikam, but that doesn't make a lot of sense. This is due to the
> fact
> > > > that ports cannot depend on the variants of another port (unless they
> > > > have the same variant, but that's propagation, not dependance). They
> > > > can only raise an error if they detect that a dependency is installed
> > > > with the wrong variant(s).
>
> In short: digikam needs port:opencv with +qt5+contrib. I try to impose
> that using
>
> {{{
> PortGroup           active_variants 1.1
>
> depends_lib-append  port:opencv
> require_active_variants opencv qt5
> require_active_variants opencv contrib
> }}}
>
> From what I understand, Marko had opencv+qt5+contrib installed and lost
> those variants when port:opencv was upgraded.
>
> I'll leave it to him to post the exact command he used for installing or
> upgrading the kf5-digikam port which led to the variant issue, I only have
> a part of the trace:
>
> {{{
> --->  Fetching archive for opencv
> --->  Attempting to fetch opencv-3.1.0_4.darwin_15.x86_64.tbz2 from
> http://nue.de.packages.macports.org/opencv
> --->  Attempting to fetch opencv-3.1.0_4.darwin_15.x86_64.tbz2 from
> https://packages.macports.org/opencv
> --->  Attempting to fetch opencv-3.1.0_4.darwin_15.x86_64.tbz2 from
> http://lil.fr.packages.macports.org/opencv
> --->  Fetching distfiles for opencv
> --->  Verifying checksums for opencv
> --->  Extracting opencv
> --->  Applying patches to opencv
> --->  Configuring opencv
> --->  Building opencv
> --->  Staging opencv into destroot
> --->  Installing opencv @3.1.0_4
> --->  Activating opencv @3.1.0_4
> --->  Cleaning opencv
> --->  Fetching archive for kf5-digikam-devel
> Error: org.macports.archivefetch for port kf5-digikam-devel returned:
> opencv must be installed with +qt5.
> Please see the log file for port kf5-digikam-devel for details:
>     /opt/local/var/macports/logs/_Users_marko_WC_GIT_macstrop_
> kf5_kf5-digikam/kf5-digikam-devel/main.log
> }}}
>
> is there something wrong in my way of declaring the variant dependency, or
> is this to be expected?
>
> Thanks,
> René
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20161027/aa8a0d91/attachment.html>


More information about the macports-dev mailing list