kdm postinst fails when /etc/X11/default-display-manager is 0 byte file

Bug #285172 reported by Mark Painter
14
Affects Status Importance Assigned to Milestone
kdebase-workspace (Ubuntu)
Fix Released
Low
Unassigned
Declined for Hardy by Harald Sitter

Bug Description

When installing kubuntu-desktop, one of my machines which had a 0 byte /etc/X11/default-display-manager had the kdm postinst fail. The postinst reliably fails in this case, with error messages like so:

> sudo dpkg --configure -a
Setting up kdm (4:3.5.9-0ubuntu7.3) ...
basename: missing operand
Try `basename --help' for more information.
dpkg: error processing kdm (--configure):
 subprocess post-installation script returned error exit status 1

Revision history for this message
Dan Keshet (dkesh) wrote :

This happened to me with kdm4 (4:4.1.2-0ubuntu13), when my /etc/X11/default-display-manager file was 1 line, with the following text:

#/usr/bin/kdm

So, it's not just 0 byte files; also files that begin with "#", which I imagine is a pretty normal way for people to turn off the display manager when they don't want it to start automatically.

Removing the default-display-manager file let me finish the installation correctly, of course.

Revision history for this message
Dan Keshet (dkesh) wrote :

The attached patch, against the "config" file in the control.tar.gz portion of the deb makes the config script properly assess the current default display manager when the default-display-manger file is empty.

Revision history for this message
Dan Keshet (dkesh) wrote :

The attached patch, against the "config" file in the control.tar.gz portion of the deb makes the config script properly assess the current default display manager when the default-display-manger file is empty.

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

We run a regexp on the content of that file, so # == no content :)

That said your patch is solving both issues.

Changed in kdebase-workspace (Ubuntu):
importance: Undecided → Low
status: New → Triaged
tags: added: bitesize packaging
Revision history for this message
Harald Sitter (apachelogger) wrote :

KDM's postinst now uses superior magic to avoid that kind of problems, it now works when file is empty, doesnt exist or if it contains commented out content ... i.e. in all and any case it would fail before.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.