couchdb-glib sets its own, custom log handler for the g_debug

Bug #591873 reported by Krzysztof Klimonda on 2010-06-09
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
couchdb-glib (Ubuntu)
Undecided
Rodrigo Moya
Lucid
Low
Unassigned

Bug Description

couchdb-glib is built without --disable-debug-messages which results in a build which sets its own log handler for g_debug macro.
This handler searches for the undocumented COUCHDB_ENV_DEBUG_MESSAGES environment variable to decide whether it should display debug message or not. It may confuse developers who depend on the g_debug default behaviour.

According to rodrigo from #ubuntuone it's fixed in maverick.

There may be some packages depending on the current for displaying debug only when some environment variable is set but I don't see why would anyone do it.

TEST CASE:
download attached testcase.py
with libcouchdb-glib-1.0-2 0.6.3-0ubuntu1 you will get this result:
kklimonda@vm-desert:~$ python testcase.py
** (process:1424): DEBUG: You will see this message
kklimonda@vm-desert:~$

and with libcouchdb-glib-1.0-2 0.6.3-0ubuntu1.1 this one instead:
pkklimonda@vm-desert:~$ python testcase.py
** (process:1590): DEBUG: You will see this message
** (process:1590): DEBUG: but not this with 0.6.3-0ubuntu1 installed
kklimonda@vm-desert:~$

Related branches

description: updated
Martin Pitt (pitti) wrote :

The uploaded package has a very unclean diff, it adds a lot of .bzr/ files and removes the pregenerated marshall .h/.c files; are they correctly being regenerated on package build? Also, this update does not seem to have any practical difference for users, so it seems to be very low-priority; at the same time every SRU has a nonzero regression potential, so is that really worth backporting?

Changed in couchdb-glib (Ubuntu):
status: New → Fix Released
Changed in couchdb-glib (Ubuntu Lucid):
importance: Undecided → Low
Martin Pitt (pitti) wrote :

I reject the current upload; if you think this is important enough for lucid, please reuplaod a clean package. Thanks!

Rodrigo Moya (rodrigo-moya) wrote :

hmm, I just created a package from the branch kklimonda proposed for merging, so Martin, where can I see that unclean diff?

Martin Pitt (pitti) wrote :

Rodrigo,

it's here:

http://launchpadlibrarian.net/50064244/couchdb-glib_0.6.3-0ubuntu1_0.6.3-0ubuntu2.diff.gz

You probably need to use debuild -i to avoid including the .bzr stuff; not sure about the marshalling bits.

Changed in couchdb-glib (Ubuntu):
assignee: nobody → Rodrigo Moya (rodrigo-moya)
status: Fix Released → In Progress
Rodrigo Moya (rodrigo-moya) wrote :

Package uploaded to lucid-proposed

Changed in couchdb-glib (Ubuntu):
status: In Progress → Fix Committed
Jonathan Riddell (jr) wrote :

Needs debdiff on bug

Needs test case on bug

Needs approval from ubuntu-sru

Martin Pitt (pitti) wrote :

Still needs a rationale, see comment 1.

Changed in couchdb-glib (Ubuntu Lucid):
status: New → Incomplete
Krzysztof Klimonda (kklimonda) wrote :

Martin: As a rationale lets say that I had to debug why doesn't my program display any debug messages when I tell it to. Is it important enough for an SRU? I have no idea, it affects only developers who has probably either already moved on to maverick, found bug and fixed it themselves or decided to work around it. It doesn't affect users directly. Only those who need debug messages for some reason may have a problem finding them.

All that this configure flag changes in source is setting DEBUG_MESSAGES which sets custom handler for G_LOG_LEVEL_DEBUG messages, enables some g_debug messages in code and calls debug_print_headers for all headers from SoupMessage. Maybe Rodrigo can say more about the regression potential then me.

As for the test case I can write a simple C program that shows the problem (I don't think I can access g_debug from python). Would that be sufficient?

Krzysztof Klimonda (kklimonda) wrote :

Actually I can write a testcase using python and ctypes, here it goes.
You will only see the first message with current lucid version of libcouchdb-glib-1.0-2.

Krzysztof Klimonda (kklimonda) wrote :
description: updated

Per SRU policy (https://wiki.ubuntu.com/StableReleaseUpdates) the package needs to be fixed in the dev release before being pushed to a stable release.
Version 0.6.3-0ubuntu2 of the package has been published to lucid-proposed, so please fix in maverick asap.

Thank in advance.

On Mon, 2010-09-06 at 13:29 +0000, Jean-Baptiste Lallement wrote:
> Per SRU policy (https://wiki.ubuntu.com/StableReleaseUpdates) the package needs to be fixed in the dev release before being pushed to a stable release.
> Version 0.6.3-0ubuntu2 of the package has been published to lucid-proposed, so please fix in maverick asap.
>
> Thank in advance.
>
The bug has been fixed in Maverick with 0.6.95-0ubuntu1 upload (which
should link itself to this bug but apparently it hasn't).

Martin Pitt (pitti) on 2010-09-16
Changed in couchdb-glib (Ubuntu):
status: Fix Committed → Fix Released

SRU verification for Lucid:
I have reproduced the problem with couchdb-glib 0.6.3-0ubuntu1 in lucid and have verified that the version of couchdb-glib 0.6.3-0ubuntu2 in -proposed fixes the issue. I've run the tests shipped with couchdb-glib and found no regression.

Marking as verification-done

tags: added: verification-done
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package couchdb-glib - 0.6.3-0ubuntu2

---------------
couchdb-glib (0.6.3-0ubuntu2) lucid-proposed; urgency=low

  * debian/rules:
    - Add --disable-debug-messages configure flag (LP: #591873)
 -- Rodrigo Moya <email address hidden> Tue, 17 Aug 2010 09:56:53 +0200

Changed in couchdb-glib (Ubuntu Lucid):
status: Incomplete → Fix Released
tags: added: testcase
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments