Comment 15 for bug 932860

Revision history for this message
Steve Langasek (vorlon) wrote :

Adam,

> Updated patch to remove unecessary packaging for xsession
> and to confirm that @moduledir@ is updated to its respective
> arch location during builds.

This wasn't unnecessary. Without this change, the resulting appmenu-gtk package is not multiarch-coinstallable, because each package will contain an /etc/X11/Xsession.d/80appmenu with different contents (because of the embedded arch string). So the latest patch is definitely incorrect, you won't be able to coinstall amd64 and i386 versions of appmenu-gtk.

The reason for the file check is, ostensibly, to make sure we don't try to set $UBUNTU_MENUPROXY when the appmenu-gtk package has been removed but not purged; since /etc/X11/Xsession.d/80appmenu is a config file, it's left on the filesystem when the package is in that state, so you want to check that the package is really installed before setting this variable that's going to spew warnings if it's wrong.

Since there's no filesystem check we can do to verify the package's status which isn't either a) architecture-dependent or b) dependent on /usr/share/doc (which sometimes gets purged), I think it's best to ask dpkg directly:

if dpkg-query --showformat '${Status}' -W appmenu-gtk | grep -q 'install ok installed'
then
  export UBUNTU_MENUPROXY=libappmenu.so
fi

Can you try changing 80appmenu.in to use this approach, and test that it works (including when amd64 and i386 versions are co-installed)? You'd do that by logging out and logging back in, and verifying that your menus are all still up in the top bar where you expect them.