Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235901 - dev-perl/Data-ICal-0.13 new ebuild
Summary: dev-perl/Data-ICal-0.13 new ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Low enhancement (vote)
Assignee: Gentoo Perl team
URL: http://search.cpan.org/~jesse/Data-IC...
Whiteboard:
Keywords:
Depends on: 235898 235899
Blocks: 235914
  Show dependency tree
 
Reported: 2008-08-27 11:15 UTC by Nick Prater
Modified: 2008-09-08 11:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Data-ICal-0.13.ebuild (Data-ICal-0.13.ebuild,451 bytes, text/plain)
2008-08-27 11:17 UTC, Nick Prater
Details
Added support for tests (Data-ICal-0.13.ebuild,654 bytes, text/plain)
2008-09-07 17:30 UTC, Nick Prater
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Prater 2008-08-27 11:15:28 UTC
Data::ICal is a dependency for www-apps/rt-3.8.1
I'm therefore requesting that an ebuild for this module is added to the tree. 
I'll attach an ebuild which I hope is suitable. (feedback welcomed!)

This module in turn depends on:
Text::vFile::asData      (bug 235899)
Class::Accessor::Chained (bug 235898)

Many thanks.
Comment 1 Nick Prater 2008-08-27 11:17:35 UTC
Created attachment 163886 [details]
Data-ICal-0.13.ebuild
Comment 2 Torsten Veller (RETIRED) gentoo-dev 2008-09-05 10:54:59 UTC
Why did you add SRC_TEST="no" to the ebuild?
Comment 3 Nick Prater 2008-09-07 12:46:14 UTC
> Why did you add SRC_TEST="no" to the ebuild?

I think this is a misunderstanding on my part:

The build_requires: section of META.yml specifies a number of Test:: modules. I did not want to create dependencies on these modules by setting SRC_TEST="yes".

In fact, I have just tried setting SRC_TEST="yes" on my system. This ebuild still installs fine on my system, despite missing the Test::Warn and Test::LongString modules, although I get a message saying "Test phase [not enabled]".

I guess there must be some magic that only runs the tests if all the required modules are already installed. Otherwise the tests are skipped. Would this make sense? I must do some more reading and investigation to understand this...
Comment 4 Torsten Veller (RETIRED) gentoo-dev 2008-09-07 13:55:03 UTC
(In reply to comment #3)
> > Why did you add SRC_TEST="no" to the ebuild?
> 
> I think this is a misunderstanding on my part:
> 
> The build_requires: section of META.yml specifies a number of Test:: modules. I
> did not want to create dependencies on these modules by setting SRC_TEST="yes".

It's a little ugly but works:
IUSE=test
RDEPEND="..."
DEPEND="$RDEPEND ... test? ( dev-perl/Test-... )"

> In fact, I have just tried setting SRC_TEST="yes" on my system. This ebuild

The perl-module.eclass tests for SRC_TEST=do. So if test is in FEATURES and SRC_TEST=do it will run the tests.
If this is a good solution is a discussion for another bug.
All other ebuilds would use RESTRICT=test if the test shouldn't be run.

> still installs fine on my system, despite missing the Test::Warn and
> Test::LongString modules, although I get a message saying "Test phase [not
> enabled]".
> 
> I guess there must be some magic that only runs the tests if all the required
> modules are already installed. Otherwise the tests are skipped. Would this make
> sense? I must do some more reading and investigation to understand this...

I add SRC_TEST=no if there is a reason to not run the test (like online access, X stuff,.... too lazy to think about a fix...).
Comment 5 Nick Prater 2008-09-07 17:30:35 UTC
Created attachment 164836 [details]
Added support for tests

Thanks for the explanation and suggestions - they've helped me understand much more.

I've attached a revised ebuild with SRC_TEST="do" and conditional dependencies for the modules required to run tests.

I've tested this ebuild on my system, first with tests disabled, then with tests enabled. Once the additional dependencies were installed, the tests completed successfully.
Comment 6 Torsten Veller (RETIRED) gentoo-dev 2008-09-08 11:02:30 UTC
In the tree. Thanks