maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   Reinstalling packages from base OS2008 install (https://talk.maemo.org/showthread.php?t=16551)

deeteroderdas 2008-02-13 03:23

Reinstalling packages from base OS2008 install
 
Ok, I got stupid and tried cleaning up my tablet by 'apt-get remove'-ing what I thought (and still do) were unnecessary debs. Specifically, the locale files for mediaplayer. I didn't see the reason for having the de_DE, es_ES, etc., files. So, I ssh'd in from my desktop (to have real estate on a larger screen) and started in. Thanks to not paying attention, attempting to remove the first file resulted in mediaplayer-ui and a few other support files being removed. No problem, thought I, I'll just "apt-get install" them all back in. Nope, I get

Nokia-N800-50-2:~# apt-get install mediaplayer-ui
Reading package lists... Done
Building dependency tree... Done
Package mediaplayer-ui is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package mediaplayer-ui has no installation candidate


Even red pill mode doesn't work. Great. Please don't say I'm gonna have to reflash "just" to get mediaplayer back. Mediaplayer may have a minimal GUI, but it has a great selection of Internet radio stations to choose from. In fact, if the other media players available for the NIT would use that list, I wouldn't be so upset.

Anyone know how I can fix this? Thanks for any advice.

RioT 2008-02-13 03:43

Re: Reinstalling packages from base OS2008 install
 
Maybe trying to completely remove mediaplayer????
Anyway, reflashing isn't all that bad now. You will spend more time trying to find a way around it than you would reflashing.

deeteroderdas 2008-02-13 03:47

Re: Reinstalling packages from base OS2008 install
 
Quote:

Originally Posted by RioT (Post 141789)
Maybe trying to completely remove mediaplayer????
Anyway, reflashing isn't all that bad now. You will spend more time trying to find a way around it than you would reflashing.

Completely removing might work (can't hurt, at this point). However, since I am booting off MMC, and have quite a bit of stuff installed, I don't want to go through all that again.

You're right, though. The actual reflashing isn't all that bad...

free 2008-02-13 12:37

Re: Reinstalling packages from base OS2008 install
 
Looks like mediaplayer-ui is in the flash image but nowhere else...
You could grab the flash image, extract the rootfs and copy the files to your IT
The list of files for mediaplayer-ui is:
PHP Code:

/home/user # dpkg -S mediaplayer-ui
mediaplayer-ui: /usr/bin/mediaplayer-ui
mediaplayer
-ui: /etc/osso-backup/applications/mediaplayer-ui.conf
mediaplayer
-ui: /usr/share/doc/mediaplayer-ui/README
mediaplayer
-ui: /usr/share/doc/mediaplayer-ui/copyright
mediaplayer
-ui: /usr/bin/mediaplayer-ui.launch
mediaplayer
-ui: /etc/osso-rfs-scripts/mediaplayer-ui-rfs.sh
mediaplayer
-ui: /usr/share/mime/packages/mediaplayer-ui.xml
mediaplayer
-ui: /usr/share/doc/mediaplayer-ui/changelog.Debian.gz
mediaplayer
-ui: /usr/share/doc/mediaplayer-ui 

But your system will have no knowledge that the package mediaplayer-ui is installed as the above is just manually putting the contained files on your filesystem. Theorically, in the future, you could have dependencies problem. In practice, no clue..

But that's good to know that this package and probably a lot others are not available. I don't see why they would have done this..

deeteroderdas 2008-02-13 12:46

Re: Reinstalling packages from base OS2008 install
 
Quote:

Originally Posted by free (Post 141895)
Looks like mediaplayer-ui is in the flash image but nowhere else...
You could grab the flash image, extract the rootfs and copy the files to your IT
The list of files for mediaplayer-ui is:
PHP Code:

/home/user # dpkg -S mediaplayer-ui
mediaplayer-ui: /usr/bin/mediaplayer-ui
mediaplayer
-ui: /etc/osso-backup/applications/mediaplayer-ui.conf
mediaplayer
-ui: /usr/share/doc/mediaplayer-ui/README
mediaplayer
-ui: /usr/share/doc/mediaplayer-ui/copyright
mediaplayer
-ui: /usr/bin/mediaplayer-ui.launch
mediaplayer
-ui: /etc/osso-rfs-scripts/mediaplayer-ui-rfs.sh
mediaplayer
-ui: /usr/share/mime/packages/mediaplayer-ui.xml
mediaplayer
-ui: /usr/share/doc/mediaplayer-ui/changelog.Debian.gz
mediaplayer
-ui: /usr/share/doc/mediaplayer-ui 

But your system will have no knowledge that the package mediaplayer-ui is installed as the above is just manually putting the contained files on your filesystem. Theorically, in the future, you could have dependencies problem. In practice, no clue..

But that's good to know that this package and probably a lot others are not available. I don't see why they would have done this..

Thanks for the information. I had thought of that, and rejected it for just the reason you mentioned. It's something to keep in mind.

If I recall, we've been promised that the next OS upgrade will be the last one requiring a flash. Upgrades after that will be done "normally" (hopefully Debian-like).

Like I said, I just don't want to have to reinstall everything AGAIN.

free 2008-02-13 13:26

Re: Reinstalling packages from base OS2008 install
 
Quote:

Originally Posted by deeteroderdas (Post 141898)

Like I said, I just don't want to have to reinstall everything AGAIN.

List of _installed_ packaged
dpkg --get-selections | grep "[^a-z]install" > /media/mmc/packages.txt

Flash

On new filesystem, inject the list:

dpkg –set-selections < /media/mmc/packages.txt

And then ask the system do the operations of fetching packages:

apt-get dselect-upgrade


I've never tried it yet but this should work.

For upgrade process (OS2007->OS2008), this is much more complicated.

fanoush 2008-02-13 13:30

Re: Reinstalling packages from base OS2008 install
 
there is tool called dpkg-repack that could pack already installed package back to deb so in theory you could do it in flash and reinstall to mmc. Never tried but expect it to be not so easy since dpkg-repack may depend on some debian stuff not installed. But you can check what it does and do it by hand (even on linux PC), deb format is two tar archives joined by ar. or you can copy it over directly

apart from real package files you also need package specific files in
/var/lib/dpkg/info/
and also correct entry in /var/lib/dpkg/status where debian keeps list of installed packages. You can mount flash partition when booted from mmc and and copy files over and see status file in flash for entries of missing packages

EDIT:

source of dpkg-repack is here and sadly it is written in perl
http://git.kitenet.net/?p=dpkg-repac...974f5ada6d177c
still it would not be so hard to rewrite it or do same thing by hand

Johnx 2008-02-13 13:52

Re: Reinstalling packages from base OS2008 install
 
deeteroderdas: if you have access to a debian (or ubuntu) box with a card reader an alternative approach may be more straightforward:
1) clone the internal flash (with intact mediaplayer-ui) to an ext2 partition on an sd card.
2) put that card in the debuntu box
3) dpkg-repack --root=/media/my-sd-card --arch=armel mediaplayer-ui

