hughsie/libhif — pull request #4 by cgwalters (2014-06-16 15:46:39+00:00)
Title: context: Only add system repository if it exists

For "rpm-ostree compose tree" libhif will be used to construct roots
from scratch. In that case there's no system repository, and
unfortunately hawkey just tells us "I/O error", so we can't sanely
conditionalize on something like ENOENT.

Therefore, a simple hack is to just check for /usr being a directory
in the installroot; if it exists, then there's already a root.