On Sat Dec 06 09:00:02 2008, VPIT wrote:
Show quoted text> > Additionally, appending
> >
> > SRC_TEST="do"
> >
> > would be helpful for packages that support tests.
>
> I tend to think that tests should be run only if the test USE flag is
> set. Does SRC_TEST handles this?
In the ebuild phase, src_test is controlled by the FEATURES test flag.
if FEATURES =~ /test/ and defined src_test, src_test is then executed.
Setting SRC_TEST="do" enables the "default" test kit to be run for the
ebuild as follows:
perl-module_src_test() {
if [ "${SRC_TEST}" == "do" ]; then
perlinfo
if [ -f Makefile ]; then
make test || die "test failed"
elif [ -f Build ]; then
perl Build test || die "test failed"
fi
fi
}
If this testing operation is not what you want, you simply define
src_test() in the ebuild and it runs that instead.
the "test" useflag is for something different entirely, the primary
purpose of that is to allow downloading of additional files for the
tests, or, in some cases, depending on tools required to perform tests.
( For a good example, see dev-perl/Data-UUID/Data-UUID-1.148.ebuild )
Show quoted text>
> > Finally, the bog standard Gentoo Copyright header should be generated.
>
> I didn't know the ebuild format was copyrighted by Gentoo.
I'm not sure if the format itself is copyrighted, but often, individual
ebuilds are. Its not standard to copy ebuilds that are generated
directly into mainline, but its feasible that a generated ebuild will be
used as a starting point, and then applied minor modifications to make
it suitable, and pasting the notice in as an afterthought is rather
annoying.
Additionally, the EChangelog utility plays with these and makes sure the
copyright dates are recent to when the file was last modified, which is
quite convenient.
Show quoted text>
> > You may wish to permit the user to specify their own header, so that
> > users running their own overlays can append $Id$ strings relative to
> > their distribution method.
>
> Sounds sensible. This could also allow the user to specify the
> copyright. Would that be good enough?
Yeah, that makes perfect sense to me, arbitrary prepend file or
something, if its easy to configure, or easy to add in a script that
remembers your chosen parameter, that would be ideal.
Show quoted text> > If there was a way to template the whole ebuild, that would be nice, but
> > I understand thats a bit far fetched.
>
> If there's a real need for it, then I may have to resort to this, yes.
> But for now I'd try to keep it as simple as possible.
>
Thanks for producing this module, I've been using g-cpan instead for a
while, and the codebase behind that is a huge unwieldy monster making it
unmaintainable and any minor improvements a nightmare
-- Kent.