Merge lp://staging/~jml/pkgme/build-source-package into lp://staging/pkgme

Proposed by Jonathan Lange
Status: Merged
Approved by: James Westby
Approved revision: 92
Merged at revision: 72
Proposed branch: lp://staging/~jml/pkgme/build-source-package
Merge into: lp://staging/pkgme
Diff against target: 179 lines (+101/-10)
5 files modified
pkgme/bin/main.py (+23/-5)
pkgme/debuild.py (+34/-0)
pkgme/errors.py (+5/-0)
pkgme/testing.py (+15/-0)
pkgme/tests/test_script.py (+24/-5)
To merge this branch: bzr merge lp://staging/~jml/pkgme/build-source-package
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+69498@code.staging.launchpad.net

Description of the change

Does what it says on the packet.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

6 -test_command=python -m subunit.run $IDLIST
7 +test_command=PYTHONPATH=`pwd` python -m subunit.run $IDLIST

Is that not implicit?

41 + stdout, stderr = proc.communicate()

Perhaps we want to do something with the returncode? Also reporting the
stdout, stderr if it fails?

Also, I think it should use that new logging framework that some bright spark
wrote to log a message about what it is doing.

We're going to want to do something with GPG keys as well, but I'm fine deferring
that for now.

Thanks,

James

review: Needs Fixing
Revision history for this message
Jonathan Lange (jml) wrote :

On Wed, Jul 27, 2011 at 5:42 PM, James Westby <email address hidden> wrote:
> Review: Needs Fixing
> 6       -test_command=python -m subunit.run $IDLIST
> 7       +test_command=PYTHONPATH=`pwd` python -m subunit.run $IDLIST
>
> Is that not implicit?
>

Well, sort of. It's there so that the spawned backend scripts will
have the top-level of the tree in their PYTHONPATH, so that they will
use the development version of pkgme libs instead of the system
installed one.

> 41      + stdout, stderr = proc.communicate()
>
> Perhaps we want to do something with the returncode? Also reporting the
> stdout, stderr if it fails?
>
> Also, I think it should use that new logging framework that some bright spark
> wrote to log a message about what it is doing.
>

Good calls both. Will address.

> We're going to want to do something with GPG keys as well, but I'm fine deferring
> that for now.
>

Agreed. Was thinking that. Should have said it.

jml

Revision history for this message
James Westby (james-w) wrote :

> On Wed, Jul 27, 2011 at 5:42 PM, James Westby <email address hidden>
> wrote:
> > Review: Needs Fixing
> > 6       -test_command=python -m subunit.run $IDLIST
> > 7       +test_command=PYTHONPATH=`pwd` python -m subunit.run $IDLIST
> >
> > Is that not implicit?
> >
>
> Well, sort of. It's there so that the spawned backend scripts will
> have the top-level of the tree in their PYTHONPATH, so that they will
> use the development version of pkgme libs instead of the system
> installed one.

Does that only apply if not using virtualenv + setup.py develop?

Thanks,

James

Revision history for this message
Jonathan Lange (jml) wrote :

 * debug stuff done in another branch, merged to trunk
 * don't prompt for gpg passphrase during test run
 * actual tests to show we create these files
 * don't run lintian, because, you know, why bother?
 * raise an error if retcode is non-zero
 * basic infrastructure for showing nice errors, rather than stack traces
 * lots of debugging stuff

Revision history for this message
James Westby (james-w) wrote :

37 + except PkgmeError, e:
38 + sys.stderr.write("ERROR: %s" % (e,))
39 + return 3

Don't we have a --debug option now? Could it turn this in to a "raise" or something?

78 + if stdout:
79 + trace.debug('D: %s' % (stdout.rstrip('\n'),))

Why the prefix on the message there?

Otherwise this looks great, thanks. It's certainly a valuable feature to have, even
if there are some more details to work out later.

Thanks,

James

review: Approve
Revision history for this message
Jonathan Lange (jml) wrote :

Changed the error to raise when debug is set.

The prefix is to make the output more readable. I started without a prefix, then added one and thought the output was more useful.

93. By Jonathan Lange

Raise on debug.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches