#/bin/sh -e echo echo "=== make sure to select http mode or ftp mode ===" echo # zap old sources.list cd /etc/apt cp -f sources.list sources.old :>sources.list # apt-setup in testing requires to be run from / cd / sleep 1 apt-setup noprobe # ... select http or ftp cd /etc/apt # create template grep -e "^deb " sources.list >sources.deb grep -e "^deb-" sources.list >sources.src # create new sources.list sed -e "s/^d/#d/" /usr/share/doc/apt/examples/sources.list >sources.list sed -e "s/stable/testing/" sources.deb >>sources.list # update/upgrade to testing (just the core only.) apt-get update apt-get install apt apt-utils # this upgrades libc, perl, libdb2, apt, and debconf. # create typical preferences to track testing cat >preferences <>sources.list sed -e "s/stable/unstable/" sources.src | \ sed -e "s/^deb-/#deb-/" >>sources.list # rm -f sources.deb sources.src echo echo "A guideline for /etc/apt/prefeirences" echo echo " track stable: change Pin-Priority of testing to 80" echo " track testing: keep as is" echo " track unstable/testing: change Pin-Priority of unstable to 600" echo " track unstable: change Pin-Priority of unstable to 800" echo echo "Run apt-get update && apt-get dist-upgrade" # upgrade rest of the system. If crash, try again :) apt-get update apt-get dist-upgrade