From 29c91afaec164c9ed6d2f7e237c7fcb2748c77fc Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 17 Jul 2016 15:25:06 +0100 Subject: Extend prepare_apt_source to use a specified local mirror. --- common/customise.lib | 4 ++-- doc/devel.rst | 6 +++++- 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 -- cgit v1.2.1