Allow multiple dput destinations

Bug #433454 reported by Neil J. Patel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr-builder
Triaged
Low
Unassigned

Bug Description

It would be most useful to be able to run something like:

bzr dailydeb clutter.recipe --key-id FFFFFFFF --dput ppa:njpatel/clutter-edgers;ppa:netbook-remix-team/ppa

So the dailydeb command only needs to run once, but we can send the source package to more than one destination.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 433454] [NEW] Allow multiple dput destinations

On Sun Sep 20 10:59:26 UTC 2009 Neil J. Patel wrote:
> Public bug reported:
>
> It would be most useful to be able to run something like:
>
> bzr dailydeb clutter.recipe --key-id FFFFFFFF --dput ppa:njpatel
> /clutter-edgers;ppa:netbook-remix-team/ppa
>
> So the dailydeb command only needs to run once, but we can send the
> source package to more than one destination.

Hi Neil,

Thanks for the bug report.

I think this would be reasonable.

The way I think this should be done is: in __init__.py

Change

   Option("dput", ...

to

   ListOption("dput", ...

This will mean that --dput can be given multiple times, with
each argument being appended to a list, so in your case
it would be

   bzr dailydeb clutter.recipe --key-id FFFFFFFF \
        --dput ppa:njpatel/clutter-edgers \
        --dput ppa:netbook-remix-team/ppa

which I think is slightly cleaner and avoids too much parsing
(I'm also not sure if ";" is a valid character in a dput target).

Then,

alter the help text for that option to state that it can be used
multiple times to upload to multiple places.

Then,

    if dput is not None:
        self._dput_source_package(package_dir, dput)

becomes

    if dput is not None:
        for target in dput:
            self._dput_source_package(package_dir, target)

And it should work in some cases.

I can think of two issues:

    1) If you specify 2 PPAs, then I think that dput will complain
       that you have already uploaded to ppa.launchpad.net for the
       second one. I think the way to solve this might be to
       always call dput with "-f", I'm not sure we want its
       protection.

    2) Some people might want different signatures for different
       targets. I'm happy to say that they should just run two
       commands if this is the case, but if we can support it
       elegantly we should. I know that .changes can only have
       one signature, so you would need to say which sig
       is required for which target, with re-signing between.

       The way that pops in to my mind is

       --key-id 0xFFFFFFFF --dput target1
       --key-id 0xEEEEEEEE --dput target2

       with no-resigning done when the list of keys is shorter than
       the lists of target.

I would merge a branch that used -f for dput and ignored the signing
thing for now. I would also work on this myself if no one beat
me to it.

Thanks,

James

Changed in bzr-builder:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
James Westby (james-w) wrote :

On Mon Sep 21 19:28:25 +0100 2009 James Westby wrote:
> The way I think this should be done is: in __init__.py
>
> Change
>
> Option("dput", ...
>
> to
>
> ListOption("dput", ...

Oh, and of course add the import of ListOption from the same place
as Option at the top of the file if it is not already there.

Thanks,

James

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

With PPA dependencies working well, I'm not sure why this is needed... could you expand on the use case (if only so that good help can be written)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.