99porterbox-extra-sources support for ppc64
authorPeter Palfrader <peter@palfrader.org>
Tue, 11 Aug 2015 14:20:02 +0000 (16:20 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 11 Aug 2015 14:20:44 +0000 (16:20 +0200)
modules/schroot/files/schroot-setup.d/99porterbox-extra-sources

index c29eb15..b30ac9f 100755 (executable)
@@ -38,31 +38,48 @@ if [ "$1" = "setup-start" ] || [ "$1" = "setup-recover" ]; then
   rm -f "$SRCL"
   mirror=${MIRROR:-http://ftp.debian.org/debian}
 
-  case "${SUITE_BASE:-}" in
-    experimental)
-      echo "deb     $mirror sid main" >> "$SRCL"
-      echo "deb-src $mirror sid main" >> "$SRCL"
-      ;;
-    sid|stretch)
+  case "$SUITE_ARCH" in
+    ppc64)
+      case "${SUITE_BASE:-}" in
+        sid)
+          echo "deb http://ftp.de.debian.org/debian-ports sid main" >> "$SRCL"
+          echo "deb-src http://http.debian.net/debian sid main" >> "$SRCL"
+          echo "deb http://ftp.de.debian.org/debian-ports unreleased main" >> "$SRCL"
+          echo "deb-src http://ftp.de.debian.org/debian-ports unreleased main" >> "$SRCL"
+          ;;
+        *)
+          fatal "Unexpected suite base $SUITE_BASE"
+          ;;
+      esac
       ;;
     *)
-      echo "deb     http://security.debian.org/ ${suite_alias}/updates main" >> "$SRCL"
-      echo "deb-src http://security.debian.org/ ${suite_alias}/updates main" >> "$SRCL"
-      ;;
-  esac
-  echo "deb     $mirror ${suite_alias} main" >> "$SRCL"
-  echo "deb-src $mirror ${suite_alias} main" >> "$SRCL"
-
-  case "${SUITE_VARIANT:-}" in
-    backports)
       case "${SUITE_BASE:-}" in
-        squeeze)
-          echo "deb     http://backports.debian.org/debian-backports/ ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
-          echo "deb-src http://backports.debian.org/debian-backports/ ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
+        experimental)
+          echo "deb     $mirror sid main" >> "$SRCL"
+          echo "deb-src $mirror sid main" >> "$SRCL"
+          ;;
+        sid|stretch)
           ;;
         *)
-          echo "deb     $mirror ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
-          echo "deb-src $mirror ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
+          echo "deb     http://security.debian.org/ ${suite_alias}/updates main" >> "$SRCL"
+          echo "deb-src http://security.debian.org/ ${suite_alias}/updates main" >> "$SRCL"
+          ;;
+      esac
+      echo "deb     $mirror ${suite_alias} main" >> "$SRCL"
+      echo "deb-src $mirror ${suite_alias} main" >> "$SRCL"
+
+      case "${SUITE_VARIANT:-}" in
+        backports)
+          case "${SUITE_BASE:-}" in
+            squeeze)
+              echo "deb     http://backports.debian.org/debian-backports/ ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
+              echo "deb-src http://backports.debian.org/debian-backports/ ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
+              ;;
+            *)
+              echo "deb     $mirror ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
+              echo "deb-src $mirror ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
+              ;;
+          esac
           ;;
       esac
       ;;