Merge lp:~mbp/bzr/417881-selftest-no-apport into lp:bzr

Proposed by Martin Pool
Status: Merged
Approved by: John A Meinel
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~mbp/bzr/417881-selftest-no-apport
Merge into: lp:bzr
Diff against target: 31 lines (+10/-0)
2 files modified
NEWS (+3/-0)
bzrlib/builtins.py (+7/-0)
To merge this branch: bzr merge lp:~mbp/bzr/417881-selftest-no-apport
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+18527@code.launchpad.net

This proposal supersedes a proposal from 2010-02-02.

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote : Posted in a previous version of this proposal

Turn off apport during selftest, and put the traceback at the end where it's more useful to developers and less likely to be scrolled off by plugins.

Fixes bug 417881

Revision history for this message
John A Meinel (jameinel) wrote :

I think the specific layout can get a bit into bikeshedding, but if you like the look of this layout, then lets go with it.

review: Approve
Revision history for this message
Martin Pool (mbp) wrote :

I think I'll land this without the traceback changes and we can consider that separately.

Revision history for this message
Robert Collins (lifeless) wrote :

So I realise this has landed already, but I think its the wrong
approach ;)

Specifically, we should IMO disable apport *anyway* for development
trees - where there is a .bzr dir. That way, for selftest:
 - as packaged, we get apport bug reports about selftest (good)
 - as a dev environment, we don't get apport in our way (good)

-Rob

Revision history for this message
Martin Pool (mbp) wrote :

On 3 February 2010 17:18, Robert Collins <email address hidden> wrote:
> So I realise this has landed already, but I think its the wrong
> approach ;)
>
> Specifically, we should IMO disable apport *anyway* for development
> trees - where there is a .bzr dir. That way, for selftest:
>  - as packaged, we get apport bug reports about selftest (good)
>  - as a dev environment, we don't get apport in our way (good)

It's easy to change. Where do you think we should specify that
something is a development environment?

I don't think "not from a package" or "running from home" is perfect
because there are users who regularly run that way. But perhaps it is
the best tradeoff.

Alternatively we can set "debug_flags = no_apport" ourselves and
simply reverse this patch.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Robert Collins (lifeless) wrote :

On Wed, 2010-02-03 at 17:42 +0000, Martin Pool wrote:
> On 3 February 2010 17:18, Robert Collins <email address hidden> wrote:
> > So I realise this has landed already, but I think its the wrong
> > approach ;)
> >
> > Specifically, we should IMO disable apport *anyway* for development
> > trees - where there is a .bzr dir. That way, for selftest:
> > - as packaged, we get apport bug reports about selftest (good)
> > - as a dev environment, we don't get apport in our way (good)
>
> It's easy to change. Where do you think we should specify that
> something is a development environment?

I was thinking if we're running from source is a good heuristic - users
that run from source and aren't up to reporting good bugs are a small
portion of our userbase, I think.

> I don't think "not from a package" or "running from home" is perfect
> because there are users who regularly run that way. But perhaps it is
> the best tradeoff.
>
> Alternatively we can set "debug_flags = no_apport" ourselves and
> simply reverse this patch.

Or we could do that instead/too. Mainly I'm saying that a user on Ubuntu
with a packaged bzr that breaks loading tests should generate an apport
problem report.

-Rob

Revision history for this message
Martin Pool (mbp) wrote :

So shall we perhaps pull this out and just tell developers to set -Dno_apport?

Revision history for this message
Robert Collins (lifeless) wrote :

On Wed, 2010-02-03 at 18:21 +0000, Martin Pool wrote:
> So shall we perhaps pull this out and just tell developers to set -Dno_apport?

Yes, I think so. Perhaps a note in HACKING noting this and suggesting a
bazaar.conf stanza for it?

-Rob

Revision history for this message
Andrew Bennetts (spiv) wrote :

Martin Pool wrote:
> So shall we perhaps pull this out and just tell developers to set -Dno_apport?

FWIW, this developer already set -Dno_apport several weeks ago, so that plan
gets +1 from me :)

-Andrew.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Andrew Bennetts wrote:
> Martin Pool wrote:
>> So shall we perhaps pull this out and just tell developers to set -Dno_apport?
>
> FWIW, this developer already set -Dno_apport several weeks ago, so that plan
> gets +1 from me :)

Me too.

Ian C.

Revision history for this message
Martin Pool (mbp) wrote :

reversion landed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS'
--- NEWS 2010-02-03 10:06:19 +0000
+++ NEWS 2010-02-03 15:45:25 +0000
@@ -28,6 +28,9 @@
28Testing28Testing
29*******29*******
3030
31* Don't use Apport for errors while loading or running tests.
32 (Martin Pool, #417881)
33
31* Stop sending apport crash files to ``.cache`` in the directory from34* Stop sending apport crash files to ``.cache`` in the directory from
32 which ``bzr selftest`` was run. (Martin Pool, #422350)35 which ``bzr selftest`` was run. (Martin Pool, #422350)
3336
3437
=== modified file 'bzrlib/builtins.py'
--- bzrlib/builtins.py 2010-01-29 10:36:23 +0000
+++ bzrlib/builtins.py 2010-02-03 15:45:25 +0000
@@ -3524,6 +3524,13 @@
35243524
3525 # Make deprecation warnings visible, unless -Werror is set3525 # Make deprecation warnings visible, unless -Werror is set
3526 symbol_versioning.activate_deprecation_warnings(override=False)3526 symbol_versioning.activate_deprecation_warnings(override=False)
3527
3528 # Whatever you normally want, for the purposes of running selftest you
3529 # probably actually want to see the exception, not to turn it into an
3530 # apport failure. This is specifically turned off again for tests of
3531 # apport. We turn it off here so that eg a SyntaxError loading the
3532 # tests is caught.
3533 os.environ['APPORT_DISABLE'] = '1'
35273534
3528 if cache_dir is not None:3535 if cache_dir is not None:
3529 tree_creator.TreeCreator.CACHE_ROOT = osutils.abspath(cache_dir)3536 tree_creator.TreeCreator.CACHE_ROOT = osutils.abspath(cache_dir)