summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-09-26 14:28:41 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:20:31 +0100
commit4826b8c224940efd1716f65ad61ad1c6e58d3a4d (patch)
treece3f520a21b750689e240ce381824aacebab00cc /scripts/build
parentc77053d3d81ac6bf03a16bc73f4c583b55e48a3e (diff)
downloadvyos-live-build-4826b8c224940efd1716f65ad61ad1c6e58d3a4d.tar.gz
vyos-live-build-4826b8c224940efd1716f65ad61ad1c6e58d3a4d.zip
Adding option to allow using the live-media pool in live system.
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/lb_binary_rootfs3
-rwxr-xr-xscripts/build/lb_chroot_hacks10
-rwxr-xr-xscripts/build/lb_config12
3 files changed, 23 insertions, 2 deletions
diff --git a/scripts/build/lb_binary_rootfs b/scripts/build/lb_binary_rootfs
index 27af0993a..483fdfb86 100755
--- a/scripts/build/lb_binary_rootfs
+++ b/scripts/build/lb_binary_rootfs
@@ -411,9 +411,10 @@ case "${LB_CHROOT_FILESYSTEM}" in
;;
esac
;;
-
esac
+rm -f chroot/etc/apt/sources.list.d/live-media.list
+
for STAGE in ${LB_CACHE_STAGES}
do
if [ "${STAGE}" = "rootfs" ]
diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks
index 47124bedc..8ec990110 100755
--- a/scripts/build/lb_chroot_hacks
+++ b/scripts/build/lb_chroot_hacks
@@ -215,6 +215,16 @@ then
rm -f chroot/etc/fstab
fi
+if [ "${LB_BINARY_POOL}" = "true" ]
+then
+ echo "deb file:/live/image/debian ${LB_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" > chroot/etc/apt/sources.list.d/live-media.list
+
+ if [ "${LB_SOURCE}" = "true" ]
+ then
+ echo "deb-src file:/live/image/debian ${LB_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/live-media.list
+ fi
+fi
+
if [ "${LB_EXPOSED_ROOT}" = "true" ]
then
# Make sure RW dirs exist so that the initramfs script has
diff --git a/scripts/build/lb_config b/scripts/build/lb_config
index 3d0583ea5..455d31371 100755
--- a/scripts/build/lb_config
+++ b/scripts/build/lb_config
@@ -41,6 +41,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [-b|--binary-images iso|net|tar|usb-hdd]\n\
\t [--binary-filesystem fat16|fat32]\n\
\t [--binary-indices true|false|none]\n\
+\t [--binary-pool true|false]\n\
\t [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\
\t [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\
\t [--bootloader grub|syslinux|yaboot]\n\
@@ -147,7 +148,7 @@ Local_arguments ()
mirror-binary-security:,mirror-binary-volatile:,mirror-binary-backports:,mirror-debian-installer:,archive-areas:,chroot-filesystem:,exposed-root:,virtual-root-size:,
gzip-options:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,
packages:,packages-lists:,tasks:,security:,volatile:,backports:,sysvinit:,binary-filesystem:,binary-images:,
- binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,build-with-chroot:,
+ binary-indices:,binary-pool:,bootappend-install:,bootappend-live:,bootloader:,checksums:,build-with-chroot:,
debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
encryption:,grub-splash:,hostname:,isohybrid-options:,iso-application:,iso-preparer:,iso-publisher:,
iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,
@@ -542,6 +543,11 @@ Local_arguments ()
shift 2
;;
+ --binary-pool)
+ LB_BINARY_POOL="${2}"
+ shift 2
+ ;;
+
--bootappend-live)
LB_BOOTAPPEND_LIVE="${2}"
shift 2
@@ -1148,6 +1154,10 @@ LB_BINARY_IMAGES="${LB_BINARY_IMAGES}"
# (Default: ${LB_BINARY_INDICES})
LB_BINARY_INDICES="${LB_BINARY_INDICES}"
+# \$LB_BINARY_POOL: enable live-media repository in live system
+# (Default: ${LB_BINARY_POOL})
+LB_BINARY_POOL="${LB_BINARY_POOL}"
+
# \$LB_BOOTAPPEND_LIVE: set boot parameters
# (Default: empty)
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE}"