PDA

View Full Version : Download apps to harddrive


Coffee
2010-07-27, 02:52
Guys,
Can we download apps from a server etc to save on our harddrive. So when we reflash the phone we don't have to chew up extra data downloading them?

Stephen

linuxeventually
2010-07-27, 03:43
I assume N900 user? Additionally I assume Maemo5? This won't work for anything downloaded from ovi store fyi.

Save the .deb packages locally and copy them somewhere.
Then you can simply copy them back to the N900 and dpkg -i *.deb

As far as the packages you have installed go (provided you have not done a apt-get clean)

Something like this to backup to another computer
# scp /var/cache/apt/archives/*.deb user@server:/home/user/maemo/

Later
# scp user@server:/home/user/maemo/* /home/user/MyDocs/
# dpkg -i /home/user/MyDocs/*.deb

If you want to just download packages to install later then you can:
# apt-get -d install unzip
# dpkg -i /var/cache/apt/archives/unzip_5.52-14-maemo6_armel.deb

Coffee
2010-07-27, 04:44
I assume N900 user? Additionally I assume Maemo5? This won't work for anything downloaded from ovi store fyi.

Save the .deb packages locally and copy them somewhere.
Then you can simply copy them back to the N900 and dpkg -i *.deb

As far as the packages you have installed go (provided you have not done a apt-get clean)

Something like this to backup to another computer
# scp /var/cache/apt/archives/*.deb user@server:/home/user/maemo/

Later
# scp user@server:/home/user/maemo/* /home/user/MyDocs/
# dpkg -i /home/user/MyDocs/*.deb

If you want to just download packages to install later then you can:
# apt-get -d install unzip
# dpkg -i /var/cache/apt/archives/unzip_5.52-14-maemo6_armel.deb



Yes mate,
N900 Maemo 5 user.
I think the last comments is more what I am looking for though not clear.
I wish to download the files and be able to save them on a harddrive so if required later. I can simply copy to a location and then extract rather download all over again. I hope that is clearer?

Coffee
2010-07-27, 05:04
Mate,
what does that last uzip package do?

ossipena
2010-07-27, 05:15
when you download stuff and something gets updated in the servers, you have to make updates (and most packages have some dependencies that has to be downloaded)

trust me, you don't want to do what you are suggesting. I've learned my lesson with debian installing application and a dozen dependent packages manually....

linuxeventually
2010-07-27, 05:18
Unzip what just an example of a package. That is all.

By harddrive, do you mean a random harddrive (on a desktop for instance) or are you referring to the eMMC (internal SD card) in the N900? I suppose you could even simply save the files to a microSD card.

Yeah so when you install packages they are first downloaded by the package manager and saved to the location /var/cache/apt/archives/ temporarily before they are installed.

They aren't deleted from the location usually unless you delete them manually or with autoclean (or similar).

