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

From: Tran Van Hoang ext-tranvan.huang at nokia.com
Date: Tue Nov 21 13:24:08 EET 2006
On Sat, 2006-11-18 at 16:26 +0000, ext Martin Guy wrote:
> 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.
yep, it's a bug in the postrm script.  And it's the "set -e" option at
the beginning of the postrm script that causes the script to exit,
leaving sources.list being empty.

> 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
> 
Plus, you need to uncomment the line
set -e
as well , for the error case if your sources.list contains only scirocco
repo

This will be posted somewhere on the website too to document about this
issue.

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

What i think should be done is not to provide those maemo-*-repository
at all. In anycase, /etc/apt/sources.list should be edited manually
So those handy maemo-*-repository packages will be removed from scirocco
repo.

> 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
> 
On behalf of the package creator, i'm sorry. It's also my fault where I
should have realised the problem too when making scirocco. 

Thanks for reporting,
TranVan Hoang,


More information about the maemo-developers mailing list