* [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
@ 2015-01-20 7:57 Michał Górny
2015-01-20 8:18 ` Alexis Ballier
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Michał Górny @ 2015-01-20 7:57 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1938 bytes --]
Hi,
Since you didn't like the previous hacky idea, here's a new one.
The basic flags correspond to features and are used if the relevant
support is optional:
avcodec - Enables audio/video decoding support via libavcodec
(ffmpeg/libav)
postproc - Enable image post-processing via libpostproc
(ffmpeg/libpostproc)
The extended flags correspond to implementations and are used
if the package in question supports more than one implementation.
ffmpeg - Prefer ffmpeg as libavcodec/libpostproc provider
libav - Prefer libav and libpostproc as libavcodec and libpostproc
providers respectively
So a package supporting both providers has:
IUSE="ffmpeg libav"
RDEPEND="
ffmpeg? ( media-video/ffmpeg:= )
libav? ( media-video/libav:= [media-libs/libpostproc:=] )"
REQUIRED_USE="^^ ( ffmpeg libav )"
And a package with optional support for both ends up like:
IUSE="avcodec postproc ffmpeg libav"
RDEPEND="
avcodec? (
ffmpeg? ( media-video/ffmpeg:= )
libav? ( media-video/libav:= )
)
postproc? (
ffmpeg? ( media-video/ffmpeg:= )
libav? ( media-libs/libpostproc:= )
)"
REQUIRED_USE="
avcodec? ( ^^ ( ffmpeg libav ) )
postproc? ( ^^ ( ffmpeg libav ) )
ffmpeg? ( || ( avcodec postproc ) )
libav? ( || ( avcodec postproc ) )"
Of course, if only one of the libs is needed or if both are controlled
by the same switch everything gets much simpler :).
This is likely the most verbose and fool-proof solution. People will
still be able to set USE=ffmpeg or USE=libav globally to express their
preferences, and Portage will suggest USE=avcodec as appropriate.
It should be noted that USE=avcodec follows suit of USE=postproc used
in 5 packages, and is already a local flag in media-video/vlc.
What do you think now?
--
Best regards,
Michał Górny
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
2015-01-20 7:57 [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav) Michał Górny
@ 2015-01-20 8:18 ` Alexis Ballier
2015-01-20 12:41 ` Ulrich Mueller
2015-01-20 12:46 ` Andreas K. Huettel
2 siblings, 0 replies; 11+ messages in thread
From: Alexis Ballier @ 2015-01-20 8:18 UTC (permalink / raw
To: Michał Górny; +Cc: gentoo-dev
On Tue, 20 Jan 2015 08:57:43 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> Hi,
>
> Since you didn't like the previous hacky idea, here's a new one.
>
> The basic flags correspond to features and are used if the relevant
> support is optional:
>
> avcodec - Enables audio/video decoding support via libavcodec
> (ffmpeg/libav)
> postproc - Enable image post-processing via libpostproc
> (ffmpeg/libpostproc)
>
I crearly prefer the other prop. We have: libavcodec, libavdevice,
libavfilter, libavformat, libavresample, libavutil, libpostproc,
libswresample, libswscale. Do you want a useflag for each of them ? Can
you tell me on top of your head which one will force ffmpeg and which
one will force libav ?
Also, avcodec is just a codec library that, alone, is mostly useless for
e.g. a video player: you need a demuxer to read your files, which
demuxer is in libavformat...
Alexis.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
2015-01-20 7:57 [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav) Michał Górny
2015-01-20 8:18 ` Alexis Ballier
@ 2015-01-20 12:41 ` Ulrich Mueller
2015-01-20 17:25 ` Ciaran McCreesh
2015-01-20 12:46 ` Andreas K. Huettel
2 siblings, 1 reply; 11+ messages in thread
From: Ulrich Mueller @ 2015-01-20 12:41 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
>>>>> On Tue, 20 Jan 2015, Michał Górny wrote:
> REQUIRED_USE="
> avcodec? ( ^^ ( ffmpeg libav ) )
> postproc? ( ^^ ( ffmpeg libav ) )
> ffmpeg? ( || ( avcodec postproc ) )
> libav? ( || ( avcodec postproc ) )"
Seriously? You expect users to figure out [1] what combinations of
USE flags will work for such an ebuild?
There are good reasons why the devmanual [2] advises against such
overuse of REQUIRED_USE:
| Note: In order to avoid forcing users to micro-manage flags too
| much, REQUIRED_USE should be used sparingly. Follow the normal
| policy whenever it is possible to do a build that will presumably
| suit the user's needs.
Ulrich
[1] https://en.wikipedia.org/wiki/Zebra_Puzzle
[2] http://devmanual.gentoo.org/general-concepts/use-flags/index.html#conflicting-use-flags
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
2015-01-20 7:57 [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav) Michał Górny
2015-01-20 8:18 ` Alexis Ballier
2015-01-20 12:41 ` Ulrich Mueller
@ 2015-01-20 12:46 ` Andreas K. Huettel
2015-01-20 14:41 ` Alec Ten Harmsel
2 siblings, 1 reply; 11+ messages in thread
From: Andreas K. Huettel @ 2015-01-20 12:46 UTC (permalink / raw
To: gentoo-dev
Am Dienstag 20 Januar 2015, 08:57:43 schrieb Michał Górny:
>
> So a package supporting both providers has:
>
> IUSE="ffmpeg libav"
> RDEPEND="
> ffmpeg? ( media-video/ffmpeg:= )
> libav? ( media-video/libav:= [media-libs/libpostproc:=] )"
> REQUIRED_USE="^^ ( ffmpeg libav )"
>
> And a package with optional support for both ends up like:
>
> IUSE="avcodec postproc ffmpeg libav"
> RDEPEND="
> avcodec? (
> ffmpeg? ( media-video/ffmpeg:= )
> libav? ( media-video/libav:= )
> )
> postproc? (
> ffmpeg? ( media-video/ffmpeg:= )
> libav? ( media-libs/libpostproc:= )
> )"
> REQUIRED_USE="
> avcodec? ( ^^ ( ffmpeg libav ) )
> postproc? ( ^^ ( ffmpeg libav ) )
> ffmpeg? ( || ( avcodec postproc ) )
> libav? ( || ( avcodec postproc ) )"
>
No.
--
Andreas K. Huettel
Gentoo Linux developer
kde, council
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
2015-01-20 12:46 ` Andreas K. Huettel
@ 2015-01-20 14:41 ` Alec Ten Harmsel
0 siblings, 0 replies; 11+ messages in thread
From: Alec Ten Harmsel @ 2015-01-20 14:41 UTC (permalink / raw
To: gentoo-dev
On 01/20/2015 07:46 AM, Andreas K. Huettel wrote:
> Am Dienstag 20 Januar 2015, 08:57:43 schrieb Michał Górny:
>> So a package supporting both providers has:
>>
>> IUSE="ffmpeg libav"
>> RDEPEND="
>> ffmpeg? ( media-video/ffmpeg:= )
>> libav? ( media-video/libav:= [media-libs/libpostproc:=] )"
>> REQUIRED_USE="^^ ( ffmpeg libav )"
>>
>> And a package with optional support for both ends up like:
>>
>> IUSE="avcodec postproc ffmpeg libav"
>> RDEPEND="
>> avcodec? (
>> ffmpeg? ( media-video/ffmpeg:= )
>> libav? ( media-video/libav:= )
>> )
>> postproc? (
>> ffmpeg? ( media-video/ffmpeg:= )
>> libav? ( media-libs/libpostproc:= )
>> )"
>> REQUIRED_USE="
>> avcodec? ( ^^ ( ffmpeg libav ) )
>> postproc? ( ^^ ( ffmpeg libav ) )
>> ffmpeg? ( || ( avcodec postproc ) )
>> libav? ( || ( avcodec postproc ) )"
>>
> No.
>
As a user, I completely agree with Andreas. What's wrong with a
dependency on virtual/ffmpeg? Let's say I want to install mpv; if I
completely ignore the upstream's recommendation of ffmpeg and instead
use libav to satisfy a virtual/ffmpeg dependency, that's my problem, not
the Gentoo developers (in my opinion).
I've written a few ebuilds, and by no means am even close to competent.
If they get more and more complex like this, why should I even bother
ever learning? I feel like ebuilds should be as simple as possible, to
keep devs sane and to interest more people. Another downside is that a
much more verbose solution like this will make dependency resolution
take longer imnho.
Alec
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
2015-01-20 12:41 ` Ulrich Mueller
@ 2015-01-20 17:25 ` Ciaran McCreesh
2015-01-20 20:02 ` Zac Medico
0 siblings, 1 reply; 11+ messages in thread
From: Ciaran McCreesh @ 2015-01-20 17:25 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
On Tue, 20 Jan 2015 13:41:21 +0100
Ulrich Mueller <ulm@gentoo.org> wrote:
> Seriously? You expect users to figure out [1] what combinations of
> USE flags will work for such an ebuild?
Why don't we just admit that Brian was horribly wrong, scrap
REQUIRED_USE in the next EAPI, and go back to the sensible,
tried-and-tested way of doing it that I proposed to begin with?
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
2015-01-20 17:25 ` Ciaran McCreesh
@ 2015-01-20 20:02 ` Zac Medico
2015-01-20 20:05 ` Ciaran McCreesh
0 siblings, 1 reply; 11+ messages in thread
From: Zac Medico @ 2015-01-20 20:02 UTC (permalink / raw
To: gentoo-dev
On 01/20/2015 09:25 AM, Ciaran McCreesh wrote:
> On Tue, 20 Jan 2015 13:41:21 +0100
> Ulrich Mueller <ulm@gentoo.org> wrote:
>> Seriously? You expect users to figure out [1] what combinations of
>> USE flags will work for such an ebuild?
>
> Why don't we just admit that Brian was horribly wrong, scrap
> REQUIRED_USE in the next EAPI, and go back to the sensible,
> tried-and-tested way of doing it that I proposed to begin with?
Regardless of whether or not (or how) we choose to apply REQUIRED_USE to
various cases, I think we should keep REQUIRED_USE around, since having
a machine-readable representation of these constraints can potentially
be extremely useful to dependency resolvers.
--
Thanks,
Zac
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
2015-01-20 20:02 ` Zac Medico
@ 2015-01-20 20:05 ` Ciaran McCreesh
2015-01-20 20:12 ` Zac Medico
0 siblings, 1 reply; 11+ messages in thread
From: Ciaran McCreesh @ 2015-01-20 20:05 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
On Tue, 20 Jan 2015 12:02:38 -0800
Zac Medico <zmedico@gentoo.org> wrote:
> On 01/20/2015 09:25 AM, Ciaran McCreesh wrote:
> > On Tue, 20 Jan 2015 13:41:21 +0100
> > Ulrich Mueller <ulm@gentoo.org> wrote:
> >> Seriously? You expect users to figure out [1] what combinations of
> >> USE flags will work for such an ebuild?
> >
> > Why don't we just admit that Brian was horribly wrong, scrap
> > REQUIRED_USE in the next EAPI, and go back to the sensible,
> > tried-and-tested way of doing it that I proposed to begin with?
>
> Regardless of whether or not (or how) we choose to apply REQUIRED_USE
> to various cases, I think we should keep REQUIRED_USE around, since
> having a machine-readable representation of these constraints can
> potentially be extremely useful to dependency resolvers.
[evidence needed]
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
2015-01-20 20:05 ` Ciaran McCreesh
@ 2015-01-20 20:12 ` Zac Medico
2015-01-20 20:15 ` Ciaran McCreesh
0 siblings, 1 reply; 11+ messages in thread
From: Zac Medico @ 2015-01-20 20:12 UTC (permalink / raw
To: gentoo-dev
On 01/20/2015 12:05 PM, Ciaran McCreesh wrote:
> On Tue, 20 Jan 2015 12:02:38 -0800
> Zac Medico <zmedico@gentoo.org> wrote:
>> On 01/20/2015 09:25 AM, Ciaran McCreesh wrote:
>>> On Tue, 20 Jan 2015 13:41:21 +0100
>>> Ulrich Mueller <ulm@gentoo.org> wrote:
>>>> Seriously? You expect users to figure out [1] what combinations of
>>>> USE flags will work for such an ebuild?
>>>
>>> Why don't we just admit that Brian was horribly wrong, scrap
>>> REQUIRED_USE in the next EAPI, and go back to the sensible,
>>> tried-and-tested way of doing it that I proposed to begin with?
>>
>> Regardless of whether or not (or how) we choose to apply REQUIRED_USE
>> to various cases, I think we should keep REQUIRED_USE around, since
>> having a machine-readable representation of these constraints can
>> potentially be extremely useful to dependency resolvers.
>
> [evidence needed]
>
REQUIRED_USE is already successfully used to apply constraints that
would otherwise need to be enforced by executing shell code in
pkg_pretend. I think it's obvious that the declarative and
machine-readable nature of REQUIRED_USE make if preferable to using
pkg_pretend in many cases.
--
Thanks,
Zac
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
2015-01-20 20:12 ` Zac Medico
@ 2015-01-20 20:15 ` Ciaran McCreesh
2015-01-20 20:23 ` Zac Medico
0 siblings, 1 reply; 11+ messages in thread
From: Ciaran McCreesh @ 2015-01-20 20:15 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 940 bytes --]
On Tue, 20 Jan 2015 12:12:32 -0800
Zac Medico <zmedico@gentoo.org> wrote:
> >> Regardless of whether or not (or how) we choose to apply
> >> REQUIRED_USE to various cases, I think we should keep REQUIRED_USE
> >> around, since having a machine-readable representation of these
> >> constraints can potentially be extremely useful to dependency
> >> resolvers.
> >
> > [evidence needed]
>
> REQUIRED_USE is already successfully used to apply constraints that
> would otherwise need to be enforced by executing shell code in
> pkg_pretend. I think it's obvious that the declarative and
> machine-readable nature of REQUIRED_USE make if preferable to using
> pkg_pretend in many cases.
It's not obvious at all. The evidence so far suggests that good human
readable messages are important, and that if we're ever going to get
automated resolution then we'll need a new not-SAT-based format anyway.
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav)
2015-01-20 20:15 ` Ciaran McCreesh
@ 2015-01-20 20:23 ` Zac Medico
0 siblings, 0 replies; 11+ messages in thread
From: Zac Medico @ 2015-01-20 20:23 UTC (permalink / raw
To: gentoo-dev
On 01/20/2015 12:15 PM, Ciaran McCreesh wrote:
> On Tue, 20 Jan 2015 12:12:32 -0800
> Zac Medico <zmedico@gentoo.org> wrote:
>>>> Regardless of whether or not (or how) we choose to apply
>>>> REQUIRED_USE to various cases, I think we should keep REQUIRED_USE
>>>> around, since having a machine-readable representation of these
>>>> constraints can potentially be extremely useful to dependency
>>>> resolvers.
>>>
>>> [evidence needed]
>>
>> REQUIRED_USE is already successfully used to apply constraints that
>> would otherwise need to be enforced by executing shell code in
>> pkg_pretend. I think it's obvious that the declarative and
>> machine-readable nature of REQUIRED_USE make if preferable to using
>> pkg_pretend in many cases.
>
> It's not obvious at all. The evidence so far suggests that good human
> readable messages are important, and that if we're ever going to get
> automated resolution then we'll need a new not-SAT-based format anyway.
Nothing stops us from using pkg_pretend right now. Since REQUIRED_USE
remains useful, I would suggest that we keep it around until we have
implemented a replacement that allows for automated resolution.
--
Thanks,
Zac
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-01-20 20:23 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 7:57 [gentoo-dev] RFCv2: USE=avcodec (+ USE=ffmpeg/libav) Michał Górny
2015-01-20 8:18 ` Alexis Ballier
2015-01-20 12:41 ` Ulrich Mueller
2015-01-20 17:25 ` Ciaran McCreesh
2015-01-20 20:02 ` Zac Medico
2015-01-20 20:05 ` Ciaran McCreesh
2015-01-20 20:12 ` Zac Medico
2015-01-20 20:15 ` Ciaran McCreesh
2015-01-20 20:23 ` Zac Medico
2015-01-20 12:46 ` Andreas K. Huettel
2015-01-20 14:41 ` Alec Ten Harmsel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox