Skip to content

Commit

Permalink
debootstrap: Remove no-merged-usr/merged-usr logic
Browse files Browse the repository at this point in the history
This logic is confusing/outdated and newer debootstrap should be able to
cope out of the box. So let's remove it for now and we'll add back
specific exceptions if needed.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Jun 27, 2024
1 parent e27f903 commit ab6c95f
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions sources/debootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"os"
"path"
"path/filepath"
"slices"
"strings"

incus "github.com/lxc/incus/v6/shared/util"
Expand All @@ -21,16 +20,6 @@ type debootstrap struct {
func (s *debootstrap) Run() error {
var args []string

distro := strings.ToLower(s.definition.Image.Distribution)
release := strings.ToLower(s.definition.Image.Release)

// Enable merged /usr by default, and disable it for certain distros/releases
if distro == "ubuntu" && slices.Contains([]string{"xenial", "bionic", "noble"}, release) || distro == "debian" && slices.Contains([]string{"sid"}, release) || distro == "mint" && slices.Contains([]string{"tara", "tessa", "tina", "tricia", "ulyana"}, release) || distro == "devuan" {
args = append(args, "--no-merged-usr")
} else {
args = append(args, "--merged-usr")
}

os.RemoveAll(s.rootfsDir)

if s.definition.Source.Variant != "" {
Expand Down

0 comments on commit ab6c95f

Please sign in to comment.