[Bug 2058617] Re: Do not override sources list when rootfs.tarball is used
Paul Mars
2058617 at bugs.launchpad.net
Thu Apr 25 06:37:41 UTC 2024
** Description changed:
- Currently in u-i the /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#L325
+ 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.
- When a tarball is provided, /etc/apt/sources.list may be already 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 can be regenerated with the same content. This is not very practical because users have to maintain the content of /etc/apt/sources.list in several places.
-
- We could avoid calling customizeSourcesListState when the tarball rootfs
- was used.
+ Possible solution: we could avoid calling customizeSourcesListState if
+ the tarball rootfs was used.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to Ubuntu Image.
https://bugs.launchpad.net/bugs/2058617
Title:
Do not override sources list when rootfs.tarball is used
Status in Ubuntu Image:
New
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-image/+bug/2058617/+subscriptions
More information about the foundations-bugs
mailing list