[pacman-dev] Unifying package information files - Was: Repository management

Allan McRae allan at archlinux.org
Wed May 17 05:06:38 UTC 2017

On 11/05/17 07:54, Andrew Gregory wrote:
>> 2) Do we need a better (read "more easily maintainable") tool for
>> handling database generation and updates?  libalpm already can read in
>> information package files, so we could add libalpm/db_write.c with the
>> database creation functions.   Should we unify our repo format with our
>> local database format which we already write?
> I would love to see us drop the ini-style .PKGINFO format, if that's
> what you mean.  Even without adding a database writer to libalpm,
> having two formats for the exact same data is unnecessary and leads to
> inconsistencies between the two.

I was not considering .PKGINFO when I wrote that, although it is a good

Currently we have the following:

Notice the local and sync database formats are near identical (there are
some field differences), but we use two different functions to read
them, where the main differences is what fgets variant gets used - this
is what I was talking about unifying.  We already have the ability to
write that format in libalpm given we write the local db entry, so could
extend that as the basis of writing repo databases via a libalpm tool too.

So, expanding on this idea.  It would be great to have a single package
information reader that covered .PKGINFO files, local database files,
and sync database files.  To do this .PKGINFO files (and assumably
.BUILDINFO) would need to change to the same format as the database files.

How would we make such a transition?  Add a new file into the package
(e.g. .PACKAGE) that has the new format.  Have pacman read the new
format if available, but fall back to old format if it is not available.
 Then wait a release or two to remove support for the old format?


More information about the pacman-dev mailing list