Do not override sources list when rootfs.tarball is used

Bug #2058617 reported by Paul Mars
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Image
New
Undecided
Unassigned

Bug Description

Currently in u-i the /etc/apt/sources.list.d/ubuntu.sources (or /etc/apt/sources.list) file is systematically overridden after the rootfs creation, whatever the method used (either from a seed or from a tarball). See https://github.com/canonical/ubuntu-image/blob/main/internal/statemachine/classic.go#L354

If no value were given under the rootfs section for components/pocket/mirror, default values are used.

If components/pocket were given in the customization section, then the file is overridden again.

When a tarball is provided, /etc/apt/sources.list.d/ubuntu.sources may already be set to something that should be kept. The current behavior forces u-i users to set the same values in rootfs{.components,.pocket,.mirror} so /etc/apt/sources.list.d/ubuntu.sources can be regenerated with the same content. This is not very practical because users have to maintain the content of /etc/apt/sources.list.d/ubuntu.sources in several places.

Possible solution: we could avoid calling customizeSourcesListState if the tarball rootfs was used.

Paul Mars (upils)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.