fix: handle existing debian kernels correctly
This commit is contained in:
parent
b2383ba442
commit
e0b63aee1a
@ -329,7 +329,16 @@ func installKernel(sk config.KernelMask, pkgname string, force, headers bool) (e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
moddirs, err := ioutil.ReadDir(c.Volumes.LibModules)
|
searchdir := c.Volumes.LibModules
|
||||||
|
|
||||||
|
if sk.DistroType == config.Debian {
|
||||||
|
// Debian has different kernels (package version) by the
|
||||||
|
// same name (ABI), so we need to separate /boot
|
||||||
|
c.Volumes = debian.ContainerVolumes(sk.DockerName(), pkgname)
|
||||||
|
searchdir = config.Dir("volumes", sk.DockerName())
|
||||||
|
}
|
||||||
|
|
||||||
|
moddirs, err := ioutil.ReadDir(searchdir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -401,16 +410,6 @@ func installKernel(sk config.KernelMask, pkgname string, force, headers bool) (e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debian has different kernels (package version) by the
|
|
||||||
// same name (ABI), so we need to separate /boot
|
|
||||||
|
|
||||||
volumes.LibModules = config.Dir("volumes", sk.DockerName(),
|
|
||||||
pkgname, "/lib/modules")
|
|
||||||
volumes.UsrSrc = config.Dir("volumes", sk.DockerName(),
|
|
||||||
pkgname, "/usr/src")
|
|
||||||
volumes.Boot = config.Dir("volumes", sk.DockerName(),
|
|
||||||
pkgname, "/boot")
|
|
||||||
|
|
||||||
pkgs := []snapshot.Package{dk.Image}
|
pkgs := []snapshot.Package{dk.Image}
|
||||||
if headers {
|
if headers {
|
||||||
pkgs = append(pkgs, dk.Headers...)
|
pkgs = append(pkgs, dk.Headers...)
|
||||||
|
Loading…
Reference in New Issue
Block a user