kdm postrm script fails if /etc/init/kdm.conf missing

Bug #775480 reported by Matthias Andree
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kdebase-workspace (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: kdm

The kdm postrm script, if used to purge a configuration, calls "rm /etc/init/kdm.conf". This fails if the file is already missing, effectively preventing a "purge". Please change the command to "rm -f /etc/init/kdm.conf".

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: kdm (not installed)
ProcVersionSignature: Ubuntu 2.6.35-28.50-generic 2.6.35.11
Uname: Linux 2.6.35-28-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Mon May 2 12:43:16 2011
ProcEnviron:
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: kdebase-workspace

Revision history for this message
Harald Sitter (apachelogger) wrote :

Why would the file be missing?

Changed in kdebase-workspace (Ubuntu):
status: New → Incomplete
Revision history for this message
Matthias Andree (matthias-andree) wrote :

Stop being difficult, I don't know why the file was missing. It doesn't matter. There simply is not a single reasonable excuse for a postrm script to fail when rm(1)-ing an already missing file. Needless hassle for the user, and your question is no good either.

Do note:

 1. dpkg --purge is a last-resort that people need if packages are screwed. File system damage, system admin accident, whatever.

 2. I don't care to discuss obvious and trivial fixes to real-world problems.

Changed in kdebase-workspace (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Matthias Andree (matthias-andree) wrote :

Note this bug does not affect natty. I haven't checked lucid.

Revision history for this message
Harald Sitter (apachelogger) wrote :

Clearly you already thought of the possibility that another bug could inflict this problem or that a change in the system at large brought this upon us and consequently eliminated those as possible root causes. Smart thinking on your side. Thank you for that and for suggesting an addition to what appears to be magically disappearing code [1]. It appears the code in question is a bit of a unicorn, one minute it is there and the next it is gone. We better watch out for that, we wouldn't want the devil to come looking all over our maintainer scripts for the unicorn to slay it. Woo, now I am scared.

Duplicate of 634707.
Ah, right, not so obvious and trivial now, eh? Thanks for being so nice and helping us find the problem.

[1] http://bazaar.launchpad.net/~kubuntu-packagers/kdebase-workspace/ubuntu/revision/473

Revision history for this message
Matthias Andree (matthias-andree) wrote :

Irony and prose aside, I didn't feel like digging up all possible factors, and I've never packaged dpkg myself, so I'm unaware of both Ubuntu and Debian policies as well as the dpkg common practice WRT config file removals. Possibly some postinst script used to create /etc/init/kdm.conf unbeknownst to dpkg's, once upon a time.

Anyways, if the fix is removing duplicate non-idempotent functionality, fine.

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.