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:
parent
5b2c06b3da
commit
b93df4b524
5 changed files with 20 additions and 14 deletions
|
|
@ -87,7 +87,9 @@ func main() {
|
|||
log.Fatal("CACHE_DIRECTORY is not set. Is the service file missing CacheDirectory=?")
|
||||
}
|
||||
|
||||
rpm := rpmmd.NewRPMMD(path.Join(cacheDirectory, "rpmmd"))
|
||||
// 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")
|
||||
|
||||
distros, err := distro.NewRegistry(fedora31.New(), fedora32.New(), rhel8.New())
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue