View Single Post
wicket's Avatar
Posts: 634 | Thanked: 3,266 times | Joined on May 2010 @ Colombia
#17
I've knocked up a quick script that downloads backup deb files for all packages that have been installed on your device from nokia.com and also those that have been removed (not purged). Note that this not only downloads deb files from the Ovi Store but also all system packages too (which is a good idea as we are going to lose these too). The deb files are downloaded to /home/user/MyDocs/deb/archives so make sure you've got plenty of free space available in MyDocs. I've tested the script on both Fremantle and Harmattan.

TMO doesn't allow the attachment of sh files so I'm pasting the command to create the script instead. Just copy and paste it into a terminal and then run the resultant script as root. You'll need to kill any processes that may have a lock on /var/lib/dpkg before running this script. Don't worry about any package removal or upgrade messages you may see, no changes of this nature will be made as we are only downloading the deb files.

Code:
cat << EOF > /home/user/getnokiadebs.sh && chmod +x /home/user/getnokiadebs.sh
#!/bin/sh

apt-get update

mkdir -p /home/user/MyDocs/debs/archives/partial

for pkg in \`dpkg -l | cut -f 3 -d ' '\`; do
        apt-cache policy $pkg | grep -q nokia.com && echo "Downloading $pkg" || continue
        apt-get --reinstall -y --force-yes -d -odir::cache=/home/user/MyDocs/debs install $pkg
done
EOF
__________________
DebiaN900 - Native Debian on the N900. Deprecated in favour of Maemo Leste.

Maemo Leste for N950 and N9 (currently broken).
Devuan for N950 and N9.

Mobile devices with mainline Linux support - Help needed with documentation.

"Those who do not understand Unix are condemned to reinvent it, poorly." - Henry Spencer

Last edited by wicket; 2015-01-08 at 03:37.
 

The Following 28 Users Say Thank You to wicket For This Useful Post: