← Back to team overview

vmbuilder team mailing list archive

[Merge] lp:~kvdveer/vmbuilder/fix-for-877416 into lp:vmbuilder

 

kvdveer has proposed merging lp:~kvdveer/vmbuilder/fix-for-877416 into lp:vmbuilder.

Requested reviews:
  VMBuilder (vmbuilder)
Related bugs:
  Bug #877416 in VMBuilder: "Allow specification of extra mirrors"
  https://bugs.launchpad.net/vmbuilder/+bug/877416

For more details, see:
https://code.launchpad.net/~kvdveer/vmbuilder/fix-for-877416/+merge/80064

Implemented --extra-mirror; a way to add an extra mirror to the sources.list; 
Quite useful for people who want to make images containing software which is not hosted in Ubuntu's repositories.
-- 
https://code.launchpad.net/~kvdveer/vmbuilder/fix-for-877416/+merge/80064
Your team VMBuilder is requested to review the proposed merge of lp:~kvdveer/vmbuilder/fix-for-877416 into lp:vmbuilder.
=== modified file 'VMBuilder/plugins/ubuntu/dapper.py'
--- VMBuilder/plugins/ubuntu/dapper.py	2010-12-02 08:15:01 +0000
+++ VMBuilder/plugins/ubuntu/dapper.py	2011-10-21 13:12:23 +0000
@@ -227,12 +227,14 @@
 
         components = self.context.get_setting('components')
         ppa        = self.context.get_setting('ppa')
+        extra_mirror = self.context.get_setting('extra-mirror')
         suite      = self.context.get_setting('suite')
         self.install_from_template('/etc/apt/sources.list', 'sources.list', { 'mirror' : mirror,
                                                                               'security_mirror' : security_mirror,
                                                                               'updates_mirror' : updates_mirror,
                                                                               'components' : components,
                                                                               'ppa' : ppa,
+                                                                              'extra_mirror' : extra_mirror,
                                                                               'suite' : suite })
 
         # If setting up the final mirror, allow apt-get update to fail

=== modified file 'VMBuilder/plugins/ubuntu/distro.py'
--- VMBuilder/plugins/ubuntu/distro.py	2011-10-19 19:12:45 +0000
+++ VMBuilder/plugins/ubuntu/distro.py	2011-10-21 13:12:23 +0000
@@ -62,6 +62,7 @@
         group.add_setting('install-security-mirror', metavar='URL', help='Use the security mirror at URL for installation only. Apt\'s sources.list will still use default or URL set by --security-mirror')
         group.add_setting('components', type='list', metavar='COMPS', help='A comma seperated list of distro components to include (e.g. main,universe).')
         group.add_setting('ppa', metavar='PPA', type='list', help='Add ppa belonging to PPA to the vm\'s sources.list.')
+        group.add_setting('extra-mirror', default='', help='Add an extra line to the vm\'s source.list.')
         group.add_setting('lang', metavar='LANG', default=get_locale(), help='Set the locale to LANG [default: %default]')
         group.add_setting('timezone', metavar='TZ', default='UTC', help='Set the timezone to TZ in the vm. [default: %default]')
 

=== modified file 'VMBuilder/plugins/ubuntu/templates/sources.list.tmpl'
--- VMBuilder/plugins/ubuntu/templates/sources.list.tmpl	2011-04-19 08:29:59 +0000
+++ VMBuilder/plugins/ubuntu/templates/sources.list.tmpl	2011-10-21 13:12:23 +0000
@@ -13,3 +13,8 @@
 
 #end for
 #end if
+
+#if $extra_mirror
+$extra_mirror
+
+#end if