[rtems-buildsys commit] Simplify setting up the repos.
Ralf Corsepius
ralf at rtems.org
Thu Dec 13 18:02:19 UTC 2012
Module: rtems-buildsys
Branch: master
Commit: f29543659b5ac6f30080615f35e4401c310f9c39
Changeset: http://git.rtems.org/rtems-buildsys/commit/?id=f29543659b5ac6f30080615f35e4401c310f9c39
Author: Ralf Corsépius <ralf.corsepius at rtems.org>
Date: Wed Dec 5 09:09:07 2012 +0100
Simplify setting up the repos.
---
rtems-sbuild/etc/schroot/setup.d/80distro | 57 +++++++++--------------------
1 files changed, 18 insertions(+), 39 deletions(-)
diff --git a/rtems-sbuild/etc/schroot/setup.d/80distro b/rtems-sbuild/etc/schroot/setup.d/80distro
index 44019e3..d32e10e 100755
--- a/rtems-sbuild/etc/schroot/setup.d/80distro
+++ b/rtems-sbuild/etc/schroot/setup.d/80distro
@@ -20,60 +20,39 @@ if [ "$1" = "setup-start" ] || [ "$1" = "setup-recover" ]; then
fi
if [ "$1" = "setup-start" ]; then
+
+# Extract which suite/distro we are building for, e.g. natty
+SUITE=$(echo "$SESSION_ID" | sed -e 's,\([^-]\+\)-.*,\1,')
+
case "$SESSION_ID" in
-maverick*)
- echo "MAVERICK:" $(pwd)
- cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/updates.list
-deb http://archive.ubuntu.com/ubuntu maverick-updates main
-deb-src http://archive.ubuntu.com/ubuntu maverick-updates main
-EOF
- cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/rtems4.11.list
-deb ftp://ftp.rtems.org/pub/rtems/linux/4.11/ubuntu maverick rtems4.11
-EOF
- cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/rtems4.10.list
-deb ftp://ftp.rtems.org/pub/rtems/linux/4.10/ubuntu maverick rtems4.10
-EOF
- ;;
-natty*)
- echo "NATTY:" $(pwd)
+squeeze*) # Debian
cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/updates.list
-deb http://archive.ubuntu.com/ubuntu natty-updates main
-deb-src http://archive.ubuntu.com/ubuntu natty-updates main
-EOF
- cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/rtems4.11.list
-deb ftp://ftp.rtems.org/pub/rtems/linux/4.11/ubuntu natty rtems4.11
-EOF
- cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/rtems4.10.list
-deb ftp://ftp.rtems.org/pub/rtems/linux/4.10/ubuntu natty rtems4.10
-EOF
- ;;
-oneiric*)
- echo "ONEIRIC:" $(pwd)
- cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/updates.list
-deb http://archive.ubuntu.com/ubuntu oneiric-updates main
-deb-src http://archive.ubuntu.com/ubuntu oneiric-updates main
+deb http://ftp.debian.org/debian squeeze-updates main
+deb-src http://ftp.de.debian.org/debian squeeze-updates main
EOF
cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/rtems4.11.list
-deb ftp://ftp.rtems.org/pub/rtems/linux/4.11/ubuntu oneiric rtems4.11
+deb ftp://ftp.rtems.org/pub/rtems/linux/4.11/debian squeeze rtems4.11
EOF
cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/rtems4.10.list
-deb ftp://ftp.rtems.org/pub/rtems/linux/4.10/ubuntu oneiric rtems4.10
+deb ftp://ftp.rtems.org/pub/rtems/linux/4.10/debian squeeze rtems4.10
EOF
;;
-squeeze*)
- echo "SQUEEZE:" $(pwd)
+
+*) # Ubuntu
cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/updates.list
-deb http://ftp.debian.org/debian squeeze-updates main
-deb-src http://ftp.de.debian.org/debian squeeze-updates main
+deb http://archive.ubuntu.com/ubuntu $SUITE-updates main
+deb-src http://archive.ubuntu.com/ubuntu $SUITE-updates main
EOF
cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/rtems4.11.list
-deb ftp://ftp.rtems.org/pub/rtems/linux/4.11/debian squeeze rtems4.11
+deb ftp://ftp.rtems.org/pub/rtems/linux/4.11/ubuntu $SUITE rtems4.11
EOF
cat << EOF > $CHROOT_DIRECTORY/etc/apt/sources.list.d/rtems4.10.list
-deb ftp://ftp.rtems.org/pub/rtems/linux/4.10/debian squeeze rtems4.10
+deb ftp://ftp.rtems.org/pub/rtems/linux/4.10/ubuntu $SUITE rtems4.10
EOF
;;
+
*)
- echo "Unhandled $SESSION_ID" $pwd;;
+ echo "Unhandled session $SESSION_ID"
+ ;;
esac
fi
More information about the vc
mailing list