Anyway, you can just go ahead and copy them to your sd card (I'm not sure where it's mounted in your case; I'm an N810 user and not too familiar with the N900; my suggestions are generic debian-based instructions)

# mkdir /media/mmc1/debz
# cp /var/cache/apt/archives/*.deb /media/mmc1/debz/

might work for you but again I'm not sure that's the right mount point.

Now if you want to be sure you are getting all the debian packages, you can be sure to

# apt-get -d install foo
# cp /var/cache/apt/archives/*.deb /media/mmc1/debz/
# apt-get install foo

Hope that helps

EDIT: For people that just want a list of installed packages (that way you can just go somewhere that has free wifi access and download all the packages in one shot after reflashing)

Backup:
foo=`dpkg -l | grep ii | awk '{ print $2 }'`; echo $foo > /media/mmc1/copymesomewheresafe

Restore:
bar=`cat /media/mmc1/copymesomewheresafe`; apt-get install $bar

ossipena
2010-07-27, 05:21
/media/mmc1 is correct so the instructions apply

Coffee
2010-07-27, 06:31
Unzip what just an example of a package. That is all.

By harddrive, do you mean a random harddrive (on a desktop for instance) or are you referring to the eMMC (internal SD card) in the N900? I suppose you could even simply save the files to a microSD card.

Yeah so when you install packages they are first downloaded by the package manager and saved to the location /var/cache/apt/archives/ temporarily before they are installed.

They aren't deleted from the location usually unless you delete them manually or with autoclean (or similar).

Anyway, you can just go ahead and copy them to your sd card (I'm not sure where it's mounted in your case; I'm an N810 user and not too familiar with the N900; my suggestions are generic debian-based instructions)

# mkdir /media/mmc1/debz
# cp /var/cache/apt/archives/*.deb /media/mmc1/debz/

might work for you but again I'm not sure that's the right mount point.

Now if you want to be sure you are getting all the debian packages, you can be sure to

# apt-get -d install foo
# cp /var/cache/apt/archives/*.deb /media/mmc1/debz/
# apt-get install foo

Hope that helps

EDIT: For people that just want a list of installed packages (that way you can just go somewhere that has free wifi access and download all the packages in one shot after reflashing)

Backup:
foo=`dpkg -l | grep ii | awk '{ print $2 }'`; echo $foo > /media/mmc1/copymesomewheresafe

Restore:
bar=`cat /media/mmc1/copymesomewheresafe`; apt-get install $bar


That is perfect mate, much , much appreciated. Both options are perfect!
For a guy like me that makes errors and has little idea, lmao.
Trying different suggestions, kernels, overclocking, porting OS etc. This has needed me to reflash a few times now, each time downloading approx 50 apps must be killing my data. Hence why I asked, after run the update and anything missed will be updated and current. The update saves the wasted +70% of apps that were current being downloaded.

Coffee
2010-07-29, 02:43
Unzip what just an example of a package. That is all.

By harddrive, do you mean a random harddrive (on a desktop for instance) or are you referring to the eMMC (internal SD card) in the N900? I suppose you could even simply save the files to a microSD card.

Yeah so when you install packages they are first downloaded by the package manager and saved to the location /var/cache/apt/archives/ temporarily before they are installed.

They aren't deleted from the location usually unless you delete them manually or with autoclean (or similar).

Anyway, you can just go ahead and copy them to your sd card (I'm not sure where it's mounted in your case; I'm an N810 user and not too familiar with the N900; my suggestions are generic debian-based instructions)

# mkdir /media/mmc1/debz
# cp /var/cache/apt/archives/*.deb /media/mmc1/debz/

might work for you but again I'm not sure that's the right mount point.

Now if you want to be sure you are getting all the debian packages, you can be sure to

# apt-get -d install foo
# cp /var/cache/apt/archives/*.deb /media/mmc1/debz/
# apt-get install foo

Hope that helps

EDIT: For people that just want a list of installed packages (that way you can just go somewhere that has free wifi access and download all the packages in one shot after reflashing)

Backup:
foo=`dpkg -l | grep ii | awk '{ print $2 }'`; echo $foo > /media/mmc1/copymesomewheresafe

Restore:
bar=`cat /media/mmc1/copymesomewheresafe`; apt-get install $bar

Mate,
I have done a reflash and fresh install so time to use these codes given. First part was easy though after adding 48 apps, only 3 listed in archives. So went to next step (see bold and in red), returns E: Couldn't find package foo.
What do I do here?

Stephen

jaeezzy
2010-07-29, 03:21
Mate,
I have done a reflash and fresh install so time to use these codes given. First part was easy though after adding 48 apps, only 3 listed in archives. So went to next step (see bold and in red), returns E: Couldn't find package foo.
What do I do here?

Stephen

"foo" is just an example used, replace foo with the exact name of the package, apt-get -d will just download the package to *.../archives directory and not install it, so you can save it to somewhere safe and then install it.

Coffee
2010-07-29, 03:58
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?

linuxeventually
2010-07-29, 07:41
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
# mkdir /media/mmc1/debz

Copy all installed packages to SD card:
# cp /var/cache/apt/archives/*.deb /media/mmc1/debz/

Re-install packages at later date
Make folder/directory in Maemo
# mkdir /root/debz/

Copy packages from SD card to Maemo
# cp /media/mmc1/debz/*.deb /root/debz/

Install locally saved packages
# debzinstall() { cd /root/debz; foo=`ls *.deb`; dpkg -i $foo; }
# debzinstall

Coffee
2010-07-29, 21:42
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

linuxeventually
2010-07-29, 22:42
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:
foo=`dpkg -l | grep ii | awk '{ print $2 }'`; echo $foo > /media/mmc1/copymesomewheresafe
Explanation of code: List install packages via dpkg, then cut off the top row of output, then delete all but the second column and throw all of that in a variable called "foo". Then output the variable foo to a file on your SD card.

Restore:
bar=`cat /media/mmc1/copymesomewheresafe`; apt-get install $bar
Explanation of code: Output the contents of that saved file listing all your packages that you have saved on your SD card and throw that in a variable called "bar". Then tell apt-get to install everything in the variable bar.

Something 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.

Coffee
2010-07-29, 22:43
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?

Coffee
2010-07-29, 22:53
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

linuxeventually
2010-07-29, 23:36
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

# mkdir /media/mmc1/debz{,/archives}
# cp -r /var/cache/apt/archives/partial/ /media/mmc1/debz/archives/


3.) Re-download all packages to SD


# 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

# 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...

linuxeventually
2010-07-30, 05:58
@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:

#!/bin/bash
##########################################
# savedebz by Linux Eventually ver 0.5 ###
##########################################
# SD card install location
sdhc="/media/mmc1"

# Install packages back to Nokia Internet Tablet
if [ "$1" = "install" ];
then echo "Install packages from SD card to NXx0?";
read -p "Are you sure? (y/n): " confirminstall
fi
if [ "$confirminstall" = "y" ]; then
echo "Installing ... (this will take awhile)"
debzinstall() { alldebz=`cat $sdhc/installdebz`; apt-get -o dir::cache=$sdhc/debz install $alldebz; }
debzinstall
echo "debz installation complete"
exit 0
else if [ "$confirminstall" = "n" ]; then
echo "Installation not selected. Exiting."; exit 0
else if [ ! -z "$confirminstall" ]; then echo "Invalid selection"; exit 0
fi
fi
fi

# If invalid parameter then quit
if [ ! -z "$1" ];
then echo "ERROR Invalid parameter"
echo "Valid options are none or install"
exit 0
fi

# Ask user to execute script
if [ -z "$1" ]; then
echo "Download packages to SD card?";
read -p "Are you sure? (y/n): " confirmbackup
if [ "$confirmbackup" = "y" ]; then
echo "Installing ... (this will take awhile)"
else if [ "$confirmbackup" = "n" ]; then
echo "Download not selected. Exiting."; exit 0
else echo "Invalid selection"; exit 0
fi
fi
fi

# Create directory on SD card
if [ ! -d "$sdhc/debz/archives" ];
then
mkdir $sdhc/debz{,/archives}
cp -r /var/cache/apt/archives/partial/ $sdhc/debz/archives/
fi

# Save list of installed packages
dpkg -l | grep ii | awk '{ print $2 }' > $sdhc/alldebz;

# Save list of packages on SD
ls $sdhc/debz/archives/ | awk 'BEGIN{FS="_"};{print$1}' > $sdhc/debzsd;

# Compare files (to save bandwidth)
cd $sdhc
###########
## pdiff ##
###########
perl <<'EOF'
$output = newdebz;
chomp($output);
open a, "<alldebz";
open b, "<debzsd";
local $/;
my @a = split /\n/, <a>;
my @b = split /\n/, <b>;
my %b = map { $_ => 1 } @b; # Make hash of B
my @res = grep { !defined $b{$_} } @a; # Everything in A not in B
open myoutput, ">$output";
select myoutput;
print join "\n", @res;
print "\n";
EOF
###########

# Convert line breaks to spaces
foobar=`cat $sdhc/newdebz`; echo $foobar > $sdhc/installdebz
pkgz=`cat $sdhc/installdebz`

# Re-download packages and save them to SD card
apt-get -o dir::cache=$sdhc/debz --reinstall -d install $pkgz

echo "Finished."


USAGE:

Backup/Download files to SD
$ sudo savedebz

Restore/Install to N900/N8X0
$ sudo savedebz install

You will be prompted with a question to ask if you are sure, type y and press enter. Then apt-get will ask you if you are sure, type y and press enter. It may ask an additional question (install without verification) again y and press enter.

Coffee
2010-08-02, 01:43
Thanks mate, will download and give a try now.

Coffee
2010-08-02, 01:58
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.....

linuxeventually
2010-08-02, 05:14
EDIT: FIXED. Current version is 0.7 (Changelog: line 13 had a hardcode for sda2 and line 10 wasn't copying correctly so I split it)

Yeah the first line of the script lets you easily change the location of the SD card. Well the physical location of the partitions is usually very handy but in this case you need the mount point. Something like changing sdhc="/media/mmc1" to sdhc="/media/mmc2" would do the trick.

Don't worry finding the mountpoint is easy.
$ partmount() { df -h | grep /dev/$1 | awk '{ print $6}'; }
$ partmount mmcblk1p1

The output is the mount point for your microsd card. It should be /media/mmc2 or thereabouts.

Or you could just use the modified script (defaults to wherever /dev/mmcblk1p1 is mounted but prompts anyway, you can just hit enter):

#!/bin/bash
##########################################
# savedebz by Linux Eventually ver 0.7 ###
##########################################
# SD card install location
unset sdhc
unset partition
##sdhc="/media/mmc1"
read -p "Which partition on the SD \
card (default: mmcblk1p1)?: " partition;
sdhc=`df -h | grep /dev/$partition | awk '{ print $6 }'`;

if [ -z "$partition" ];
then sdhc=`df -h | grep /dev/mmcblk1p1 | awk '{ print $6 }'`;
fi
sdmount=`echo $sdhc`
mountmsg=`echo "Mountpoint:"`
sdmsg=`echo $mountmsg $sdmount`
echo $sdmsg

# Install packages back to Nokia Internet Tablet
if [ "$1" = "install" ];
then echo "Install packages from SD card to NXx0?";
read -p "Are you sure? (y/n): " confirminstall
fi
if [ "$confirminstall" = "y" ]; then
echo "Installing ... (this will take awhile)"
debzinstall() { alldebz=`cat $sdhc/installdebz`; apt-get -o dir::cache=$sdhc/debz install $alldebz; }
debzinstall
echo "debz installation complete"
exit 0
else if [ "$confirminstall" = "n" ]; then
echo "Installation not selected. Exiting."; exit 0
else if [ ! -z "$confirminstall" ]; then echo "Invalid selection"; exit 0
fi
fi
fi

# If invalid parameter then quit
if [ ! -z "$1" ];
then echo "ERROR Invalid parameter"
echo "Valid options are none or install"
exit 0
fi

# Ask user to execute script
if [ -z "$1" ]; then
echo "Download packages to SD card?";
read -p "Are you sure? (y/n): " confirmbackup
if [ "$confirmbackup" = "y" ]; then
echo "Installing ... (this will take awhile)"
else if [ "$confirmbackup" = "n" ]; then
echo "Download not selected. Exiting."; exit 0
else echo "Invalid selection"; exit 0
fi
fi
fi

# Create directory on SD card
if [ ! -d "$sdhc/debz/archives" ];
then
mkdir $sdhc/debz{,/archives}
cp -r /var/cache/apt/archives/partial/ $sdhc/debz/archives/
fi

# Save list of installed packages
dpkg -l | grep ii | awk '{ print $2 }' > $sdhc/alldebz;

# Save list of packages on SD
ls $sdhc/debz/archives/ | awk 'BEGIN{FS="_"};{print$1}' > $sdhc/debzsd;

# Compare files (to save bandwidth)
cd $sdhc
###########
## pdiff ##
###########
perl <<'EOF'
$output = newdebz;
chomp($output);
open a, "<alldebz";
open b, "<debzsd";
local $/;
my @a = split /\n/, <a>;
my @b = split /\n/, <b>;
my %b = map { $_ => 1 } @b; # Make hash of B
my @res = grep { !defined $b{$_} } @a; # Everything in A not in B
open myoutput, ">$output";
select myoutput;
print join "\n", @res;
print "\n";
EOF
###########

# Convert line breaks to spaces
foobar=`cat $sdhc/newdebz`; echo $foobar > $sdhc/installdebz
pkgz=`cat $sdhc/installdebz`

# Re-download packages and save them to SD card
apt-get -o dir::cache=$sdhc/debz --reinstall -d install $pkgz

echo "Finished."


Again run this as root.

linuxeventually
2010-08-02, 10:38
Current version is 0.9
* Now available in extras-devel (Fremantle, Diablo, Chinook)! :D

The savedebz script has no major bugs that I am aware of. Need to do a real-world test tomorrow.

Introducing zsavedebz, utilizing a simple zenity GUI it has the same functionality as savedebz.

zsavedebz has a couple minor bugs that I'll fix tomorrow.
* Zenity window sizes are too small
* Need to grep -v the virtual mountpoints from the dialog

TODO LIST:
* Better documentation
* Better description
* Icon and/or .desktop file(s) for zsavedebz
* Add check for root to both scripts using UID

After that, I'll check things over a few times (and get testers?) then I'll promote to extras.

USAGE:
Backup/Download
$ sudo savedebz
Follow directions from there

Restore/Install
$ sudo savedebz install

----------

Backup/Download
$ sudo zsavedebz
Follow popup questions and alerts

Restore/install
$ sudo zsavedebz install

It should install and work on any Debian-based system (of any arch), I'll test it with Ubuntu tomorrow.

Coffee
2010-08-03, 05:22
Linuxeventually,
I tried it mate and still got an error, something about not being able to create the folder and access the card. That said, I do have items on my card in the location, files I think. Something like newdebz, all debz etc. I ran the mounting code and returned "media/mmc1"
Q. Do I run this before I start downloading or after, silly question I am sure and expect after though just checking.

Stephen

Coffee
2010-08-03, 05:23
I created the folders myself and then ran it and still didn't work correctly.
Got the whole, installing, reading packages list, building dependency tree, stat info, then....
E: Handler silently failed
Finished.

I don't know why, in xterm I couldn't mkdir /media/mmc1/debz
though in file explorer I could create a folder. Anyway, just my feedback. I will flash it now and then try again.

linuxeventually
2010-08-03, 10:29
Yeah sorry, hold on. I didn't get to work on it today and I tested it on a clean install and the script is borked. Not sure if it's the lack of BASH or if it's something I changed. Working on it now =\

0.9 is not stable. Sorry. Unforseen bugs

Coffee
2010-08-03, 21:58
Not a problem mate nor a rush, most thank full you are even doing this.

linuxeventually
2010-08-03, 22:10
Yeah well it's something that has bothered my for a long time.

I always just figured there was a tool that already exists but the closest that I've seen is apt-cd and every time that I have used it, it didn't restored properly.

I was doing the majority of my testing in Scratchbox so I didn't notice some major issues that come up on the device. For instance the big issue right now is that because I have it "installing" (in order to download I have to tell it to reinstall the packages) ALL the packages on the system that includes packages that shipped with the firmware. Attempting to re-download those results in several conflicts and dependencies errors that I am unable to force and results in crashing the script. It seems my best bet in resolving that issue is to find a list of all stock packages and exclude them from the script.

More personal things came up last night so I didn't progress far but I definitely want to get this stable soon.

Coffee
2010-08-03, 22:18
Not having any idea at all, can it be done from another angle?
I noticed when I backup after install and setup done, the back up contains a list inside a zip in the location the backups are stored. Whilst it doesn't store a copy of the actual files required, it does a list. However it does it, it reads the list reads the list and then downloads them from repo's. Are we able to use the list, to download them and redirect those saved deb files to a folder and prevent from install. Then just need to know how to install those deb's that we have. I am sure this is pretty much what you are doing though can we use the backups list, does it make things any simpler?

linuxeventually
2010-08-03, 23:28
If you have a backup list that you'd like to send to me then I could implement that. I don't recall such a feature on the N810 but maybe I just wasn't looking in the right place.

But yeah all the script does right now is:
1. Ask dpkg to generate a list of installed packages and save that list to SD
2. Generate a list of packages stored on the SD (if any)
3. Download the installed package minus the ones already saved to SD (if any)

1. Download packages found on the SD card

I need to make it much smarter clearly as it fails pretty easily. But by having a proper list of what to download and what shouldn't be downloaded (installed by default) should eliminate the errors.

I came across Rob1n's package sources script which may help. This little endeavour is going to need to grow to get this properly done.

TO DO LIST
* Fix the depends bug
* Implement Rob1n's script as a possible solution or feature
* Implement a search for saved .debs anywhere in the home directory
* Implement better checking
* Implement not reinstalling any packages when restoring.
* More redundant checks, less redundant downloads

If anyone has any pointers, like for instance the URL of the page that has all the stock packages mirrored (I lost the link) please reply.

couldvbb
2010-08-03, 23:48
firefox ->/home/user/MyDocs/.documents

system->
/var/tmp (.install )
/home/user/MyDocs/.apt-archive-cache(.deb)
but Automatically cleared after installation
so Must download it before,Immediately extracted

Coffee
2010-08-04, 02:21
Linux,
Attached is my last backup mate, inside you will find an applications zip and inside it a list. Hope that helps any?
hmmmm, can't attach files, any suggestions, I can email if you like, PM me.
I had a look and it has 2 files:
catalogues.backup
packages.backups


Stephen

Coffee
2010-08-04, 02:24
opened in wordpad and list as follows:
catalogues.backup:
<catalogues>
<catalogue>
<file>variant-catalogues</file>
<id>nokia-certified</id>
</catalogue>
<catalogue>
<file>variant-catalogues</file>
<id>nokia-system</id>
</catalogue>
<catalogue>
<file>variant-catalogues</file>
<id>ovi</id>
</catalogue>
<catalogue>
<file>variant-catalogues</file>
<id>maemo-extras</id>
</catalogue>
<catalogue>
<uri>http://repository.maemo.org/extras-devel/</uri>
<dist>fremantle</dist>
<components>free non-free</components>
<name>Maemo Extras-Devel</name>
</catalogue>
<catalogue>
<uri>http://moff.mozilla.com/latest/maemo/multi/</uri>
<dist>chinook</dist>
<components>release</components>
<disabled/>
<name>Mozilla multi Catalog</name>
</catalogue>
<catalogue>
<uri>http://deb.opera.com/maemo</uri>
<components>non-free</components>
<disabled/>
<name>Opera Catalog</name>
</catalogue>
<catalogue>
<uri>https://downloads.maemo.nokia.com/fremantle/ssu/apps/</uri>
<dist>./</dist>
<components/>
<disabled/>
<name>fremantle ssu apps</name>
</catalogue>
<catalogue>
<uri>https://downloads.maemo.nokia.com/fremantle/ssu/mr0/</uri>
<dist>./</dist>
<components/>
<disabled/>
<name>fremantle ssu mr0</name>
</catalogue>
<catalogue>
<uri>https://downloads.maemo.nokia.com/fremantle1.2/ovi/</uri>
<dist>./</dist>
<components/>
<disabled/>
<name>fremantle1.2 ovi</name>
</catalogue>
</catalogues>

packages.backup:
<backup>
<pkg>ttf-droid</pkg>
<pkg>storageusage</pkg>
<pkg>rulerjinni</pkg>
<pkg>openssh-server</pkg>
<pkg>wifieye</pkg>
<pkg>d-theme-night</pkg>
<pkg>multiboot</pkg>
<pkg>feedservice2</pkg>
<pkg>gnumeric</pkg>
<pkg>easy-deb-chroot</pkg>
<pkg>conky</pkg>
<pkg>zip</pkg>
<pkg>drnoksnes</pkg>
<pkg>feedservice-plugin-fb-common</pkg>
<pkg>knots2</pkg>
<pkg>account-plugin-haze</pkg>
<pkg>ogg-support</pkg>
<pkg>nitdroid-kernel-2.6.28-05</pkg>
<pkg>foreca-weather-applet</pkg>
<pkg>feedservice-plugin-fb</pkg>
<pkg>facebook-services</pkg>
<pkg>googlelatitude</pkg>
<pkg>kernel-power-flasher</pkg>
<pkg>vgba</pkg>
<pkg>purple-extra-protocols</pkg>
<pkg>dtg</pkg>
<pkg>python2.5-qt4</pkg>
<pkg>fb-migrator</pkg>
<pkg>simple-fmtx-widget</pkg>
<pkg>openssh-client</pkg>
<pkg>sharing-service-facebook</pkg>
<pkg>rootsh</pkg>
<pkg>multiboot-extras</pkg>
<pkg>personal-gprs-mon</pkg>
<pkg>opera-mobile</pkg>
<pkg>fennec</pkg>
<pkg>xournal</pkg>
<pkg>healthcheck</pkg>
<pkg>personal-ip-address</pkg>
<pkg>leafpad</pkg>
<pkg>kexec-tools</pkg>
<pkg>cuteexplorer</pkg>
<pkg>foreca-installer</pkg>
<pkg>autodisconnect</pkg>
<pkg>sharing-service-photobucket</pkg>
<pkg>dtg-installer</pkg>
<pkg>lzma</pkg>
<pkg>telepathy-msn-pecan</pkg>
<pkg>decoders-support</pkg>
<pkg>grsync</pkg>
<pkg>conversations-inbox-widget</pkg>
<pkg>ecoach</pkg>
<pkg>custom-operator-name-widget</pkg>
<pkg>easy-chroot</pkg>
<pkg>facebook-installer</pkg>
<pkg>kernel-power-settings</pkg>
<pkg>petrovich</pkg>
<pkg>headphoned</pkg>
<pkg>fm-boost</pkg>
<pkg>matrix</pkg>
<pkg>d-theme-aero-blue</pkg>
</backup>

Coffee
2010-08-04, 22:52
posted by Mohamod AG

Ovi Store paid debs: /var/tmp
Other debs: /home/user/MyDocs/.apt-archive-cache
debs installed through apt-get: /var/cache/apt/archives

Hope that helps

Patroclo
2010-08-04, 23:18
I assume N900 user? Additionally I assume Maemo5? This won't work for anything downloaded from ovi store fyi.

Save the .deb packages locally and copy them somewhere.
Then you can simply copy them back to the N900 and dpkg -i *.deb



How can I download the files instead of intalling them?
In the Maemo Downloads there is just the Install option.

Coffee
2010-08-08, 22:32
This thread died quickly, lol