click hook run-user fails when booting image 233

Bug #1291192 reported by Ricardo Salveti
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
click (Ubuntu)
Fix Released
Critical
Colin Watson

Bug Description

click-user-hooks fails when starting the phablet session, making it unable to start any click packages:

Error (also from the crash file):

Traceback (most recent call last):
  File "/usr/bin/click", line 86, in <module>
    sys.exit(main())
  File "/usr/bin/click", line 82, in main
    return mod.run(args)
  File "/usr/lib/python3/dist-packages/click/commands/hook.py", line 74, in run
    Click.run_user_hooks(db, user_name=options.user)
gi._glib.GError: symlink /opt/click.ubuntu.com/.click/users/phablet/.com.ubuntu.calculator.new -> /usr/share/click/preinstalled/com.ubuntu.calculator/0.1.3.224 failed: No such file or directory

It seems that this error happens because phablet is unable to create any file/dir at /opt/click.ubuntu.com:
$ ls -l /opt/
total 4
drwxr-xr-x 2 clickpkg clickpkg 4096 Mar 12 04:00 click.ubuntu.com

Related branches

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Besides not having enough permission to create any file at /opt/click.ubuntu.com, it seems to expect a valid /opt/click.ubuntu.com/.click/users/phablet directory when running the user hook.

After creating /opt/click.ubuntu.com/.click/users/phablet by hand I'm able to run the user hook (and then able to start a click package as well).

Revision history for this message
Colin Watson (cjwatson) wrote :

I expect this depends whether you previously had any apps unpacked at all.

If you've created directories by hand to work around this, please be careful to get their ownership right to avoid future issues (I make no promises about handling this automatically if you've created directories by hand with incorrect ownership):

root@ubuntu-phablet:/# ls -dl /opt/click.ubuntu.com/
drwxr-xr-x 14 clickpkg clickpkg 4096 Mar 12 10:15 /opt/click.ubuntu.com/
root@ubuntu-phablet:/# ls -dl /opt/click.ubuntu.com/.click/
drwxr-xr-x 3 clickpkg clickpkg 4096 Mar 6 12:55 /opt/click.ubuntu.com/.click/
root@ubuntu-phablet:/# ls -dl /opt/click.ubuntu.com/.click/users/
drwxr-xr-x 3 clickpkg clickpkg 4096 Mar 6 12:55 /opt/click.ubuntu.com/.click/users/
root@ubuntu-phablet:/# ls -dl /opt/click.ubuntu.com/.click/users/phablet/
drwxr-xr-x 2 phablet phablet 4096 Mar 12 10:15 /opt/click.ubuntu.com/.click/users/phablet/

Colin Watson (cjwatson)
Changed in click (Ubuntu):
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → Colin Watson (cjwatson)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.18.3

---------------
click (0.4.18.3) trusty; urgency=medium

  [ Colin Watson ]
  * Take a slightly different approach to fixing "click hook run-user": only
    try to update user registration symlinks if they already exist in the
    overlay database.

click (0.4.18.2) trusty; urgency=medium

  * Make "click hook run-user" ensure that the user registration directory
    exists before dropping privileges and trying to create symlinks in it
    (LP: #1291192).
 -- Ubuntu daily release <email address hidden> Wed, 12 Mar 2014 12:02:47 +0000

Changed in click (Ubuntu):
status: Fix Committed → Fix Released
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.