[gentoo-dev] Change USE flags when compiling with FEATURES=test

2012-03-17 Thread Matt Turner
So you run set FEATURES=test to run a package's test suite during
keywording. Later, you emerge -vuNDa ... and portage wants to reemerge
that package with USE=-test.

Can't we avoid this somehow? I presume in the vast majority of cases
emerging with FEATURES/USE=test doesn't actually affect what's
installed.

I'd guess we'd need to be able to remove 'test' from the set of IUSE
and have a new helper function to check if 'test' is in FEATURES?

Matt



Re: [gentoo-dev] Change USE flags when compiling with FEATURES=test

2012-03-17 Thread Ciaran McCreesh
On Sat, 17 Mar 2012 15:33:42 -0400
Matt Turner matts...@gentoo.org wrote:
 So you run set FEATURES=test to run a package's test suite during
 keywording. Later, you emerge -vuNDa ... and portage wants to reemerge
 that package with USE=-test.
 
 Can't we avoid this somehow? I presume in the vast majority of cases
 emerging with FEATURES/USE=test doesn't actually affect what's
 installed.
 
 I'd guess we'd need to be able to remove 'test' from the set of IUSE
 and have a new helper function to check if 'test' is in FEATURES?

If you want that, USE_EXPAND_IGNORE_CHANGES, like USE_EXPAND_HIDDEN,
would be cleaner. 'test' is already too special.

-- 
Ciaran McCreesh


signature.asc
Description: PGP signature


Re: [gentoo-dev] Change USE flags when compiling with FEATURES=test

2012-03-17 Thread Kent Fredric
On 18 March 2012 08:33, Matt Turner matts...@gentoo.org wrote:
 So you run set FEATURES=test to run a package's test suite during
 keywording. Later, you emerge -vuNDa ... and portage wants to reemerge
 that package with USE=-test.

 Can't we avoid this somehow? I presume in the vast majority of cases
 emerging with FEATURES/USE=test doesn't actually affect what's
 installed.

Not so, there are a lot of things where USE=test pulls in extra
dependencies, dev-perl/* is rife with them.

And I've seen some things where USE=test changes behaviour of the
compile phase sufficient that enabling USE=test *could* change the
code compiled as well.

But I think I see where you're comming from.

I just can't see a reasonable cover-all approach that wouldn't really
be a large nasty package-manager specific hack.

 I'd guess we'd need to be able to remove 'test' from the set of IUSE
 and have a new helper function to check if 'test' is in FEATURES?

And besides, I'll reinstall a package if so much as the MD5 changes
due to somebody adding keywording for an arch I don't use ;)

I think what would be more practical is a sane way to enable
FEATURES= on a per-package level like USE flags in portage, then you
could enable FEATURES=test for that one package and it would always
build that package with USE=test

Paludis does this already via an extended use.conf syntax:

   =dev-foo/bar-1.2  flag  -otherflag  BUILD_OPTIONS: optional_tests
LINGUAS: en

Perhaps portage does this already and I'm hiding under a rock, but I
haven't seen it, and I've just cheated the system with

linguas_en

and other similar manual USE_EXPAND tricks in my package.use

-- 
Kent

perl -e  print substr( \edrgmaM  SPA NOcomil.ic\\@tfrken\, \$_ * 3,
3 ) for ( 9,8,0,7,1,6,5,4,3,2 );



Re: [gentoo-dev] Change USE flags when compiling with FEATURES=test

2012-03-17 Thread Richard Yao
On 03/17/12 15:43, Kent Fredric wrote:
 On 18 March 2012 08:33, Matt Turner matts...@gentoo.org wrote:
 So you run set FEATURES=test to run a package's test suite during
 keywording. Later, you emerge -vuNDa ... and portage wants to reemerge
 that package with USE=-test.

 Can't we avoid this somehow? I presume in the vast majority of cases
 emerging with FEATURES/USE=test doesn't actually affect what's
 installed.
 
 Not so, there are a lot of things where USE=test pulls in extra
 dependencies, dev-perl/* is rife with them.
 
 And I've seen some things where USE=test changes behaviour of the
 compile phase sufficient that enabling USE=test *could* change the
 code compiled as well.

To expand on this, I know that sys-devel/gcc will save a report of the
make check results to the filesystem when FEATURES=test is enabled.



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] Change USE flags when compiling with FEATURES=test

2012-03-17 Thread Alexandre Rostovtsev
On Sat, 2012-03-17 at 15:33 -0400, Matt Turner wrote:
 So you run set FEATURES=test to run a package's test suite during
 keywording. Later, you emerge -vuNDa ... and portage wants to reemerge
 that package with USE=-test.
 
 Can't we avoid this somehow? I presume in the vast majority of cases
 emerging with FEATURES/USE=test doesn't actually affect what's
 installed.
 
 I'd guess we'd need to be able to remove 'test' from the set of IUSE
 and have a new helper function to check if 'test' is in FEATURES?

Typically test is added to IUSE only when building and/or running the
test suite requires specifying additional dependencies. So if we remove
test from IUSE, we would need to allow DEPEND to have FEATURES-based
conditionals. Which would probably mean a new EAPI.

I think the easier solution is to modify portage to ignore changes in
the test USE flag when doing emerge --newuse.

-Alexandre.




Re: [gentoo-dev] Change USE flags when compiling with FEATURES=test

2012-03-17 Thread Zac Medico
On 03/17/2012 12:51 PM, Alexandre Rostovtsev wrote:
 I think the easier solution is to modify portage to ignore changes in
 the test USE flag when doing emerge --newuse.

Yes, that's part of the plan [1] discussed in bug #373209.

[1] https://bugs.gentoo.org/show_bug.cgi?id=373209#c3
-- 
Thanks,
Zac