[maemo-developers] [maemo-developers] maemo repository update remotely breaks every rootfs on the planet

From: Martin Guy martinwguy at yahoo.it
Date: Sat Nov 18 18:26:13 EET 2006
Hi
   TO celebrate the release of maemo-2.1 developer rootfs, Nokia have
deleted the
maemo-contrib-repository and maemo-repository toy packages.
   Unfortunately the post-removal scripts are so incompetently written
that, as soon as you use "apt-get" or "dpkg" for anything, they
automatically and completely erase the contents of your
/etc/apt/sources.list file but leave themselves installed. Thus, even
if you restore the contents of sources.list, they continue to wipe the
contents of it forever.

Symptom: apt-get or dpkg says:

(Noting disappearance of maemo-contrib-repository, which has been
completely replaced.)
...
subprocess post-removal script (for disappearance) script returned
error exit status 1

To fix this, you need to edit the two files
/var/lib/dpkg/info/maemo*repository.postrm and in each one change the
line:

cat /etc/apt/sources.list | grep -v -e "[deb|deb-src] $REPOSITORY" >
/etc/apt/sources.list

to the two lines:

a=`cat /etc/apt/sources.list | grep -v -e "[deb|deb-src] $REPOSITORY"`
echo "$a" > /etc/apt/sources.list

and if your system has already been crippled by this bug, restore the
contents of /etc/apt/sources/list from somewhere, for example:

#maemo:essential
deb http://catalogue.tableteer.nokia.com/certified/     mistral user
deb http://catalogue.tableteer.nokia.com/non-certified/ mistral user
deb http://repository.maemo.org/contrib/ mistral free non-free
deb-src http://repository.maemo.org/contrib/ mistral free non-free
deb http://repository.maemo.org/ mistral free non-free
deb-src http://repository.maemo.org/ mistral free non-free

Everything should work ok then, except that the removal of these two
packages leaves user with no repositories specified in their
sources.list, so they cannot even apt-get from the original repo.

For Nokia there is no solution except to put these two packages back
in the mistral repo exactly as they were instead of trying to move the
ground under people's feet. Even if nokia try to "upgrade" these toy
packages to point at the maemo-2.1 repository instead, the postrm
scripts will still wipe /etc/apt/sources.list first. Just leave us
alone!

Thanks for all the other work in Maemo Mistral. It has been an
enormous boost to my work, and I'm sorry you (and we) were let down by
one incompetent programmer and an absence of QA

Bless

    M

More information about the maemo-developers mailing list