View Single Post
Posts: 17 | Thanked: 24 times | Joined on Feb 2013
#10
Originally Posted by minimos View Post
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.
Here is a Debian package that achieves the exact same thing (I just found this thread). Thanks minimos for this great idea!

P.S. You can append filenames with .deb after they are copied to the AptBackup folder. This will cause filebox, etc to show the proper icon.
Attached Files
File Type: deb aptbackup-1.0.deb (1.0 KB, 124 views)

Last edited by mubuntu; 2013-02-10 at 05:15.
 

The Following 5 Users Say Thank You to mubuntu For This Useful Post: