summaryrefslogtreecommitdiff
path: root/scripts/build/lb_chroot_archives
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-08-24 20:34:01 +0200
committerDaniel Baumann <daniel@debian.org>2011-08-24 22:46:32 +0200
commit3ceb68b7d4eb5b28269c0780a808c3725c5f5668 (patch)
treeffcf3feed5e674de5a814b5e5269cd20c0042bfc /scripts/build/lb_chroot_archives
parent9d73420afc451a6367bec6873c74c649d08b9c01 (diff)
downloadvyos-live-build-3ceb68b7d4eb5b28269c0780a808c3725c5f5668.tar.gz
vyos-live-build-3ceb68b7d4eb5b28269c0780a808c3725c5f5668.zip
Introducing --apt-sources option to control if the live system should have deb-src entries in sources.list.
Diffstat (limited to 'scripts/build/lb_chroot_archives')
-rwxr-xr-xscripts/build/lb_chroot_archives43
1 files changed, 23 insertions, 20 deletions
diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives
index f91d3f32d..59f0d9d54 100755
--- a/scripts/build/lb_chroot_archives
+++ b/scripts/build/lb_chroot_archives
@@ -18,6 +18,9 @@ DESCRIPTION="$(Echo 'manage /etc/apt/sources.list')"
HELP=""
USAGE="${PROGRAM} {install|remove} [--force]"
+_PASS="${1}"
+shift
+
Arguments "${@}"
# Reading configuration files
@@ -53,7 +56,7 @@ cat > chroot/etc/apt/sources.list << EOF
deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}
EOF
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
fi
@@ -81,7 +84,7 @@ EOF
echo "deb ${LB_MIRROR_CHROOT} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_MIRROR_CHROOT} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
fi
@@ -100,7 +103,7 @@ EOF
*)
echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
fi
@@ -117,7 +120,7 @@ EOF
*)
echo "deb ${LB_MIRROR_CHROOT_SECURITY} ${LB_DISTRIBUTION}-security ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_MIRROR_CHROOT_SECURITY} ${LB_DISTRIBUTION}-security ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
fi
@@ -128,7 +131,7 @@ EOF
then
echo "deb ${LB_MIRROR_CHROOT_SECURITY} ${LB_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_MIRROR_CHROOT_SECURITY} ${LB_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
fi
@@ -139,7 +142,7 @@ EOF
ubuntu|kubuntu)
echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
fi
@@ -153,7 +156,7 @@ EOF
debian|ubuntu|kubuntu)
echo "deb ${LB_PARENT_MIRROR_CHROOT_VOLATILE} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_PARENT_MIRROR_CHROOT_VOLATILE} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
fi
@@ -164,7 +167,7 @@ EOF
then
echo "deb ${LB_MIRROR_CHROOT_VOLATILE} ${LB_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_MIRROR_CHROOT_VOLATILE} ${LB_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
fi
@@ -179,7 +182,7 @@ EOF
then
echo "deb ${LB_PARENT_MIRROR_CHROOT_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_PARENT_MIRROR_CHROOT_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
fi
@@ -191,7 +194,7 @@ EOF
then
echo "deb ${LB_MIRROR_CHROOT_BACKPORTS} ${LB_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_MIRROR_CHROOT_BACKPORTS} ${LB_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
fi
@@ -601,7 +604,7 @@ cat > chroot/etc/apt/sources.list << EOF
deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}
EOF
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
fi
@@ -629,7 +632,7 @@ EOF
echo "deb ${LB_MIRROR_BINARY} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_MIRROR_BINARY} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
fi
@@ -648,7 +651,7 @@ EOF
*)
echo "deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
fi
@@ -665,7 +668,7 @@ EOF
*)
echo "deb ${LB_MIRROR_BINARY_SECURITY} ${LB_DISTRIBUTION}-security ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_MIRROR_BINARY_SECURITY} ${LB_DISTRIBUTION}-security ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
fi
@@ -676,7 +679,7 @@ EOF
then
echo "deb ${LB_MIRROR_BINARY_SECURITY} ${LB_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_MIRROR_BINARY_SECURITY} ${LB_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
fi
@@ -687,7 +690,7 @@ EOF
ubuntu|kubuntu)
echo "deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
fi
@@ -701,7 +704,7 @@ EOF
debian|ubuntu|kubuntu)
echo "deb ${LB_PARENT_MIRROR_BINARY_VOLATILE} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_PARENT_MIRROR_BINARY_VOLATILE} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
fi
@@ -712,7 +715,7 @@ EOF
then
echo "deb ${LB_MIRROR_BINARY_VOLATILE} ${LB_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_MIRROR_BINARY_VOLATILE} ${LB_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
fi
@@ -727,7 +730,7 @@ EOF
then
echo "deb ${LB_PARENT_MIRROR_BINARY_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_PARENT_MIRROR_BINARY_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
fi
@@ -739,7 +742,7 @@ EOF
then
echo "deb ${LB_MIRROR_BINARY_BACKPORTS} ${LB_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
- if [ "${LB_SOURCE}" = "true" ]
+ if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE}" = "true" ]
then
echo "deb-src ${LB_MIRROR_BINARY_BACKPORTS} ${LB_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
fi