summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-03-11 18:03:29 +0100
committerDaniel Baumann <daniel@debian.org>2010-03-12 16:19:52 +0100
commitca8429ebf4727221bc55b5b7075a2acaf4d7d415 (patch)
tree5ef6f62a9f5c546149c2b499e98d6516e3c9556c
parent3b1124f6c1f7c4ffaad34300adca7da4a5c8f9b2 (diff)
downloadvyos-live-build-ca8429ebf4727221bc55b5b7075a2acaf4d7d415.tar.gz
vyos-live-build-ca8429ebf4727221bc55b5b7075a2acaf4d7d415.zip
Adding update repositories as volatile when building in ubuntu mode (Closes: #572983).
-rwxr-xr-xfunctions/defaults.sh24
-rwxr-xr-xhelpers/chroot_sources58
2 files changed, 66 insertions, 16 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 05ab2fcec..0862254b6 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -344,6 +344,18 @@ Set_defaults ()
;;
esac
;;
+
+ ubuntu)
+ case "${LH_ARCHITECTURE}" in
+ amd64|i386)
+ LH_MIRROR_CHROOT_VOLATILE="http://security.ubuntu.com/ubuntu/"
+ ;;
+
+ *)
+ LH_MIRROR_CHROOT_VOLATILE="http://ports.ubuntu.com/"
+ ;;
+ esac
+ ;;
esac
LH_MIRROR_CHROOT_VOLATILE="${LH_MIRROR_CHROOT_VOLATILE:-none}"
@@ -412,6 +424,18 @@ Set_defaults ()
;;
esac
;;
+
+ ubuntu)
+ case "${LH_ARCHITECTURE}" in
+ amd64|i386)
+ LH_MIRROR_BINARY_VOLATILE="http://security.ubuntu.com/ubuntu/"
+ ;;
+
+ *)
+ LH_MIRROR_BINARY_VOLATILE="http://ports.ubuntu.com/"
+ ;;
+ esac
+ ;;
esac
LH_MIRROR_BINARY_VOLATILE="${LH_MIRROR_BINARY_VOLATILE:-none}"
diff --git a/helpers/chroot_sources b/helpers/chroot_sources
index 87db111d9..8e456fdb0 100755
--- a/helpers/chroot_sources
+++ b/helpers/chroot_sources
@@ -77,15 +77,28 @@ case "${1}" in
if [ "${LH_VOLATILE}" = "true" ]
then
- if [ "${LH_DISTRIBUTION}" != "sid" ] && [ "${LH_DISTRIBUTION}" != "unstable" ]
- then
- echo "deb ${LH_MIRROR_CHROOT_VOLATILE} ${LH_DISTRIBUTION}/volatile ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+ case "${LH_MODE}" in
+ debian|debian-release)
+ if [ "${LH_DISTRIBUTION}" != "sid" ] && [ "${LH_DISTRIBUTION}" != "unstable" ]
+ then
+ echo "deb ${LH_MIRROR_CHROOT_VOLATILE} ${LH_DISTRIBUTION}/volatile ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- if [ "${LH_SOURCE}" = "true" ]
- then
- echo "deb-src ${LH_MIRROR_CHROOT_VOLATILE} ${LH_DISTRIBUTION}/volatile ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- fi
- fi
+ if [ "${LH_SOURCE}" = "true" ]
+ then
+ echo "deb-src ${LH_MIRROR_CHROOT_VOLATILE} ${LH_DISTRIBUTION}/volatile ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+ fi
+ fi
+ ;;
+
+ ubuntu)
+ echo "deb ${LH_MIRROR_CHROOT_VOLATILE} ${LH_DISTRIBUTION}-updates ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+
+ if [ "${LH_SOURCE}" = "true" ]
+ then
+ echo "deb-src ${LH_MIRROR_CHROOT_VOLATILE} ${LH_DISTRIBUTION}-updates ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+ fi
+ ;;
+ esac
fi
# Check local sources.list
@@ -416,15 +429,28 @@ case "${1}" in
if [ "${LH_VOLATILE}" = "true" ]
then
- if [ "${LH_DISTRIBUTION}" != "sid" ] && [ "${LH_DISTRIBUTION}" != "unstable" ]
- then
- echo "deb ${LH_MIRROR_BINARY_VOLATILE} ${LH_DISTRIBUTION}/volatile ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+ case "${LH_MODE}" in
+ debian|debian-release)
+ if [ "${LH_DISTRIBUTION}" != "sid" ] && [ "${LH_DISTRIBUTION}" != "unstable" ]
+ then
+ echo "deb ${LH_MIRROR_BINARY_VOLATILE} ${LH_DISTRIBUTION}/volatile ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- if [ "${LH_SOURCE}" = "true" ]
- then
- echo "deb-src ${LH_MIRROR_BINARY_VOLATILE} ${LH_DISTRIBUTION}/volatile ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
- fi
- fi
+ if [ "${LH_SOURCE}" = "true" ]
+ then
+ echo "deb-src ${LH_MIRROR_BINARY_VOLATILE} ${LH_DISTRIBUTION}/volatile ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+ fi
+ fi
+ ;;
+
+ ubuntu)
+ echo "deb ${LH_MIRROR_BINARY_VOLATILE} ${LH_DISTRIBUTION}-updates ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+
+ if [ "${LH_SOURCE}" = "true" ]
+ then
+ echo "deb-src ${LH_MIRROR_BINARY_VOLATILE} ${LH_DISTRIBUTION}-updates ${LH_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+ fi
+ ;;
+ esac
fi
# Check local sources.list