mirror of https://github.com/containers/podman.git
Revert "Resolve symlink path for qemu directory if possible"
This reverts commit 6b6458916e (Resolve
symlink path for qemu directory if possible).
Fully resolving the symlink to qemu solves some issues for
aarch64-darwin nix with regards to finding `edk2-aarch64-code.fd`, but
unfortunately the fully resolved path includes the version number,
making it so that even patch updates break the path to
homebrew-installed qemu files.
Fixes https://github.com/containers/podman/issues/18111
[NO NEW TESTS NEEDED]
Signed-off-by: Nathan Henrie <nate@n8henrie.com>
This commit is contained in:
parent
3c53621885
commit
6014f26c47
|
|
@ -46,23 +46,13 @@ func getOvmfDir(imagePath, vmName string) string {
|
|||
*/
|
||||
func getEdk2CodeFdPathFromQemuBinaryPath() string {
|
||||
cfg, err := config.Default()
|
||||
if err != nil {
|
||||
return ""
|
||||
if err == nil {
|
||||
execPath, err := cfg.FindHelperBinary(QemuCommand, true)
|
||||
if err == nil {
|
||||
return filepath.Clean(filepath.Join(filepath.Dir(execPath), "..", "share", "qemu"))
|
||||
}
|
||||
}
|
||||
execPath, err := cfg.FindHelperBinary(QemuCommand, true)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
sharePath := func(path string) string {
|
||||
return filepath.Clean(filepath.Join(filepath.Dir(path), "..", "share", "qemu"))
|
||||
}
|
||||
|
||||
symlinkedPath, err := filepath.EvalSymlinks(execPath)
|
||||
if err != nil {
|
||||
return sharePath(execPath)
|
||||
}
|
||||
return sharePath(symlinkedPath)
|
||||
return ""
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue