Pacman 3.5.0 Released

It is time for another major pacman release. Here is a brief overview of the new features:

The feature that will be immediately noticed on the pacman upgrade is the change of database format. This was a step towards reducing the large number of small files pacman had to read, which was a major cause of performance issues (particularly on systems with slow hard-drives). Two major changes occurred: the sync database became a single file per repo and the local database had some of its files merged. The sync databases are now read directly from the database (compressed tarball) that is downloaded from the mirrors. No extraction means no fragmentation of the database across the filesystem. The “depends” and “desc” files in the local package database were merged into one file as there was actually little point for them being separate. This results in an approximately 30% less files to be read for the local database on an average system. A script (pacman-db-upgrade) is provided to preform this database upgrade and pacman will abort if a database in the old format is found. Any scripts that read directly from the database will need to be updated to deal with these new formats. Or better yet, they could be written to use libalpm which would make them robust to future changes (the local database format could be improved further). Combine the database changes with other speed enhancements (improved internal storage of package caches, faster pkgname/depends searches) and this pacman release is notably faster.

Until now, a great way to break your system during an update was to run out of disk space. Pacman now attempts to avoid this in two ways. Firstly, it will (optionally) calculate the amount of disk space needed to perform the update/install and check that your partitions have enough room. Doing this calculation is actually fairly involved and I’m sure we will encounter some case of a filesystem and platform combination that we have not tested where this calculation is not correct… I know for certain that it does not work in chroots. The “solution” in these cases is to disable this check in pacman.conf and make a bug report with all the details needed to replicate the issue (except the chroot case). As a second line of defence for disk space issues, pacman will report any extraction error it encounters and attempt to stop installation on the important ones.

A much missed feature in pacman-3.4 was the ability to select which packages you wanted to install from a group. Well, that is back and better than ever! Additionally, the selection dialog is also extended to package provisions, allowing the user to select which provider package they want installed rather than pacman just installing the first one it found.

A feature that will primarily affect packagers is the removal of the “force” option that would result in packages being installed from the repo even if the version was not considered newer by pacman. This was useful for packages with weird versioning schemes (is that “a” for alpha or the first patch level?), but it resulted in strange update behaviour for those who had built themselves newer versions of a package locally. This has been replaced by the use of an optional “epoch” value in the package version – so a “complete” package version looks like epoch:pkgver-pkgrel. If present, the value of the epoch field takes precedent over the rest of the package version.

The main addition to makepkg is the ability to run a check() function between build() and package(). This optional function is useful for running package test suites (or even better, not running them in the early builds when bootstrapping a package). Other changes include the removal of STRIP_DIRS (now all files are stripped by default), adding a buildflags option to disable CFLAGS etc, and allowing the use of $pkgname in split package functions.

For a more complete list of changes in pacman-3.5, see the NEWS and README files in the source code.

9 thoughts on “Pacman 3.5.0 Released

  1. Congrats. Very much appreciated. Especially the db format change sounds really important.
    Its also very welcome having group package selection back.
    The pacman gang is doing an amazing collaborative job. Have fun!

  2. Great stuff =D thank you for all the work on pacman, it’s a wonderful system.
    (But I do hope signed packages are next on the priority list?)

  3. Cool! But does this mean that the repo.db.tar.gz format also changes? (I couldn’t find any relevant changes to repo-add doing a quick check).

    • No change at all to the format. pacman will download “repo.db” (note the lack of extension) to /var/lib/pacman/sync, so you need to a symlink to repo.db.tar.gz is present. repo-add from pacman-3.4 onwards automatically creates that symlink so that should not be an issue. This allows changing the database compression to anything libarchive and repo-add supports (once all users are switched to pacman-3.5), which is currently .gz, .xz and .bz2.

  4. How do I get this wondrous thing? I haven’t seen it available in my repo yet. Do I simply need to wait?

    • It is currently in the [testing] repo. There are a couple of (minor) bugs that have been found, so I guess 3.5.1 will be released in a couple of weeks and then it will move to [core].

    • Yes, search is very fast now… like Gentoo’s eix. No indexing is being done?