Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2005 15:12:19 -0600
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Reinhard Haller <reinhard.haller@interactive-net.de>
Cc:        ports@freebsd.org
Subject:   CONFLICT variable for Perl depending packages on 4.x (Re: Antw: Re: FreeBSD Port: p5-Mail-SPF-Query-1.997)
Message-ID:  <790a9fff0511081312t2e2ccb6bnd750969d1420b678@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
On 11/8/05, Reinhard Haller <reinhard.haller@interactive-net.de> wrote:
> >>> Scot Hetzel <swhetzel@gmail.com> 07.11.2005 22:17 >>>
> >No it's not weird, as 4.11 still has perl in the base system, and the
> >package he installed using portupgrade was built for the base systems
> >version of perl.
>
> That's only part of the game. I believe updates have already worked
> well with portupgrade, since SpamAssassin mandates perl 5.8.7 as
> prerequisite since version 3.0. So it is more than weird if the update
> process first checks if the proper version of perl is installed and in
> the following the dependants are installed to site_perl/5.005 instead
> of site_perl/5.8.7 when all of them also require perl 5.8.7
>
The problem is with the 4.x ports build server.  This server is using
the system perl on 4.x to build the p5-* packages.  And since no
version of perl is listed as a dependancy in the p5-* packages,
portupgrade thinks it is okay to install the p5-* package on your
system (even though you have Perl 5.8.7 installed).  This is wrong, as
the p5-* packages from the 4.x ports build server have a hidden
dependancy on the 4.x system perl.

The only way to fix this is to add a CONFLICTS variable to the perl
depending ports (for FreeBSD 4.x), that is set to conflict with all of
the Perl 5.x ports.  This would have then prevented the package from
installing on your system, since it wasn't built for Perl 5.8.7.

In bsd.port.mk this needs to be changed:

.if ${PERL_LEVEL} >=3D 500600
.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
EXTRACT_DEPENDS+=3D${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
PATCH_DEPENDS+=3D=09${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
BUILD_DEPENDS+=3D=09${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.if defined(USE_PERL5) || defined(USE_PERL5_RUN)
RUN_DEPENDS+=3D=09${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.endif

to

.if ${PERL_LEVEL} >=3D 500600
.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
EXTRACT_DEPENDS+=3D${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
PATCH_DEPENDS+=3D=09${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
BUILD_DEPENDS+=3D=09${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.if defined(USE_PERL5) || defined(USE_PERL5_RUN)
RUN_DEPENDS+=3D=09${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.else
.if ( defined(USE_PERL5) || defined(USE_PERL5_RUN) ) &&
!defined(PERL_CONFLICT_OVERRIDE)
CONFLICTS+=3D perl-*
.endif
.endif

The only problem is when you want to install a p5-* port for use by
the system perl and have Perl 5.8.7 installed at the same time.  To
get arround this, then you would have to define
PERL_CONFLICT_OVERRIDE.

You'll  just need to ensure that you build these p5-* ports yourself
on FreeBSD 4.x instead of using portupgrade.  Unless there is a way to
force portupgrade to always build PERL depending ports, instead of
using packages.  This problem doesn't happen on FreeBSD 5.x as there
is no system perl.

Scot
--
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0511081312t2e2ccb6bnd750969d1420b678>