[8.10] tdsodbc: upgrade from hardy fails if /var/lib/odbc doesn't exists
Bug #303966 reported by
Thorsten Ruehl
This bug report is a duplicate of:
Bug #254953: package update-manager 1:0.93.1 failed to install/upgrade: ErrorMessage: SystemError in cache.commit(): E:Sub-process /usr/bin/dpkg returned an error code (1).
Edit
Remove
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
freetds (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: update-manager
the german ubuntu version didn't report a detailed error, only the above
before that error package tdsodbc dig not install correctly
ProblemType: Package
Architecture: amd64
DistroRelease: Ubuntu 8.10
ErrorMessage: ErrorMessage: SystemError in cache.commit(): E:Sub-process /usr/bin/dpkg returned an error code (1)
NonfreeKernelMo
Package: update-manager 1:0.93.34
PackageArchitec
SourcePackage: update-manager
Title: package update-manager 1:0.93.34 failed to install/upgrade: ErrorMessage: SystemError in cache.commit(): E:Sub-process /usr/bin/dpkg returned an error code (1)
Uname: Linux 2.6.24-22-generic x86_64
Thank you for taking the time to report this bug and helping to make Ubuntu better.
The interesting lines from the logs are:
| Richte tdsodbc ein (0.82-3) ...
| rmdir: konnte „/var/lib/odbc“ nicht entfernen: No such file or directory
| dpkg: Fehler beim Bearbeiten von tdsodbc (--configure):
| Unterprozess post-installation script gab den Fehlerwert 1 zurück
caused in /var/lib/ dpkg/info/ tdsodbc. postinst by
| if dpkg --compare-versions "$2" lt-nl 0.82-1; then odbc/freetds. removed fail-on- non-empty /var/lib/odbc
| # on upgrade from older versions, this file will be left around,
| # preventing removal of the directory; do a one-time cleanup.
| rm -f /var/lib/
| rmdir --ignore-
| fi
/var/lib/odbc gets created in tdsodbc 0.63-3.2ubuntu1 (hardy) preinst but nor removed in prerm and postrm - that's why the above cleanup. But for some reasons /var/lib/odbc did not exist here so rmdir failed.
To improve stability in such situations the postinst script should check the existence of the directory before removing it.
As a workaround you can create /var/lib/odbc and then try to install the package again.