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 1555d14
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions sources/debootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ func (s *debootstrap) Run() error {
distro := strings.ToLower(s.definition.Image.Distribution)

Check failure on line 24 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-20.04)

distro declared and not used

Check failure on line 24 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-20.04)

distro declared and not used

Check failure on line 24 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-22.04)

distro declared and not used

Check failure on line 24 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-22.04)

distro declared and not used

Check failure on line 24 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.22.x, ubuntu-20.04)

distro declared and not used

Check failure on line 24 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.22.x, ubuntu-20.04)

distro declared and not used

Check failure on line 24 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.22.x, ubuntu-22.04)

distro declared and not used

Check failure on line 24 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.22.x, ubuntu-22.04)

distro declared and not used
release := strings.ToLower(s.definition.Image.Release)

Check failure on line 25 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-20.04)

release declared and not used) (typecheck)

Check failure on line 25 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-20.04)

release declared and not used (typecheck)

Check failure on line 25 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-22.04)

release declared and not used) (typecheck)

Check failure on line 25 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-22.04)

release declared and not used (typecheck)

Check failure on line 25 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.22.x, ubuntu-20.04)

release declared and not used) (typecheck)

Check failure on line 25 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.22.x, ubuntu-20.04)

release declared and not used (typecheck)

Check failure on line 25 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.22.x, ubuntu-22.04)

release declared and not used) (typecheck)

Check failure on line 25 in sources/debootstrap.go

View workflow job for this annotation

GitHub Actions / Code tests (1.22.x, ubuntu-22.04)

release declared and not used (typecheck)

// 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 1555d14

Please sign in to comment.