[1/1] fix(apt-fetcher): drop isar apt entries before fetching on unshare

Message ID 20260729111518.3667086-1-felix.moessbauer@siemens.com
State New
Headers show
Series [1/1] fix(apt-fetcher): drop isar apt entries before fetching on unshare | expand

Commit Message

MOESSBAUER, Felix July 29, 2026, 11:15 a.m. UTC
The apt-fetcher must only fetch from upstream (but not from isar-apt),
as otherwise the altered files are ingressed on the next fetch. This is
already correctly implemented for the schroot backend, but was missed
for unshare.

Fixes: f2644cd7 ("apt-fetcher: implement support for unshare ...")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/lib/aptsrc_fetcher.py | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/meta/lib/aptsrc_fetcher.py b/meta/lib/aptsrc_fetcher.py
index 49f12075..fe8f1cd3 100644
--- a/meta/lib/aptsrc_fetcher.py
+++ b/meta/lib/aptsrc_fetcher.py
@@ -108,6 +108,8 @@  class AptSrcUnshare(AptSrc):
     mkdir -p {rootfsdir}
     tar -xf {sbuild_chroot} -C {rootfsdir}
     cp /etc/resolv.conf {os.path.join(rootfsdir, 'etc/resolv.conf')}
+    rm -f {rootfsdir}/etc/apt/sources.list.d/isar-apt.list \
+          {rootfsdir}/etc/apt/preferences.d/isar-apt
 EOF
         ''', d)
         logger.info(f'rootfs extracted to: {rootfsdir}')