[Nix-dev] [Nix-commits] [NixOS/nixpkgs] c6a2a1: ffmpeg: Update to latest version 0.11.1.

Vladimír Čunát vcunat at gmail.com
Tue Jul 24 19:09:51 CEST 2012


On 07/24/2012 06:48 PM, Eelco Dolstra wrote:
> On 24/07/12 12:09, Vladimír Čunát wrote:
>> Right, ffmpeg changes should IMHO be in a separate branch anyway (e.g.
>> stdenv),
>
> Not stdenv.  It's better to keep separate concerns in separate branches.

Certainly, that's better. I just meant that we don't want everyone to 
change so many hashes for everyone, which used to be the purpose of 
stdenv-updates.


>> What do you (anyone) think about the kind of solution I tried in
>> https://github.com/vcunat/nixpkgs/commits/vlada/video2 ? Would this be
>> acceptable?
>
> I don't like passing version arguments to package functions because it's not
> clear from the function interface what values are acceptable (i.e. for the
> ffmpeg function, you have to read the source to see what values of "branch" are
> allowed).

That can be solved via a default value so you can call it without any 
parameter to get the default branch. Anyway, other packages also don't 
say whether the "ffmpeg" they want is branch 0.11 or 0.7-0.10 or what...

And here all the calls are next to each other, so you really should see 
all the possibilities (those not used don't make much sense to keep in 
the expression as we have the history).


>> Most importantly, I really dislike having several almost identical
>> expressions in the repository. Those for ffmpeg should IMO only differ
>> in some 2-5 lines and the rest is common, so I would prefer to solve
>> such situations similarly like I did, by conditioning.
>
> Well, that often actually makes it harder to manage, because if you (say) add a
> new version, you have to think very carefully if this won't break the old
> versions.  If the old versions are separate expressions, you don't have this
> problem.  It's also harder to read the expression because it's cluttered with
> "if version == ... then ..." clauses.

Some kind of switch statement would certainly be good here (I don't know 
of any). It seems better to me than five almost identical files. If I 
want to add some feature, say, the x11grab or whatever, I have to edit 
all those files, which seems bad and error-prone to me.

Of course, the less versions, the better. And the current state doesn't 
much prevent breaking stuff, as we can see :-) That's because dependent 
packages aren't much seen in the expression... but various versions 
*are* seen in my style, so you can't break some by mistake. You can 
always use some "optional" clause to only affect some of the versions if 
you want.


Vlada

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3238 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120724/d00b7f8d/attachment.bin 


More information about the nix-dev mailing list