diff --git a/BuildLiveCD b/BuildLiveCD index d1412bb0..76e71b53 100755 --- a/BuildLiveCD +++ b/BuildLiveCD @@ -32,11 +32,12 @@ SUITES="" PROPOSED="" IMAGEFORMAT="" -while getopts :s:d:f:p name; do case $name in +while getopts :s:d:f:pa: name; do case $name in s) SUBARCH="$OPTARG";; d) NEWSUITE="$OPTARG";; f) IMAGEFORMAT="-f$OPTARG";; p) PROPOSED="-p";; + a) APT_SOURCE="$OPTARG";; esac; done; shift $((OPTIND-1)) @@ -103,6 +104,23 @@ set -e for STE in $SUITES; do if [ -d ~/build-${STE}-live/chroot-${STE} ]; then + if [ -n "$APT_SOURCE" ]; then + sudo sed -i -e"\$a\ +deb $APT_SOURCE $STE main" ~/build-${STE}-live/chroot-${STE}/etc/apt/sources.list + # allow unsigned sources, unfortunately + echo 'APT::Get::AllowUnauthenticated "yes";' | sudo tee ~/build-${STE}-live/chroot-${STE}/etc/apt/apt.conf.d/extra-source-allows-unauthenticated-sources > /dev/null + # and add the preferences rules :( + APT_PIN=$(echo $APT_SOURCE | sed -e's,http://,,; s,/.*,,') + cat | sudo tee ~/build-${STE}-live/chroot-${STE}/etc/apt/preferences.d/local-source-preferred-even-downgrade > /dev/null < Tue, 20 Jul 2010 18:25:13 +0200 + livecd-rootfs (1.133) maverick; urgency=low * adjust BuildLiveCD PUBDIR variable to match reality (uses SUBARCH on the