maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   extract deb file from n900 (https://talk.maemo.org/showthread.php?t=78562)

abuakram 2011-10-06 13:59

extract deb file from n900
 
Hi.........

Since I'm living in a country which is restricted by nokia, I can't download any files from ovi store or from nokia's repository. But since I traveled to another country nearby I used this opportunity to download what I wanted and voila.

But I want to flash my n900...

Is there a way to extract deb files and store them so that to install them after the flashing?

Or simply making a backup of certain files, games, apps?

abuakram 2011-10-06 16:42

Re: extract deb file from n900
 
hmmmmmmmmm, seems like it's not possible since no reply

Drexxx 2011-10-06 17:16

Re: extract deb file from n900
 
I am not sure about what you want, but I think this could help you:
To download a deb, from console and apt-get:
Code:

aptitude download name_of_package
If you want to install it, you don't have to extract the deb. Simply do this:
Code:

dpkg -i name_of_package.deb

abuakram 2011-10-06 17:25

Re: extract deb file from n900
 
Quote:

Originally Posted by Drexxx (Post 1104228)
I am not sure about what you want, but I think this could help you:
To download a deb, from console and apt-get:
Code:

aptitude download name_of_package
If you want to install it, you don't have to extract the deb. Simply do this:
Code:

dpkg -i name_of_package.deb

thankx for your reply

I have no problem with downloading and installing

my question explained, that I have an app installed on my n900, let's say, Panorama.

Can I extract Panorama with all it's dependencies from N900 into a deb file?

demolition 2011-10-06 17:28

Re: extract deb file from n900
 
The above works fine for downloading from the maemo.org repositories but does it work from Ovi store too? I mean can aptitude get stuff from Ovi and not unpack it, especially paid-for s/w?

When you do a back-up with either Ovi suite or the build in back up tool, it stores a list of installed software (for better or for worse!). I think this is supposed to allow you to reinstall s/w, including paid-for items without paying again. You seem to have problems the Ovi servers, which might prevent the above working though.

demolition 2011-10-06 17:32

Re: extract deb file from n900
 
Quote:

Originally Posted by abuakram (Post 1104236)
thankx for your reply

I have no problem with downloading and installing

my question explained, that I have an app installed on my n900, let's say, Panorama.

Can I extract Panorama with all it's dependencies from N900 into a deb file?

I think the dependencies for stuff in Ovi is stored in the Applications and Nokia SSU repositories. Can someone confirm this?
AFAIK, there's no way of telling from Ovi, what the dependencies are, in the same way once can from maemo.org's package interface. Again, if I'm wrong please, someone, correct me.

Drexxx 2011-10-06 18:57

Re: extract deb file from n900
 
Quote:

Originally Posted by abuakram (Post 1104236)
thankx for your reply

I have no problem with downloading and installing

my question explained, that I have an app installed on my n900, let's say, Panorama.

Can I extract Panorama with all it's dependencies from N900 into a deb file?

Ah! Sorry, I didn't understand you.
AFAIK, downloading from OVI store is not possible.
And downloading Panorama (for example) and it's dependencies could be possible if you make a script.
Take a look at this.
However, I think it is difficult, because, what happen with dependencies of dependencies? I mean, maybe you have to download a lot of packages. Too much packages if you are going to reflash your N900...
Hope I helped you.
And sorry if I don't speak English very well...

abuakram 2011-10-06 19:09

Re: extract deb file from n900
 
Quote:

Originally Posted by Drexxx (Post 1104292)
Ah! Sorry, I didn't understand you.

You still didn't understand me....................help

I don't want to download from OVI

I already have all applications I want on my device

I want to back up these applications with it's dependencies (the ones in my device) before I flash it, so I don't need to find a way with OVI.........

for example: if you type in terminal:

sudo apt-get remove panorama

panorama and all it's dependencies will be removed

I want a way like this:

sudo apt-get backup panorama

so that instead of removing it, it backs it up in a deb file including dependencies.

pusak gaoq 2011-10-06 19:34

Re: extract deb file from n900
 
install backupmenu.... :D

abuakram 2011-10-06 19:38

Re: extract deb file from n900
 
Quote:

Originally Posted by pusak gaoq (Post 1104326)
install backupmenu.... :D

that's for the whole system, right? not for a single app.

guyr 2011-10-06 19:53

Re: extract deb file from n900
 
dpkg-repack
but be carefull with (post|pre)-install scripts ... the generated package is not exactly the same as the original one.
I think you can get dpkg-repack from debian repository (it's a perl script)

don_falcone 2011-10-06 20:47

Re: extract deb file from n900
 
Why not jsut use BackupMenu, then? it's made for the purpose and it's easy to use. But i think there is a way to repackage everything using dpkg-deb...

sicelo 2011-10-06 20:48

Re: extract deb file from n900
 
what about a simple :

Code:

cp /var/cache/apt/archives/*.deb /home/user/MyDocs/my_packages/
this copies the debs to the given folder. of course, you have to run the command every now and then, lest some debs get flushed. it seems that this will suffice for non-programers like me, who just need to be able to re-install packages without re-downloading. (of course, all the general risks of doing things as root apply)

However, this doesn't explicitly group applications with their dependencies, but they are still there, and can be installed via

Code:

dpkg -i ...
as mentioned before by others. I actually use the above method on my Debian PC which rarely gets access to Internet connection.:D

and, great link Drexxx

tuxsavvy 2011-10-07 06:39

Re: extract deb file from n900
 
Initially I used dpkg-repack but that won't include manpages for instance for all the installed debs. I also made a simple script to do all that as well but I found out red pill mode gives an option for one to disable cleaning apt cache which would leave all the downloaded debs in /home/user/MyDocs/.apt-archive-cache/ as per wiki states.

Though using this would only be effective for HAM (Hildon Application Manager), which meant that if say for example you used apt-get or FAM (Faster Application Manager) those deb files for instance would be saved in /var/cache/apt/archives.

Needless to say is that you can optify /var/cache/apt but for making /home/user/MyDocs/.apt-archive-cache the only place for downloaded debs to go you will need to add a line into your /etc/apt/apt.conf.d/00maemo:
Code:

Dir::Cache::Archives "/home/user/MyDocs/.apt-archive-cache";
This of course will not work in cases like using aptitude download where it will just download the deb file into your pwd (present working directory).

As for installing debs and its dependencies automatically, dpkg does not natively do that. For getting it to work you'll need to create a small apt repository (and ideally not on your device as reflashing will make you lose your setup).

abuakram 2011-10-07 18:11

Re: extract deb file from n900
 
thanks to all of you, helped me alot

I don't mind if someone came up with a more affective way

peter2p 2011-10-08 18:26

Re: extract deb file from n900
 
Quote:

Originally Posted by abuakram (Post 1104327)
that's for the whole system, right? not for a single app.

backupmenu works great but why not copy the deb files to your pc and after the flash, reinstall and maybe do an apt-get update and apt-get upgrade for missing or unmet dependencies.

IsaacDFP 2012-04-09 18:05

Re: extract deb file from n900
 
Quote:

Originally Posted by peter2p (Post 1105538)
b... but why not copy the deb files to your pc ...

Where are the debs situated when you download them from the store...? Specifically for harmattan though... I'm not a fan of the backup/restore process, I'd rather keep myself a folder of my deb files and choose what and when to install.

timoph 2012-04-09 19:25

Re: extract deb file from n900
 
I'd guess Harmattan does not keep a cache for store packages simply because that would enable people easily to redistribute paid / non-free stuff.


All times are GMT. The time now is 07:18.

vBulletin® Version 3.8.8