mirror of
https://github.com/containers/podman.git
synced 2025-08-01 04:42:20 +08:00
Revert "Resolve symlink path for qemu directory if possible"
This reverts commit 6b6458916eaa51f0dbbcfeccd740706697697ad3 (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:
@ -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 {
|
||||
if err == nil {
|
||||
return filepath.Clean(filepath.Join(filepath.Dir(execPath), "..", "share", "qemu"))
|
||||
}
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user