rpm-ostree/src
Jonathan Lebon d9e8535bcf treecompose: fix crash when "remove-from-packages" used
This works around a potential issue with libsolv if we go down the
rpmostree_get_pkglist_for_root() path. Though rpm has been using the
/usr/share/rpm location (since the RpmOstreeContext set the _dbpath
macro), the /var/lib/rpm directory will still exist, but be empty.
libsolv gets confused because it sees the /var/lib/rpm dir and doesn't
even try the /usr/share/rpm location, and eventually dies when it tries
to load the data.

So we set the symlink now. This is also what we do on boot anyway for
compatibility reasons using tmpfiles.

This also means we don't have to do the /var/lib/rpm --> /usr/share/rpm
transition during the rootfs postprocess (but we still have to clean up
db and lock files).

Also get rid of the unused pkglist variable.

NB: I used the GFile & gs APIs to mesh with the surrounding code.

Closes: #290
Approved by: cgwalters
2016-05-27 17:06:08 +00:00
..
app daemon: add TaskBegin, TaskEnd, and PercentProgress 2016-05-11 15:03:38 +00:00
daemon daemon: add TaskBegin, TaskEnd, and PercentProgress 2016-05-11 15:03:38 +00:00
lib rpm_ostree_db_diff: fix bad pointer 2016-03-21 14:40:53 +00:00
libpriv treecompose: fix crash when "remove-from-packages" used 2016-05-27 17:06:08 +00:00