[maemo-developers] Optification breaks package on upgrade from non-optified older version

From: Marius Gedminas marius at pov.lt
Date: Fri Oct 16 11:11:45 EEST 2009
On Fri, Oct 16, 2009 at 01:43:12AM +0300, Mikko Vartiainen wrote:
> > What's the practical difference between upgrading and
> > removing-then-reinstalling?  (It probably shows that I haven't read the
> > "maemo-optify and python apps" thread.)  Maybe you could fix the upgrade
> > problem by writing a suitable preinst script?
> I have noticed with upgrading from non optified packages to
> maemo-optified packages that directory links are not created.

I've read somewhere that dpkg is unable to replace directories with

> For example if I first have installed a package with a directory
> /usr/share/games/crimson and upgrade to a package which has optified
> directory /usr/share/games/crimson ->
> /opt/maemo/usr/share/games/crimson, the link is not created because
> dpkg never removes /usr/share/games/crimson directory. Result is that
> I have empty /usr/share/games/crimson directory and all of it's
> content in /opt directory.

Perhaps a solution is to have maemo-optify keep the directory structure
in place and create symlinks only for regular files.

> I think it's a bug in dpkg or then we are just using it wrong.
> Workaround for this would be to remove the directory in preinst script
> or to install to another directory. But currently when all users are
> more or less beta testers I don't care about it.

Removing the directory is a bit scary: what if other packages have files
in it?  This is maybe not applicable to this particular example, but I
could imagine crimson-extra-levels or crimson-updated-sound-pack
putting stuff there.

Marius Gedminas
"question = (to) ? be : !be;" -- Shakespeare
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.maemo.org/pipermail/maemo-developers/attachments/20091016/1624c87f/attachment.pgp 
More information about the maemo-developers mailing list