Wednesday, December 12, 2007

Don't use --rename with dpkg-divert

I was hit by a funny bug I had hard times trying to reproduce on libqt4-ruby. I'll try to make a quick summary of the problem:

  • In etch, libqt4-ruby1.8 was conflicting with libqt0-ruby1.8, as they were both providing nearly the same files.
  • Soon after etch's release, cohabitation of both libraries was made possible, thanks to upstream work. However, libqt4-ruby continued to provide rbqtapi, that was also in libqt0-ruby1.8. As the one from libqt4-ruby1.8 was actually providing more functionalities than the other one, I decided to use diversions to take over rbqtapi.
  • Everything was working fine, until a piuparts check showed that on installing etch version, upgrading to lenny and purging, there was things left... More specifically rbqtapi...

It appeared that the lenny package was diverting its own files from the etch version ! All it took was to remove the --rename option to dpkg-divert. As a conclusion: be wary of --rename ! You most probably don't need it !

No comments: