From 1ade704daa4bddb98481ab502d815d9df33bae92 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 22 Jul 2024 16:40:44 -0400 Subject: [PATCH] Fix imgutil copy of ubuntu sources --- imgutil/imgutil | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgutil/imgutil b/imgutil/imgutil index d5714306..1c6d3cc0 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -655,7 +655,8 @@ class DebHandler(OsHandler): def prep_root(self, args): shutil.copy('/etc/apt/sources.list', os.path.join(self.targpath, 'etc/apt/sources.list')) - shutil.copytree('/etc/apt/sources.list.d', os.path.join(self.targpath, 'etc/apt/sources.list.d')) + for listfile in glob.glob('/etc/apt/sources.list.d/*'): + shutil.copy(listfile, os.path.join(self.targpath, listfile[1:])) args.cmd = ['apt-get', 'update'] run_constrainedx(fancy_chroot, (args, self.targpath)) args.cmd = ['apt-get', '-y', 'install'] + self.includepkgs