post installation script slightly broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kdebase (Ubuntu) |
New
|
Medium
|
Unassigned |
Bug Description
The postinst script for kcontrol 3.5.2-0ubuntu9 (latest in dapper repository) has a small bug. It has a bunch of lines in configure section to clean up some udev and hotplug stuff. It has the following lines:
rmdir /etc/hotplug/usb 2>/dev/null
rmdir /etc/hotplug 2>/dev/null
However, if these directories do not exist, the rmdir returns non-zero, and so does the script which means that apt thinks it failed. This can be easily remedied by changing the lines to:
test -d /etc/hotplug/usb && rmdir /etc/hotplug/usb 2>/dev/null
test -d /etc/hotplug && rmdir /etc/hotplug 2>/dev/null
This will still fail if these directories aren't empty, but I think that is the desired behaviour.