it will complain about missing files under /usr/share/doc but this shouldn't be a problem.

Good luck!

fanoush 2008-02-13 13:52

Re: Reinstalling packages from base OS2008 install
 
So basically for each missing package you need to copy over files in
/var/lib/dpkg/info/${package}.list
/var/lib/dpkg/info/${package}.conffiles
copy over
/var/lib/dpkg/info/${package}.*

and add to status file in broken system output of
dpkg -s ${package}
from working system (can be done via 'chroot /opt dpkg -s ${package}' when you have working system mounted to /opt or wherever)

TA-t3 2008-02-13 13:54

Re: Reinstalling packages from base OS2008 install
 
I installed perl and had dpkg-repack working some nine-ten months back, it wasn't hard to do and it worked nicely (I used it for making debs out of unavailable packages so that I could install them in scratchbox, for some things I was working on).

As I recall dpkg-repack needed some other minor things, which I added as I went along. But I don't remember details, and I lost my installation due to a reflash last summer (when the skype version arrived). It's a very useful tool though, I use it on my desktop for e.g. when I want to keep a copy of a version of a package that's already disappeared from the repository. On the tablet it's even more useful because not all packages are actually made available, as described by earlier posters.


All times are GMT. The time now is 09:39.

vBulletin® Version 3.8.8