Comment 5 for bug 562418

Revision history for this message
Tormod Volden (tormodvolden) wrote : Re: many -dbg packages have debug symbols mismatch

This problem arises for packages which run dh_strip several times in debian/rules. When using only the "real" dh_strip (as in PPAs) it is no problem, because dh_strip will detect an already stripped file and ignore it.

pkg_create_dbgsym, on the other hand, will gladly strip a file a second time, and thus obtain no debug symbols from it, but still create the almost zero symbol file, and to top it off, write this useless CRC to the binary.

So in the end the -dbgsym packages will have no symbols and a good CRC, while the -dbg packages have no matching CRC any longer.

For instance the mesa rules file should be changed so it does not run dh_strip on the same package twice. Now it does:
dh_strip -plibgl1-mesa-dri --dbg-package=libgl1-mesa-dri-dbg
dh_strip -s

Here the second line should have had -Nlibgl1-mesa-dri appended to it so that these packages are not processed again. (Both dh_strip and pkg_create_dbgsym are smart enough to ignore -dbg packages).

But since we often sync packages from Debian where this is no problem, we should make pkg_create_dbgsym handle this better. See the one-liner in my linked branch.