From a0db57468c797f7a7efb086af68e886bb0e46bd4 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Tue, 26 Aug 2014 13:46:57 -0700 Subject: [PATCH] Let configure-apt be optional to prevent duplicate apt sources on native. --- vmdebootstrap | 9 +++++---- vmdebootstrap.8.in | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/vmdebootstrap b/vmdebootstrap index 67187f4..d7edde2 100755 --- a/vmdebootstrap +++ b/vmdebootstrap @@ -156,7 +156,8 @@ class VmDebootstrap(cliapp.Application): self.create_users(rootdir) self.remove_udev_persistent_rules(rootdir) self.setup_networking(rootdir) - self.configure_apt(rootdir) + if self.settings['configure-apt']: + self.configure_apt(rootdir) self.customize(rootdir) if self.settings['image']: if self.settings['extlinux']: @@ -560,9 +561,9 @@ append initrd=%(initrd)s root=UUID=%(uuid)s ro %(kserial)s logging.debug('configure apt %s' % conf) f = open(conf, 'w') f.write(''' - deb %(mirror)s %(distribution)s main - #deb-src %(mirror)s %(distribution)s main - ''' % { +deb %(mirror)s %(distribution)s main +#deb-src %(mirror)s %(distribution)s main +''' % { 'mirror': self.settings['mirror'], 'distribution': self.settings['distribution'] }) diff --git a/vmdebootstrap.8.in b/vmdebootstrap.8.in index 4aebc4f..14c6427 100644 --- a/vmdebootstrap.8.in +++ b/vmdebootstrap.8.in @@ -124,7 +124,7 @@ in high load. Run mksquashfs separately if you need to control the number of processors used per run. .IP \-\-configure\-apt Use the specified mirror and distribution to create a suitable apt source inside -the VM. +the VM. Can be useful if debootstrap fails to create it automatically. .SH Configuration files and settings: .IP \-\-dump-config write out the entire current configuration -- 2.39.5