Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 2008 18:04:54 -0700
From:      "Yen-Ming Lee" <leeym@leeym.com>
To:        "Anton Berezin" <tobez@tobez.org>
Cc:        lbr@freebsd.org, lth@freebsd.org, perl@freebsd.org, linimon@lonesome.com, des@des.no
Subject:   Re: [Request for review] PERL_DEPENDS and PERL_TEST_DEPENDS re-launched
Message-ID:  <759236930804141804t3fb58afcxb49adaffb9294e1@mail.gmail.com>
In-Reply-To: <20080406143607.GB14452@heechee.tobez.org>
References:  <20080406143607.GB14452@heechee.tobez.org>

next in thread | previous in thread | raw e-mail | index | archive | help
2008/4/6, Anton Berezin <tobez@tobez.org>:
> Hi,
>
>  After being lured by des to Oslo Perl QA Hackathon, lth@ and myself have
>  spent two enjoyable days hacking makefiles.  Before submitting any sort of
>  PR, we'd like to request people on this list to review the result.
>
>  The syntax is essentially what we have described before in this mail:
>
>  http://www.freebsd.org/cgi/getmsg.cgi?fetch=48572+0+/usr/local/www/db/text/2008/freebsd-perl/20080302.freebsd-perl
>
>  That is, the emphasis is on FreeBSD packages and their versions as opposed
>  to Perl modules and their versions (the reasons for that are described in
>  detail in several follow-ups on the mail above).
>
>  We also tried to take care of dual-life modules & distributions (those which
>  are found both in [one or more of] distributions of perl itself and also
>  separately on CPAN).
>
>  Another goal we had in mind was to try to reduce the size of the database of
>  such dual-life modules, as to avoid the problem with leeym's ports/121313
>  PR, in which such database consisted of 8451 lines totalling 250 kilobytes.
>  Our database ended up being 77 lines totalling 3.5 kilobytes.
>
>  We also tried to avoid doing shellouts as much as possible.
>
>  Below is a patch against ports/Mk from this morning.  Please note that the
>  distributions in the database were automatically generated and then polished
>  a little bit by hand.  At this stage there is no guarantee that the database
>  is 100% correct.  We are going to do the validation, but decided that what
>  we have is quite useful for testing by interested parties.
>
>  Below the patch there are two examples of p5 ports using the new syntax, so
>  read on!
>

There is a gap between the module itself and the package it belongs to
in the solution describe above.

For example, devel/p5-Test-Warn requires the following modules:

    'PREREQ_PM'         => {
                            'Array::Compare'        => 0,
                            'Test::Exception'       => 0,
                            'Test::Builder'         => 0.13,
                            'Test::Builder::Tester' => 1.02,
                            'Sub::Uplevel'          => 0.12,
                            'Tree::DAG_Node'        => 0,
                            'File::Spec'            => 0,
                            'Test::More'            => 0,
                            },

Three of them (Test::More, Test::Builder, Test::Builder::Tester)
belong to Test::Simple, but we (the p5-* port maintainer) can't tell
the relationship between the minimum version of the required module,
the package version fulfill that minimum version of the module. The
maintainers still need to manually find out which package carry the
needed module with the minimum required version or above.

In tobez@'s solution: it will be

PERL_DEPENDS= devel/p5-Test-Simple>=XXXX

My suggested syntax in ports/121313 is in module level instead of
package level, and can fix that problem, but the trade-off is we need
more information about the module version in dual life modules.

in ports/121313 it will be:

PERL_DEPENDS= Test::More>=0:${PORTSDIR}/devel/p5-Test-Simple \

Test::Builder>=0.13:${PORTSDIR}/devel/p5-Test-Simple \

Test::Builder::Tester>=1.04:${PORTSDIR}/devel/p5-Test-Simple

My solution is not good: shell out is bad and fat database is bad too.
I closed it anyway.

Just my $0.02

-- 
Yen-Ming Lee <leeym@leeym.com>



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