95packagekit sleep hook weirdly installed in a subdirectory is ignored

Bug #1548480 reported by Dirk F
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
packagekit (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The 95packagekit sleep hook provided by packagekit is installed in a subdirectory:
    /usr/lib/pm-utils/sleep.d/95packagekit/95packagekit

This has two effects:

1 the hook is not run;

2 owing to a bug in pm-utils, separately reported, the previous hook is run for a second time instead.

If #1 was actually the desired effect, the hook should have been stored as /usr/lib/pm-utils/sleep.d/95packagekit~ or just omitted.

If the hook is manually installed as /usr/lib/pm-utils/sleep.d/95packagekit, it runs as expected (although the nature of the hook's operation means that it may have no obvious effect).

This issue was observed in 14.04, packagekit 0.8.12-1ubuntu5; apparently was OK in 12.04. A packaging bug seems to have appeared when 95packagekit was updated in revision 1.2.10.

Additionally, the hook 95packagekit is incorrectly numbered according to the pm-utils HOWTO.hooks convention and should apparently be eg 45packagekit.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: packagekit 0.8.12-1ubuntu5
ProcVersionSignature: Ubuntu 4.2.0-29.34~14.04.1-generic 4.2.8-ckt3
Uname: Linux 4.2.0-29-generic i686
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: i386
Date: Mon Feb 22 19:12:48 2016
InstallationDate: Installed on 2016-02-21 (0 days ago)
InstallationMedia: Lubuntu 14.04.4 LTS "Trusty Tahr" - Release i386 (20160217.1)
SourcePackage: packagekit
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Dirk F (fieldhouse) wrote :
Revision history for this message
Dirk F (fieldhouse) wrote :

Related pm-utils bug is bug 1548486.

Revision history for this message
Matthias Klumpp (ximion) wrote :

Ubuntu ships a prehistoric version of PackageKit - new releases of PK don't include that particular configuration file anymore, so the problem is - kind of - solved.

Revision history for this message
Dirk F (fieldhouse) wrote :

So if I understand correctly, the upstream version 0.8.17 currently packaged in 16.04 is "prehistoric" (and my version in 14.04 LTS even more so) but the active branch based on upstream version 1.1.0-1 that you (Matthias) are working on is not?

In that case for 16.04 Ubuntu could do one of these:

a) add a patch to move /usr/lib/pm-utils/sleep.d/95packagekit/95packagekit to /usr/lib/pm-utils/sleep.d/95packagekit (or /usr/lib/pm-utils/sleep.d/45packagekit) (NB check it gets marked executable), or

b) pull in a less prehistoric version of Packagekit that doesn't have that file, or

c) fix pm-utils bug 1548486 and ignore this bug until (b), or

d) add a patch to remove /usr/lib/pm-utils/sleep.d/95packagekit/95packagekit.

The value of the 95packagekit hook (which tries to provoke PackageKit to refresh its cache on resuming) seems questionable, since it doesn't appear to have been working for several years and isn't in the later versions.

So (c) or (d) seem like the best options, with (c) requiring no work at all for PackageKit.

Revision history for this message
Matthias Klumpp (ximion) wrote :

Your analysis is correct :)
I would of course prefer b) (maybe I need to lobby more for Ubuntu finally updating their 2y old PackageKit...), but any other option is fine.
Since I don't have upload access to Ubuntu, and this problem doesn't exist in Debian, someone else would need to take care of this on Ubuntu.

Revision history for this message
Dirk F (fieldhouse) wrote :

In order for (b) (PackageKit update) to happen for Ubuntu, I suppose someone knowledgeable would have to identify likely issues from doing so and communicate with someone like xnox <https://launchpad.net/ubuntu/xenial/+localpackagediffs?field.name_filter=packagekit> ...

Changed in packagekit (Ubuntu):
status: New → Fix Released
Revision history for this message
Dirk F (fieldhouse) wrote :

If you are going to mark this as Fix Released let's see:

what is the fix?

which supported Ubuntu versions are fixed?

Changed in packagekit (Ubuntu):
status: Fix Released → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Matthias Klumpp (ximion) wrote :

This has been resolved since PackageKit 0.8.14, we removed the pm-utils helper back then, since pm-utils is dead upstream. The issue here was fixed a while before even, but Ubuntu took a really long time to update to a recent version of PK.

Changed in packagekit (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Matthias Klumpp (ximion) wrote :
Revision history for this message
Dirk F (fieldhouse) wrote :

Thanks Matthias, Amr.

I reported this against Trusty LTS and the Fix would mean back-porting or otherwise introducing 0.8.17 over 0.8.12, probably not going to happen.

So that the unnecessary, wrongly named and wrongly located file might be removed (though I suppose anyone who cares can actually do so themselves), a patch is needed against the packaging of PackageKit in Trusty.

I can't see a way to file a bug against a particular release's packaging of a package, so I've linked this to the Trusty branches with a suggested distribution patch for /contrib/pm-utils/Makefile.am that should omit the redundant file and remove it if present.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Since the hook does not have any effect due to being in the wrong place, and removing it causes it to not have any effect, doing a stable release update seems pointless.

Revision history for this message
Dirk F (fieldhouse) wrote :

Per the original report:

"2 owing to a bug in pm-utils, separately reported, the previous hook is run for a second time instead."

Which might have an effect worse than just disconcerting a reader of /var/log/pm-suspend.log.

Anyhow, even if it's not worth it for the remaining 18 months of 14.04 LTS, the means to pay off the technical debt is there.

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.