View Single Post
Posts: 646 | Thanked: 1,124 times | Joined on Jul 2010 @ Espoo, Finland
#1
I think I found a simple way of saving a copy of any installation package (whether coming from Nokia Store or manual apt-get command), at installation time.
It is a one line hack, so I'm not going to wrap it into a user-installable package.

So, open a terminal session as root, go to /etc/apt/apt-conf.d/, launch your favorite editor and create a file named "02backup" containing the following:
Code:
Dpkg::Pre-Install-Pkgs {"BKPDIR=/home/user/MyDocs/AptBackup/; mkdir -p $BKPDIR; while read pkg; do cp $pkg $BKPDIR; done"};
That's all.
Since the next installation, a directory /home/user/MyDocs/AptBackup/ should be created and all packages should be copied there.
I haven't tested with packages that download dependencies, but I believe also said dependencies will be 'backupped'.
Note: you may want to disable this feature if you are going to upgrade to a newer PR release, otherwise your upgrade will be slow and your storage getting filled.
 

The Following 18 Users Say Thank You to minimos For This Useful Post: