purging a package for different architecture may delete files needed for the actual architecture

Bug #884979 reported by Párkányi, Balázs
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glib2.0 (Ubuntu)
New
Undecided
Steve Langasek

Bug Description

After installing adobe-flashplugin on my 64-bit system (11.10) I removed all the packages for i386 architecture. Then I purged them. After restarting the machine, the default Ubuntu session stopped working. I found that when I purged package libglib2.0-0:i386, dpkg deleted the file /usr/share/glib-2.0/schemas/gschemas.compiled. However it also belongs to libglib2.0-0. I supposed that the library missed this file, because after copying it back, my box started to work again.
I do not know, if it is a serious problem, but dpkg should handle these cases, when there are packages installed for different architectures. May hard linking the same files prevent unwanted deletion?

Tags: multiarch
Revision history for this message
Raphaël Hertzog (hertzog) wrote :

This is a bug of libglib2.0-0 because its postrm purge removes it unconditionnaly even if the package is still installed on another architecture.

Cf the extract below of /var/lib/dpkg/info/libglib2.0-0:i386.postrm
if [ "$1" = purge ] && [ -d /usr/share/glib-2.0/schemas ]; then
    # Purge the compiled schemas
    rm -f /usr/share/glib-2.0/schemas/gschemas.compiled
    rmdir -p --ignore-fail-on-non-empty /usr/share/glib-2.0/schemas
fi

affects: dpkg (Ubuntu) → glib2.0 (Ubuntu)
tags: added: multiarch
Revision history for this message
Párkányi, Balázs (balazs-fang-deactivatedaccount) wrote : Re: [Bug 884979] Re: purging a package for different architecture may delete files needed for the actual architecture

> This is a bug of libglib2.0-0 because its postrm purge removes it
> unconditionnaly even if the package is still installed on another
> architecture.
>
> Cf the extract below of /var/lib/dpkg/info/libglib2.0-0:i386.postrm
> if [ "$1" = purge ] && [ -d /usr/share/glib-2.0/schemas ]; then
> # Purge the compiled schemas
> rm -f /usr/share/glib-2.0/schemas/gschemas.compiled
> rmdir -p --ignore-fail-on-non-empty /usr/share/glib-2.0/schemas
> fi

Yes, I saw the same, but I did not look after the problem deeply, so I
thought dpkg is unaware of this kind of problem.

Sorry for rhe bug report addressed to the unappropriate package and
thanks for correcting me so fast!

balazs

Steve Langasek (vorlon)
Changed in glib2.0 (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.