tree-wide: use an absolute path to dnf-json

Previously, all the osbuild-composer tools must be run from a directory with
dnf-json. This was often confusing, especially with the dnf-json-tests. This
commit changes the path to be absolute, so this is no longer an issue.
This commit is contained in:
Ondřej Budai 2020-05-19 11:04:34 +02:00 committed by Tom Gundersen
parent b93df4b524
commit c00cf1ac11
4 changed files with 9 additions and 7 deletions

View file

@ -87,9 +87,7 @@ func main() {
log.Fatal("CACHE_DIRECTORY is not set. Is the service file missing CacheDirectory=?")
}
// osbuild-composer must be run in /usr/libexec/osbuild-composer directory,
// therefore use ./dnf-json as the path to dnf-json.
rpm := rpmmd.NewRPMMD(path.Join(cacheDirectory, "rpmmd"), "./dnf-json")
rpm := rpmmd.NewRPMMD(path.Join(cacheDirectory, "rpmmd"), "/usr/libexec/osbuild-composer/dnf-json")
distros, err := distro.NewRegistry(fedora31.New(), fedora32.New(), rhel8.New())
if err != nil {