An addition to my previous mail.

> I don't say that name+version should identify a package, but I think it
> would be very convenient to have an ID for a package definition.  For
> example now manifest may tell that "out" of a "guile-2.0.11" package is
> installed but there are 2 "guile-2.0.11" packages out there and it's
> impossible to distinguish those.  And vice versa when I list available
> packages I want to see my installed outputs only for the right packages,
> not for all packages with the same name+version.
>
> What if to make some ‘get-package-by-id’ function that will always
> return a single package?  And there is no need to add IDs for all
> package definitions, as most of them are identified with name+version
> already.  What I suggest is to add an optional “postfix” field to
> <package> record, so that a combination “name+version+[postfix]” will be
> unique and will be returned by ‘package-id’ like this:
>
>   (package-id #<package guile-2.0.11 gnu/packages/guile.scm>)  ==> 
> "guile-2.0.11"
>   (package-id #<package guile-2.0.11 gnu/packages/base.scm>)   ==> 
> "guile-2.0.11_base"

Perhaps it would be better to have a ‘unique-name’ field that defaults
to a ‘name’ field if not specified, so ‘unique-name+version’ pair will
identify a package.

Reply via email to