Alexis Ballier kirjoitti:
On Tue, 23 Sep 2008 23:33:44 +0300
Petteri Räty <[EMAIL PROTECTED]> wrote:

Bo Ørsted Andresen kirjoitti:
On Monday 22 September 2008 22:25:20 Petteri Räty wrote:
If you mean something like

    built_with_use cat/foo coolfeature || ewarn "bar will be more
useful if you rebuild cat/foo with USE=coolfeature"
then you can use

    has_version 'cat/foo[coolfeature]' || ...

instead.
What does this report if cat/foo does not have coolfeature use
flag in some version? Meaning can this support cases which need
--missing true.
False. If for instance coolfeature was made optional in >=pv you
can use logic like:

if has_version '>=cat/foo-pv' && ! has_version
'cat/foo[coolfeature]'; then ewarn '...'
fi

I think this should cover all the current functionality with built_with_use.

This is just an ugly hack. Think about a package that has coolfeature
useflag removed and enabled by default for a couple of releases because
it wouldn't build without it and once upstream sorted out everything
the useflag is coming back. Missing useflags that are assumed to be
enabled have nothing to do with the package version being greater than
a given number.

I would *really* prefer having big warnings when using built_with_use
in EAPI 2; that way we can see how things are in practice and then
maybe make built_with_use die for a later eapi or once all the tree is
converted to eapi 2 remove it.

Alexis.

Well we could replace the die with eerror but eventually we should get rid of vdb access directly by ebuilds. Maybe the next EAPI should add something similar to portageq as an abstraction layer.

[EMAIL PROTECTED] /usr/portage/eclass $ portageq metadata / installed $(portageq match / sys-devel/gcc:4.3) USE
elibc_glibc gcj kernel_linux libffi openmp userland_GNU x86

Regards,
Petteri

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to