rpmmd: require the path to dnf-json to be passed in

RPMMD had hardcoded path to dnf-json helper. This required all executables
using RPMMD to be run in the directory where dnf-json was located. This commit
makes RPMMD take the path to dnf-json as an argument. This allows its
consumers to specify whichever path they want.

Not a functional change
This commit is contained in:
Ondřej Budai 2020-05-19 08:58:15 +02:00 committed by Tom Gundersen
parent 5b2c06b3da
commit b93df4b524
5 changed files with 20 additions and 14 deletions

View file

@ -137,7 +137,7 @@ func main() {
if err != nil {
panic("os.UserHomeDir(): " + err.Error())
}
rpmmd := rpmmd.NewRPMMD(path.Join(homeDir, ".cache/osbuild-composer/rpmmd"))
rpmmd := rpmmd.NewRPMMD(path.Join(homeDir, ".cache/osbuild-composer/rpmmd"), "./dnf-json")
s := store.New(&cwd, a, nil)
if s == nil {