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

Proposed by Ondergetekende
Status: Needs review
Proposed branch: lp:~kvdveer/vmbuilder/fix-for-877416
Merge into: lp:vmbuilder
Diff against target: 43 lines (+8/-0)
3 files modified
VMBuilder/plugins/ubuntu/dapper.py (+2/-0)
VMBuilder/plugins/ubuntu/distro.py (+1/-0)
VMBuilder/plugins/ubuntu/templates/sources.list.tmpl (+5/-0)
To merge this branch: bzr merge lp:~kvdveer/vmbuilder/fix-for-877416
Reviewer Review Type Date Requested Status
VMBuilder Pending
Review via email: mp+80064@code.launchpad.net

Description of the change

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.

To post a comment you must log in.

Unmerged revisions

471. By Ondergetekende

Implement --extra-mirror option

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'VMBuilder/plugins/ubuntu/dapper.py'
2--- VMBuilder/plugins/ubuntu/dapper.py 2010-12-02 08:15:01 +0000
3+++ VMBuilder/plugins/ubuntu/dapper.py 2011-10-21 13:12:23 +0000
4@@ -227,12 +227,14 @@
5
6 components = self.context.get_setting('components')
7 ppa = self.context.get_setting('ppa')
8+ extra_mirror = self.context.get_setting('extra-mirror')
9 suite = self.context.get_setting('suite')
10 self.install_from_template('/etc/apt/sources.list', 'sources.list', { 'mirror' : mirror,
11 'security_mirror' : security_mirror,
12 'updates_mirror' : updates_mirror,
13 'components' : components,
14 'ppa' : ppa,
15+ 'extra_mirror' : extra_mirror,
16 'suite' : suite })
17
18 # If setting up the final mirror, allow apt-get update to fail
19
20=== modified file 'VMBuilder/plugins/ubuntu/distro.py'
21--- VMBuilder/plugins/ubuntu/distro.py 2011-10-19 19:12:45 +0000
22+++ VMBuilder/plugins/ubuntu/distro.py 2011-10-21 13:12:23 +0000
23@@ -62,6 +62,7 @@
24 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')
25 group.add_setting('components', type='list', metavar='COMPS', help='A comma seperated list of distro components to include (e.g. main,universe).')
26 group.add_setting('ppa', metavar='PPA', type='list', help='Add ppa belonging to PPA to the vm\'s sources.list.')
27+ group.add_setting('extra-mirror', default='', help='Add an extra line to the vm\'s source.list.')
28 group.add_setting('lang', metavar='LANG', default=get_locale(), help='Set the locale to LANG [default: %default]')
29 group.add_setting('timezone', metavar='TZ', default='UTC', help='Set the timezone to TZ in the vm. [default: %default]')
30
31
32=== modified file 'VMBuilder/plugins/ubuntu/templates/sources.list.tmpl'
33--- VMBuilder/plugins/ubuntu/templates/sources.list.tmpl 2011-04-19 08:29:59 +0000
34+++ VMBuilder/plugins/ubuntu/templates/sources.list.tmpl 2011-10-21 13:12:23 +0000
35@@ -13,3 +13,8 @@
36
37 #end for
38 #end if
39+
40+#if $extra_mirror
41+$extra_mirror
42+
43+#end if

Subscribers

People subscribed via source and target branches