[Exherbo-dev] Blame kloeri

Ciaran McCreesh ciaran.mccreesh at googlemail.com
Mon Jul 28 21:06:22 BST 2008


Following on from discussions over the past several days... How's about
something along these lines?

A package (which has a number of versions -- I'll say 'ID' when I want
to include the version) has a uniquely generated random string of crap
ID which never changes. You can always specify a package by using
exid/2e1c384.

Aliases refer to packages. We can have aliases like:

    alias/vim -> exid/786f519
    alias/git -> exid/2e1c384
    alias/git -> exid/9c91e8d

Unambiguous aliases are automatically expanded to their ID, and the
alias/ can be omitted. Ambiguous aliases either expand to all
matching names or give you the "ambiguous, did you mean:" list depending
upon which makes sense (e.g. query and user config files do the former,
install does the latter).

IDs have a 'preferred' name that's used when displaying them.

DEPENDENCIES can be written in their usual syntax. But at metadata
generation time, they're rewritten, so:

    DEPENDENCIES=">=alias/vim-7"

becomes:

    DEPENDENCIES=">=exid/786f519-7[(alias/vim)]"

where the [(...)] is just for ease of reading --query etc. Ambiguous
aliases aren't allowed here, so you'll need to use the icky syntax for
things with no unique alias. Only aliases from the repo plus its master
are considered here.

When installing, we copy current aliases for the thing we're installing
into the installed repo.

Tags, if we want them, are merely some kind of metadata key that can be
used for searching but not identification.

The implications are this:

* aliases can be added to a repo at any point. If an alias used to be
unambiguous but now isn't, you will first need to disambiguate any
dependencies using that alias in this repo and in any supplemental repo.

* aliases can be removed from a repo at any point. The user will still
be able to use the alias so long as they have something that was
installed having that alias. Before removing an alias, it has to be
removed from dependencies in that repo and any supplemental repo.

* the unique ID doesn't change, even across package moves and the like.
Because of metadata rewriting, DEPENDENCIES carry on working even if
aliases change.

* users can refer to a package using any alias provided by an origin
repo, or by any alias that was active when the package was installed.

-- 
Ciaran McCreesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.exherbo.org/pipermail/exherbo-dev/attachments/20080728/f0451df4/attachment.pgp>


More information about the Exherbo-dev mailing list