← Back to team overview

touch-packages team mailing list archive

[Bug 1371574] Re: After installing clicks to /custom/click, /usr/share/click/preinstalled version are still preferred

 

This is quite an interesting problem.  I think I've tracked it down to
Hook.install_link, which calls DB.get_path to work out where a package
lives so that it can set the symlink to point to the right place, and
that walks the database from the bottom up.  On one level this is
clearly wrong; but we have to be careful here, particularly in the area
of multi-user support.  Consider this situation:

  Initial state:
    /usr/share/click/preinstalled: org.example.foo 1.0, --all-users
    /opt/click.ubuntu.com: org.example.foo 1.1, --user=cjwatson

    This is clear: user cjwatson has upgraded that package from the
store, but we are to leave the package at version 1.0 for all other
users.  There's no conflict as we can simply run system hooks for both
org.example.foo 1.0 and org.example.foo 1.1, creating AppArmor profiles
for both.

  After system image upgrade:
    /usr/share/click/preinstalled: org.example.foo 1.1, --all-users
    /opt/click.ubuntu.com: org.example.foo 1.1, --user=cjwatson

    Now what do we do?  If user cjwatson runs org.example.foo then they
will get the version in /opt/click.ubuntu.com, but user cwayne will get
the version in /usr/share/click/preinstalled.  It's not possible to
simultaneously generate both AppArmor profiles; we have to pick one.

I think the proper answer here is probably to resolve versions before
running system hooks.  In general only the topmost database layer is
available for per-user registrations, so it should always be possible to
find a topmost path that is common to all users.  We can then
automatically unregister any conflicting versions above that and use the
topmost path for system hooks.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to click in Ubuntu.
https://bugs.launchpad.net/bugs/1371574

Title:
  After installing clicks to /custom/click,
  /usr/share/click/preinstalled version are still preferred

Status in “click” package in Ubuntu:
  In Progress

Bug description:
  This occurs while moving click apps from the rootfs into the custom
  tarball.  Because of this some apps fail to launch.

  ProblemType: Bug
  DistroRelease: Ubuntu 14.10
  Package: click 0.4.32.1
  ProcVersionSignature: Ubuntu 3.16.0-10.15-generic 3.16.1
  Uname: Linux 3.16.0-10-generic x86_64
  NonfreeKernelModules: fglrx
  ApportVersion: 2.14.7-0ubuntu2
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Sep 19 07:53:58 2014
  InstallationDate: Installed on 2013-04-26 (510 days ago)
  InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
  SourcePackage: click
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/click/+bug/1371574/+subscriptions


References