0

I have recently created a FreeBSD .pkg file using a custom script.

A FreeBSD .pkg file is essentially a tar archive (optionally compressed) whose first two entries are manifest files, named +MANIFEST and +COMPACT_MANIFEST. These contain all the package metadata (such as name, version, description, size, files to copy, scripts to run before or after install or uninstall). +COMPACT_MANIFEST is a stripped-down version of +MANIFEST. Some entries (including scripts and files) are found only in +MANIFEST but not in +COMPACT_MANIFEST, otherwise the two are identical.

The package I built has only a +MANIFEST but the +COMPACT_MANIFEST file is missing. Still, pkg add installed it with no issues, and pkg info shows its metadata.

However, when I recently created a new version of my package (0.2.0, as specified in +MANIFEST) and tried to pkg add it on a system that already had 0.1.0 installed, pkg reported:

the most recent version of foobar-0.1.0 is already installed

and nothing was installed. pkg add -f did install the package, and pkg info shows version 0.2.0 in its metadata.

I retried by again installing 0.1.0 (still without +COMPACT_MANIFEST), then adding a +COMPACT_MANIFEST to the 0.2.0 package and trying to install it over 0.1.0. Again, pkg gave me the same message as above and would not install anything unless invoked with -f.

This has caused me to wonder: what is +COMPACT_MANIFEST used for? Is it only used by package repositories, or does the local installer use it as well (and does it maybe fall back to +MANIFEST when +COMPACT_MANIFEST is not found)? Is the missing +COMPACT_MANIFEST the reason my system failed to detect that the version about to be installed was in fact newer than the one on the system?

0

You must log in to answer this question.

Browse other questions tagged .