After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670349 - jhbuild: fix handling of pretty_print=False
jhbuild: fix handling of pretty_print=False
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2012-02-18 14:24 UTC by Marcin Wojdyr
Modified: 2012-02-22 16:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix handling of pretty_print=False (1.32 KB, patch)
2012-02-18 14:24 UTC, Marcin Wojdyr
committed Details | Review
hint user to disable pretty-printing when select.error exception is thrown (922 bytes, patch)
2012-02-18 14:26 UTC, Marcin Wojdyr
none Details | Review
terminal: Disable pretty printing on Windows by default (1.20 KB, patch)
2012-02-22 16:03 UTC, Colin Walters
committed Details | Review

Description Marcin Wojdyr 2012-02-18 14:24:45 UTC
Created attachment 207923 [details] [review]
fix handling of pretty_print=False

Manuals advises to set pretty_print=False "if the pretty printing causes problems". It causes problems on Windows (select.select() raises exception), but disabling pretty_print doesn't help.

I looked into history in git and I suppose it was broken in
2295743a12375210a3e1effecaac76248e9a293b
when quiet mode was introduced.
It's not clear to me why that commit changed handling pretty_print ("hint=None" line was moved.)
I'm attaching a patch that fixes this issue by reverting a part of mentioned commit, and another patch that hints user to disable pretty-printing when select.error exception is thrown.
Comment 1 Marcin Wojdyr 2012-02-18 14:26:09 UTC
Created attachment 207924 [details] [review]
hint user to disable pretty-printing when select.error exception is thrown
Comment 2 Colin Walters 2012-02-20 23:42:02 UTC
Can we:

1) Make pretty print work on windows
2) Default it to off

Rather than throwing an error message at the user telling them to unbreak it?
Comment 3 Marcin Wojdyr 2012-02-21 01:31:53 UTC
(In reply to comment #2)
> Can we:
> 
> 1) Make pretty print work on windows
> 2) Default it to off
> 
> Rather than throwing an error message at the user telling them to unbreak it?

Both sound good to me, but I don't volunteer for 1)
Comment 4 Marcin Wojdyr 2012-02-22 12:04:55 UTC
regardless what pretty_print defaults to, the first patch can be applied because now setting pretty_print=False doesn't prevent entering pprint_output() (and crashing on Windows).
Comment 5 Colin Walters 2012-02-22 16:03:13 UTC
(In reply to comment #4)
> regardless what pretty_print defaults to, the first patch can be applied
> because now setting pretty_print=False doesn't prevent entering pprint_output()
> (and crashing on Windows).

Ok, yes, I've committed that.  But what do you think about the following patch?
Comment 6 Colin Walters 2012-02-22 16:03:24 UTC
Created attachment 208203 [details] [review]
terminal: Disable pretty printing on Windows by default

It doesn't work due to some select() failure, and honestly jhbuild's
control of subprocesses and output is so totally broken I'd rather
just band aid this and move on with my replacement project.
Comment 7 Marcin Wojdyr 2012-02-22 16:27:35 UTC
Looks good to me.
Comment 8 Colin Walters 2012-02-22 16:32:10 UTC
Attachment 208203 [details] pushed as 422588d - terminal: Disable pretty printing on Windows by default