View Single Post
Posts: 540 | Thanked: 387 times | Joined on May 2009
#17
A thought occurs to me.

This is an initially inefficient idea but in the long-run if you reflash often would a.) work b.) in the long run be efficient.

Okay so rather than copy the contents of the temporary store folder and rather than download packages before installing them, why not install packages like normal, then occasionally when you want to back them up, re-download them to your SD card.

1.) Install packages like normal

2.) Prep
Code:
# mkdir /media/mmc1/debz{,/archives}
# cp -r /var/cache/apt/archives/partial/ /media/mmc1/debz/archives/
3.) Re-download all packages to SD
Code:
# foobar=`dpkg -l | grep ii | awk '{ print $2 }'`; echo $foobar > /media/mmc1/installdebz.txt; apt-get  -o dir::cache=/media/mmc1/debz --reinstall -d install $foobar
4.) Install packages to newly flashed N900
Code:
# debzinstall() { alldebz=`cat /media/mmc1/installdebz.txt`; apt-get -o dir::cache=/media/mmc1/debz install $alldebz; }
# debzinstall
I'll see if I can't work out a way to tell it to not download packages you already have saved to the SD card...