fix: use initramfs-tools from backports only on wheezy
This commit is contained in:
parent
3740a07619
commit
a9cd7ba18b
@ -236,7 +236,9 @@ func repositories(release Release) (repos []string) {
|
|||||||
|
|
||||||
repo("debian", "")
|
repo("debian", "")
|
||||||
repo("debian", "-updates")
|
repo("debian", "-updates")
|
||||||
|
if d.release <= 7 {
|
||||||
repo("debian", "-backports")
|
repo("debian", "-backports")
|
||||||
|
}
|
||||||
repo("debian-security", "/updates")
|
repo("debian-security", "/updates")
|
||||||
|
|
||||||
return
|
return
|
||||||
@ -263,17 +265,21 @@ func (d Debian) runs() (commands []string) {
|
|||||||
|
|
||||||
cmdf("apt-get update || apt-get update || apt-get update")
|
cmdf("apt-get update || apt-get update || apt-get update")
|
||||||
|
|
||||||
// by default Debian backports repositories have a lower
|
|
||||||
// priority than stable, so we should specify it manually
|
|
||||||
cmdf("apt-get -y install -t %s-backports initramfs-tools",
|
|
||||||
d.release.Name())
|
|
||||||
|
|
||||||
pkglist := []string{
|
pkglist := []string{
|
||||||
"wget", "build-essential", "libelf-dev", "git",
|
"wget", "build-essential", "libelf-dev", "git",
|
||||||
"kmod", "linux-base", "libssl-dev",
|
"kmod", "linux-base", "libssl-dev",
|
||||||
"'^(gcc-[0-9].[0-9]|gcc-[0-9]|gcc-[1-9][0-9])$'",
|
"'^(gcc-[0-9].[0-9]|gcc-[0-9]|gcc-[1-9][0-9])$'",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if d.release >= 8 {
|
||||||
|
pkglist = append(pkglist, "initramfs-tools")
|
||||||
|
} else {
|
||||||
|
// by default Debian backports repositories have a lower
|
||||||
|
// priority than stable, so we should specify it manually
|
||||||
|
cmdf("apt-get -y install -t %s-backports initramfs-tools",
|
||||||
|
d.release.Name())
|
||||||
|
}
|
||||||
|
|
||||||
if d.release < 9 {
|
if d.release < 9 {
|
||||||
pkglist = append(pkglist, "module-init-tools")
|
pkglist = append(pkglist, "module-init-tools")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user