[plug] apt-get change mangement?

Chris Caston caston at arach.net.au
Wed May 28 20:43:22 WST 2003



http://slashdot.org/comments.pl?sid=65714&threshold=1&commentsort=0&tid=109&tid=126&tid=128&tid=187&mode=thread&pid=6055715#6055724

qoute:

 got tired of apt-get blowing up my unstable Debian, so I wrote this to
make it transactional:

sub=dists/latest/binary-i386
dt=`date +"%y%m%d_%H%M%S"`
cd /data/apt
dpkg-scanpackages latest /dev/null > $sub/Packages
grep -Ex "Filename: latest/.+" $sub/Packages | sed "s/Filename:
latest\/\(.*\)/\1/" > old/L$dt
pushd $sub
rm Packages.gz
gzip Packages
popd
mv latest $dt
mkdir latest
for x in `cat old/L$dt`; do mv $dt/$x latest; done
if [[ `ls $dt | wc -l` -eq 0 ]]; then rm -r $dt; fi

If it blows up, I can easily roll back, and keep a history of all the
intermedate versions.


Any idea of what this does or if it could be useful?

regards,

Chris Caston



More information about the plug mailing list