![]() |
N900 package/repo backup
Dear Community,
I'm not familiar with the way N900 operates to get packages installed (coming from SuSE's yast/RPM world). But I had to learn in the past that web-sources are not permanently reliable concerning package availability. So what I'd like to do, is to backup on my PC all the "packages" that I installed on my N900 and found useful. Why? Say my Phone crashes in 2 months - I reinstall to FW/OS, then want to reinstall my favourite Radio-Application and realize: no longer available on the Internet... But for my Question: following downloadlinks (or even worse using the application manager) does not necessarily offer me a package, but rather some "xxxx.install" file, which doesn't contain the package. So what do I have to do to really get the package downloaded? |
Re: N900 package/repo backup
Dpkg is the equivalent application to rpm. Use it to create a list of your installed applications
Code:
dpkg -l|awk '/^ii/{ print $2 }' >pkgs_installed.txtNow download them with apt-get from the repos Code:
apt-get update && apt-get install -dy $(<pkgs_installed.txt)Edit: Fixed the path to the archives in /opt... |
Re: N900 package/repo backup
Just to get you right: Using the second command on my N900 will place all installed packages in the directory "/opt/var/cache/archives"?
And once i backuped this directory's content, I can savely remove it from the N900 without crashing the system? Last question: if I should happen to need to reinstall all the packages: Where would I have to put them on the N900? What command would I have to use for that? Big thanks so far. |
Re: N900 package/repo backup
Okay that was a it in a hurry, sorry.
The second command i gave you will refresh the package list first and then get each package from the list and 'install' it, but with the -d option you just download it. This would go to /var/cache/apt/, this directory is linked to /opt/var/cache/apt/. Inside is the directory /archives where you will find all the downloaded packages. Copy the folder to some safe storage and also add the generated list. For reinstallation there is the need to install rootsh from extras repo before you could do anything relevant as 'local linux-guru'. This step also refreshes the package list for apt-get to work. a) Then copy the folder back to the mentioned directory, grab the corresponding list and Code:
apt-get install $(pkgs_installed.txt)Or B) You could also change into the directory and install all of the packages with a wildcard Code:
dpkg -i *.debCode:
dpkg --configure -aCode:
apt-get install -fEDIT: I fixed the directory in my former post to contain the right path. |
Re: N900 package/repo backup
michaaaarrrrggghhhh62!
Thanks for that. |
Re: N900 package/repo backup
Once again thanks - but now two questions come up:
1) You mentioned, that I should get the downloaded packages off my device or I might face diskspace trouble. I asked, whether it was save to delete them from /opt/var/cache/apt/archives. So, can I savely do that? 2) As I start with "apt-get update && apt-get install -dy $(<pkgs_installed.txt)" my N900 starts downloading packages. [Edit:] I think managed to unistall the broken package, rebuilt package list with command(1) and executed command(2) Now I get: (...) Hit http://repository.maemo.org fremantle/non-free Packages Hit http://edu.kde.org stable/ Packages Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. But looking into: /opt/var/cache/apt/archives I can only see python related debs. But none for eg marble which is installed on my N900. |
Re: N900 package/repo backup
To 1) I would move them from the device to external storage, may that be another microSD or some PC does not matter.
To 2) Well, these are only the packages, that do not come with a standard firmware image, you are seeing or those that are in the repos in a newer version than the pre-installed versions. |
Re: N900 package/repo backup
Wel,l thanks for explaining.
Maybe I didn't express exactly enough, what I wanted to do. I want to backup all packages that are not part of the standard intallation (and not those, that are newer then the ones I installed). So lets say I installed marble 1.0.0 (which is a Navigation SW) from the internet repo. Then I'd like to backup all needed packages to be able to reinstall marble on a clean standard installation WITHOUT needing access to the internet repository. [Edit:] Currently I only see (no Addblock-Plus, no marble, no FM Radio): lock partial pymaemo-optify_0.5_all.deb python-cairo_1.4.12-1.2maemo2_armel.deb python-central_0.6.11.1maemo2_all.deb python-dbus_0.83.0-1maemo3_armel.deb python-gconf_2.26.1-1maemo1_armel.deb python-gobject_2.16.1-1maemo2_armel.deb python-gst0.10_0.10.14-2maemo5_armel.deb python-gtk2_2.12.1-6maemo10_armel.deb python-hildon_0.9.0-1maemo18_armel.deb python-minimal_2.5.2-3maemo4_all.deb python-notify_0.1.1-2maemo1_armel.deb python-numeric_24.2-9maemo4_armel.deb python-osso_0.4-0maemo5_armel.deb python-support_1.0.6maemo1_all.deb python2.5-minimal_2.5.4-1maemo6_armel.deb python2.5_2.5.4-1maemo6_armel.deb python_2.5.2-3maemo4_all.deb |
Re: N900 package/repo backup
Well,it is far, far above my regex knowledge [being a builder] to try to subtract the pre-installed packages from the pkgs_installed.txt, you generated with the command #1.
But you could try to download the packages by actually making the process you want to be prepared for: Generate the list, flash the firmware, get rootsh installed via HAM, install the rest of your packages through command #2. Better do it on a relaxed Saturday morning, than late Sunday night to have it ready on Monday morning :D |
Re: N900 package/repo backup
Hmm - getting prepared for the "Supergau" by starting it testwise...;)
There should be some easier way? Isn't it possible to download a whole repository for a known program? I mean, I know the download source for a certain program (e.g. marble). Klicking on that link causes my N900 to perform certain actions to install this software. Clicking that link on a PC results in downloading the following file: stable.install Content: [catalogues] catalogues = marble-stable [install] catalogues = marble-stable package = marble [marble-stable] name = Marble (Stable) uri = http://edu.kde.org/marble/downloads/maemo/fremantle dist = stable/ What does N900 do with this info? What do I need to do to achive the same on a PC for obtaining the relevant installation packages? Possible alternative: Is it possible to get ALL installed packages (including standard installation) into a directory and copy these? (Because the initially given command (1) causes a full list (of packages?) to be created, but the command (2) only gives the small excerpt of these (as stated, only those python related packages can be found). But big thanks to you for helping me so many times... |
Re: N900 package/repo backup
Quote:
The .install txt file only give the initial package and the containing repository to the application manager. It then calculates the dependencies and pulls them as well from the repo. You could do this for marble by reading the output of Code:
apt-cache depends marbleThat is boring! Also keep in mind. HAM always uses 'apt-get clean' after each installation and fapman could be configured the same, so they always wipe the download directory. |
Re: N900 package/repo backup
As luck would have it, I saw a web page earlier today that might be useful in providing a bit of background into Debian package management. Obviously, only the bits that refer to apt-get and dpkg are relevant to Maemo as there is no Aptitude (Shame, as it's my preferred solution..), Synaptic etc. Hope it's useful! :D
|
Re: N900 package/repo backup
Quote:
http://maemo.org/packages/view/aptitude-dbg/ |
| All times are GMT. The time now is 08:13. |
vBulletin® Version 3.8.8