[8.10] tdsodbc: upgrade from hardy fails if /var/lib/odbc doesn't exists

Bug #303966 reported by Thorsten Ruehl
2
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)

NonfreeKernelModules: fglrx
Package: update-manager 1:0.93.34
PackageArchitecture: all
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

Revision history for this message
Thorsten Ruehl (kenlazlo) wrote :
Revision history for this message
Florian Diesch (diesch) wrote :

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
| # 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/odbc/freetds.removed
| rmdir --ignore-fail-on-non-empty /var/lib/odbc
| 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.

Changed in update-manager:
status: New → Confirmed
description: updated
Florian Diesch (diesch)
description: updated
Revision history for this message
Thorsten Ruehl (kenlazlo) wrote :

Thanks for your quick answer.

I did an apt-get remove tdsodbc, followed by apt-get install tdsodbc
this also returned /var/lib/odbc error, so i did a complete uninstall via
dpkg --purge tdsodbc and reinstall apt-get install tdsodbc
that worked.

but your solution is better, I guess

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 254953, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Btw it would be great if you could test the version in intrepid-proposed. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

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.