On 02/02/2015 09:06 AM, Michał Górny wrote: > Hi, everyone. > > Just after the news item got published, user Wes mailed me with > a suggestion. While I think someone mentioned it earlier > in the bikesheds over ffmpeg, I have completely forgotten about it > and now I'd like to reconsider it. For this reason, I've reverted > the news item while it's still fresh and p.masked the revbumps. > > The idea is that instead of having USE=libav (that's tangential to > USE=ffmpeg and confusing) to use a USE_EXPAND like FFMPEG_IMPL taking > either ffmpeg or libav. Now, why... > > > First of all, one of the key points in my news item is that users need > to keep consistent state of USE=libav throughout all the packages. Wes > pointed out that users are more likely to consider a dedicated variable > (USE_EXPAND) in make.conf global than a regular USE flag. Which makes > it more likely for them to end up in terrible state full of blockers. > > Secondly, it avoids the confusion of having USE=ffmpeg and USE=libav > being used for completely different purposes. This is not only > confusing by users who need to set USE='ffmpeg libav' if they want > libav, but also confusing to developers who may end up using the two > flags to signify the two implementations. Think of the mess of USE='gtk > gtk3'.
I might not have followed this discussion close enough; wasn't the end result that USE='ffmpeg' uses ffmpeg and USE='libav' uses libav? As in there will be no more USE='ffmpeg libav' in the future, only USE='libav' for libav? > > FFMPEG_IMPL feels like a natural extension of USE=ffmpeg. USE=ffmpeg > tells to use ffmpeg or a replacement, FFMPEG_IMPL tells what will > exactly get used. Much less confusion. I would agree except that as far as I know ffmpeg and libav are not trying to be binary compatible. > > Fourthly, there's the case of implicity. Right now USE=-libav implies > ffmpeg. Therefore, USE=-* implies ffmpeg as well -- which is kinda > weird since it's supposedly the non-default. With this solution, USE=-* > will result in explicit error asking user to select an implementation. > > As for the downsides: > > 1. there is a number of non-meaningful flag combinations. > FFMPEG_IMPL='', FFMPEG_IMPL='ffmpeg libav'. They will have to be > blocked via REQUIRED_USE='^^ ( ffmpeg_impl_ffmpeg ffmpeg_impl_libav )'. > > 2. There is some more work to get ebuilds correct (REQUIRED_USE). > However, this is a minor issue compared to the potential mistakes in > interpretation of USE='ffmpeg' and USE='libav'. > > > What are your thoughts? > During the earlier discussion, I was of the opinion that USE='ffmpeg' should just cause a dependency on virtual/ffmpeg and that would solve all the problems. I don't think this is right, though; if ffmpeg and libav are not trying for (or actively avoiding) binary compatibility, why not treat them as separate projects and just add RDEPEND='!media-video/ffmpeg' to libav's ebuild and vice versa? Just my two cents. I'm not a developer, but this seems like the simplest solution to me. Alec