summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2016-07-17 15:25:06 +0100
committerNeil Williams <codehelp@debian.org>2016-07-17 15:25:06 +0100
commit29c91afaec164c9ed6d2f7e237c7fcb2748c77fc (patch)
treedba56e40cc45e5234d4577771e19a9c8715589ef
parentbc0451cfe308f33a437cac9c47e9c0ee9d51f4c8 (diff)
downloadvmdebootstrap-29c91afaec164c9ed6d2f7e237c7fcb2748c77fc.tar.gz
Extend prepare_apt_source to use a specified local mirror.
-rw-r--r--common/customise.lib4
-rw-r--r--doc/devel.rst6
2 files changed, 7 insertions, 3 deletions
diff --git a/common/customise.lib b/common/customise.lib
index a62c64a..3569acc 100644
--- a/common/customise.lib
+++ b/common/customise.lib
@@ -54,11 +54,11 @@ EOF
chmod a+x ${rootdir}/usr/sbin/policy-rc.d
}
-# FIXME: pass the replacement mirror
+# ensure you pass the replacement mirror and suite
prepare_apt_source() {
# handle the apt source
mv ${rootdir}/etc/apt/sources.list.d/base.list ${rootdir}/etc/apt/
- echo "deb http://mirror/debian/ ${SUITE} main contrib non-free" > ${rootdir}/etc/apt/sources.list
+ echo "deb $1 $2 main contrib non-free" > ${rootdir}/etc/apt/sources.list
chroot ${rootdir} apt update
}
diff --git a/doc/devel.rst b/doc/devel.rst
index 47d9f5c..32a63f7 100644
--- a/doc/devel.rst
+++ b/doc/devel.rst
@@ -69,11 +69,15 @@ installation is complete.
prepare_apt_source
------------------
-The final Debian mirror location is not useful during the build as there
+The final Debian mirror location is not useful during the build when there
is a faster mirror available during the build. This function moves the
specified mirror file aside and uses the nearby mirror. Always use with
:ref:`replace_apt_source`.
+Ensure that the mirror and suite are passed as arguments to prepare_apt_source::
+
+ prepare_apt_source http://mirror/debian jessie
+
.. _remove_daemon_block:
remove_daemon_block