ships two different sleep.d hooks

Bug #384875 reported by Tormod Volden on 2009-06-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Laptop Mode Tools
Low
Ritesh Raj Sarraf
laptop-mode-tools (Ubuntu)
Medium
Steve Langasek

Bug Description

Binary package hint: laptop-mode-tools

The Jaunty/Karmic laptop-mode-tools 1.47-1ubuntu1 ships both:
 /etc/pm/sleep.d/99laptop-mode
 /usr/lib/pm-utils/sleep.d/96laptop-mode

Ideally the distribution should ship the /usr/lib one. If a local administrator installs a hook with the _same_ name in /etc, pm-utils will read the one in /etc instead of the one in /usr/lib.

Currently, both these scripts are read. It looks like Ubuntu added the /usr/lib one originally, then upstream started shipping the /etc one. I think Ubuntu should take the upstream one, patch it, and move it to /usr/lib.

Upstream should be requested to move their hook to /usr/lib.

Ritesh Raj Sarraf (rrs) wrote :

Fix has been committed upstream. Thanks for reporting.

Changed in laptop-mode-tools:
assignee: nobody → Ritesh Raj Sarraf (rickysarraf)
importance: Undecided → Low
status: New → Fix Committed
Ritesh Raj Sarraf (rrs) on 2009-09-01
Changed in laptop-mode-tools:
status: Fix Committed → Fix Released
Tormod Volden (tormodvolden) wrote :
Tormod Volden (tormodvolden) wrote :

We might need some .postinst purging of the old conf file. Ritesh, did you do that in the Debian package?

Tormod Volden (tormodvolden) wrote :

I deleted it like it was done for other files in the Ubuntu preinst (not the full http://wiki.debian.org/DpkgConffileHandling dance).

Hi Tormod,

On Saturday 26 Sep 2009 17:39:20 Tormod Volden wrote:
> We might need some .postinst purging of the old conf file. Ritesh, did
> you do that in the Debian package?
>
No. We didn't want to purge the conf files. We just started shipping the hook
going forward in /usr instead of /etc.

We left /etc as it is because there could be customizations in it.

Ritesh
--
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

Steve Langasek (vorlon) wrote :

In Ubuntu, the config file in /etc/ should certainly be removed on upgrade using the normal process for removing obsolete conffiles because running the file in /etc is a *bug*, and causes laptop-mode to be run on suspend/resume even when laptop-mode is not enabled. I think it would be a good idea for Debian to use the same upgrade code, to avoid unnecessary divergence (and to avoid leaving around stale conffiles).

Changed in laptop-mode-tools (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
importance: Undecided → Medium
status: New → Triaged
Tormod Volden (tormodvolden) wrote :

Steve, it is already committed in Debian. I did a slightly cheaper conffile remove in the debdiff here since it was already done this way for other files, but the Debian version has the "clean" conffile treatment.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package laptop-mode-tools - 1.47-1ubuntu2

---------------
laptop-mode-tools (1.47-1ubuntu2) karmic; urgency=low

  * debian/rules: do not ship obsolete and broken
    /etc/pm/sleep.d/99laptop-mode (LP: #384875, #437147)
  * debian/laptop-mode-tools.preinst: delete it on upgrades

  [ Steve Langasek ]
  * debian/laptop-mode-tools.preinst: use the standard snippet for removing
    obsolete conffiles safely.

 -- Tormod Volden <email address hidden> Sat, 26 Sep 2009 13:54:30 +0200

Changed in laptop-mode-tools (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers