1
0

fix: do not use replacefiles on opensuse 12

This commit is contained in:
dump_stack() 2023-06-17 13:36:00 +00:00
parent cfc6c1928f
commit 338e184424
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -183,8 +183,11 @@ func (suse OpenSUSE) Install(version string, headers bool) (err error) {
commands = append(commands, fmt.Sprintf(f, s...))
}
installcmd := "zypper --no-refresh -n install " +
"--replacefiles --no-recommends --force-resolution --capability"
installcmd := "zypper --no-refresh -n install "
if !strings.HasPrefix(suse.release, "12") {
installcmd += " --replacefiles"
}
installcmd += " --no-recommends --force-resolution --capability"
cmdf("%s kernel-default=%s", installcmd, version)
if headers {
cmdf("%s kernel-default-devel=%s", installcmd, version)