rpm-ostree/tests/compose
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
..
yum treecompose: fix crash when "remove-from-packages" used 2016-05-27 17:06:08 +00:00
.gitignore build: Update .gitignore 2016-03-26 14:22:41 +00:00
test-repo-add-files.json tests: add tests for compose+add files 2016-04-27 20:21:12 +00:00
test-repo.json compose: Introduce variable substitution for ${basearch} 2016-04-28 15:38:53 +00:00
test-repo.repo.in tests: Add test for compose 2015-04-13 10:43:24 +02:00