![]() |
Re: Download apps to harddrive
Hmmmm, now I am confused.
I thought he was saying the apps manager downloads the apps to the /var/cache/apt/archives/ folder and then extracts from there. If apt-get clean was not used then the .deb files will remain and hence we are copying them from the /var/cache/apt/archives/ to the debz folder in SD card /media/mmc1/debz/. I wasn't sure what the next line did though sounded as if it made sure you got all the files, thought foo was a command or something. So your comments now really confuse me as to what is actually happening and what I am meant to do. Do I still download via app manager as normal and is this to be run in term afterward? |
Re: Download apps to harddrive
Sorry for confusing you.
The initial commands were diagnostic to see if the apt-get system had any errors it needed to correct (these don't show up in Hildon Application Manager rather it just stops working) Now that you have reflashed and there are no problems you can ignore that step. As far as what you asked - saving your .deb packages for re-installation later. You should be able to use the graphical Application Manager as normal. (If someone wants to package this up as a pretty GUI program, then go for it. I'm not a fan of the syntax related to packaging up GUI programs) Backup Make folder/directory to on SD card Code:
# mkdir /media/mmc1/debzCode:
# cp /var/cache/apt/archives/*.deb /media/mmc1/debz/Make folder/directory in Maemo Code:
# mkdir /root/debz/Code:
# cp /media/mmc1/debz/*.deb /root/debz/Code:
# debzinstall() { cd /root/debz; foo=`ls *.deb`; dpkg -i $foo; } |
Re: Download apps to harddrive
Ok, so I wasn't off the mark with intent, just not fully understanding all the code.
The funny thing is, I did it yesterday and reinstalled 48 apps to be exact and when I went to the folder: /var/cache/apt/archive/ Only 2 deb files resided and they were nano and some other file which I think was associated to nano. So this doesn't seem to be the place it stores the archives? Any other suggestions guys, I'm sorry I haven't a clue and you are doing your best though haven't an n900. I hope I don't sound rude linuxeventually, I am very grateful, you are assisting me perfectly. Stephen |
Re: Download apps to harddrive
My browser ate this post, so let's try again...
/var/cache/apt/archive is not meant as a permanent storage for .deb packages (unfortunately). Every once in awhile a package manager will do some "housecleaning" and delete the contents of that folder. It's really only meant as a temporary storage location while the package manager installs the packages. While it would be trivial to whip up something to copy the .deb files to your SD card always immediately after installing packages from apt-get (or even something like grabdebz() { sudo apt-get -d install $1; cp -n /var/apt/cache/archives/*.deb /media/mmc1/debz/; sudo apt-get install $1; }; grabdebz ) That would only work if your only means of installing packages was through apt-get. But because you use Hildon Application Manager (GUI) and I am not aware of anyway to tell it NOT to delete the contents of /var/cache/apt/archives and furthermore can't inject an option to tell it to first download, then copy to SD, then install packages, I think you are out of luck with that method. And it's not open source, so the option cannot be added. You might be able to convince hqh to include the functionality in Fapman though. So then my only suggestion would be to simply save a list of installed packages and store that list somewhere safe (SD card for instance). Then whenever you end up needing to re-flash, go somewhere that has free wifi and use that list to re-download and install those packages onto your new install. It's not ideal but I don't know what else to suggest. Backup: Code:
foo=`dpkg -l | grep ii | awk '{ print $2 }'`; echo $foo > /media/mmc1/copymesomewheresafeRestore: Code:
bar=`cat /media/mmc1/copymesomewheresafe`; apt-get install $barSomething else that would be nice but that AFAIK doesn't exist and would be a major pain to script would be to figure out how to tell [say for example] your Ubuntu desktop/laptop to download the Fremantle armel packages from your list (including all dependencies) to a SD card to install that way. |
Re: Download apps to harddrive
ok,
so just downloaded all apps again and did apt-get upgrade/ update, install nano, wget, bzip2 & unzip. These are the only deb files listed in the archives cache. This time I downloaded 44 apps via app manager, not one of these are listed in the archives folder and hence none copied across. It is mainly the apps manager debs I am trying to grab. I assume these are either erased immediately or downloaded to another folder? |
Re: Download apps to harddrive
Linuxeventually,
sorry replied and then saw your comments. Understood mate, the later is thinking outside the square and liking that. Please post any suggestions, happy to try and feed back. Thanks for your help so far. Stephen |
Re: Download apps to harddrive
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}Code:
Code:
# debzinstall() { alldebz=`cat /media/mmc1/installdebz.txt`; apt-get -o dir::cache=/media/mmc1/debz install $alldebz; } |
Re: Download apps to harddrive
1 Attachment(s)
@Coffee
Okay I put together a script that should work for you. It's fairly "smart" so it shouldn't give you any problems. The script is attached. I also put it in my box.net account: http://www.box.net/shared/z8crpmsrtd (save to /usr/bin/savedebz and chmod +x /usr/bin/savedebz ) The same script follows: Code:
#!/bin/bashBackup/Download files to SD Code:
$ sudo savedebzCode:
$ sudo savedebz install |
Re: Download apps to harddrive
Thanks mate, will download and give a try now.
|
Re: Download apps to harddrive
linuxeventually,
I have tried and failed, I think my fault. I have since partitioned my MicroSD card into 4, as follows: mmcblk1p1 MicroSD 3gb fat32 mmcblk1p2 Swap 500mb 82 mmcblkp3 NITDroid 1.9gb ext3 mmcblkp4 Easy Debian 2.4gb ext2 It errors" mkdir: cannot create directory '/ media/mmc1/debz {, /archives} Does this need to be altered slightly to write specifically mmcblk1p1? Sorry for the hassle, much appreciated though, this will be so good and so close..... |
| All times are GMT. The time now is 11:56. |
vBulletin® Version 3.8.8