[pacman-dev] 'replaces' confusion

Aaron Griffin aaronmgriffin at gmail.com
Mon Feb 26 12:26:57 EST 2007


On 2/26/07, Travis Willard <travisw at wmpub.ca> wrote:
> No need to make them run a script - the difference in DB format is
> obvious enough for pacman3, on first run, to detect the 'old' format
> based on the db structure, output a message like
>
> ==> pacman has detected an older version of the database, and must
> update it. This will happen only once, please wait...
>
> and do the conversion automatically on first run.

Yeah, but that adds complexity in the fact that pacman must have code
to read the old format, and the new... and how long do we maintain
this format? It'd have to be there until all repos switch the format
(and they'd have to be converted each -Sy operation until then) AND a
new iso with pacman3 is created.

It's totally doable, but, like I said, it needs to be thought out in advance.

brain0 brought up a configurable backend at one point.  i.e.
pacman.conf:DbBackend = files

I would actually prefer some sort of method like this if we go through
and actually change the DB.  It'd be rather simple to do something
like "echo files >> /var/lib/pacman/local/.dbformat" and simply
maintain read/write routines for each backend (be_files.c already has
a setup very close to what would be needed, though adding more than
one into the library would require some extra code).

This way, we could do something like this:
read config, see "backend = sqlite", check .dbformat, see "files", do
a conversion.  If no .dbformat is specified, assume "files"... etc etc

Rather straightforward, and it allows the end user a choice as to what
DB format they use...

The REAL question here is, should the pacman 3.0 release be delayed
for something like this, or should we hold of until 3.1?




More information about the pacman-dev mailing list