Skip to content

Define a fallback for the cache when $HOME or $XDG_CACHE_HOME aren't set #1951

Description

@achilleas-k

https://github.com/osbuild/images/blob/f52a9fbbf009b3d30322dde19ff63b6e4ec92587/pkg/manifestgen/manifestgen.go#L231-L241

When running image-builder-cli through osbuild-composer, $HOME is not set, which makes getting $XDG_CACHE_HOME fail with an error.

From image-builder-cli's source tree:

› go build -o bin/ ./cmd/image-builder && HOME="" ./bin/image-builder manifest --distro fedora-42 --arch x86_64 server-qcow2
error: $HOME is not defined

Having an --rpmmd option in ib-cli would work around this. Now the only workaround is to set $XDG_CACHE_HOME when calling image-builder. But there should also be some fallback logic here for such cases as well.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions