Tool to support copy across series in a single PPA

Bug #783503 reported by Martin Erik Werner
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Hydrazine
Confirmed
Medium
Unassigned

Bug Description

In order to copy packages within one repository the version of the original must be specified.

I've bluntly tested this by replacing:
- version = spph.source_package_version
+ version = "1.0-ppa2"
For example, which worked.
(This is probably the extent of my ability to code python though)

Would it be possible to implement the possibility to do this as an argument to the lp-promote-ppa script?

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 783503] [NEW] allow specifying versions in lp-promote-ppa

Can you explain more about what you're trying to do?

Revision history for this message
Martin Erik Werner (arand) wrote : Re: allow specifying versions in lp-promote-ppa

I have a PPA where I upload and build just one version of an application for one series, then copy it over to the different other series ("including binary packages"), replacing

This doesn't seem to be possible without specifying the version to copy *from*, since otherwise it seems to not want to copy between different series in the same PPA.

Martin Pool (mbp)
Changed in hydrazine:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Martin Pool (mbp) wrote :

Hm, ok. I don't really understand why this would require the user to specify it by hand, but perhaps someone can work that out when they dig into it.

Revision history for this message
Max Bowsher (maxb) wrote :

After talking this over with poolie, I think the notional requested tool would look a bit like this:

lp-ppa-cross-series-copy [--sourcepackagename example-package] maxb/ppa karmic,lucid,maverick,natty,oneiric

i.e. it would take as input a single PPA id, a list of series, and an optional sourcepackagename filter.

It would then list the contents of the PPA, and for each sourcepackagename found, identify the highest version number in any series in that PPA, and copy it to each of the series named in the command line arguments.

Such a tool could share a lot of code with lp-promote-ppa, but because it addresses a significantly different workflow and requires significantly different command line arguments, I think it should be a separately named tool.

summary: - allow specifying versions in lp-promote-ppa
+ Tool to support copy across series in a single PPA
Revision history for this message
Martin Erik Werner (arand) wrote :

That functionality is indeed what I was suggesting :)
Adding another option to lp-promote-ppa might be clogging things up a bit too much, I was just referring to it since I was able to hack it in order to perform this functionality with very minor changes:

For this use case this where I would like to sync all packages up to the latest version:

arand@mell:~/utv/hydrazine$ ./lp-promote-ppa arand/redeclipse arand/redeclipse
Querying destination PPA...
1729411 redeclipse maverick 1.01+svn2630-ppa1 Published FULLYBUILT
1702711 redeclipse oneiric 1.01+svn2613-ppa1 Published FULLYBUILT
1670187 redeclipse lucid 1.01+svn2613-ppa1 Published FULLYBUILT
1670186 redeclipse natty 1.01+svn2613-ppa1 Published FULLYBUILT

Querying source PPA...
1729411 redeclipse maverick 1.01+svn2630-ppa1 Published FULLYBUILT
1702711 redeclipse oneiric 1.01+svn2613-ppa1 Published FULLYBUILT
1670187 redeclipse lucid 1.01+svn2613-ppa1 Published FULLYBUILT
1670186 redeclipse natty 1.01+svn2613-ppa1 Published FULLYBUILT

It can be done via:
sed '89s/spph.source_package_version/"1.01+svn2630-ppa1"/' lp-promote-ppa | python - arand/redclipse arand/redeclipse

Revision history for this message
Martin Erik Werner (arand) wrote :

I've implemented a basic version of this feature in the lp:~arand/hydrazine/lp-promote-ppa branch doing a minor tweak of the lp-promote-ppa script

It allows passing a -i / --packageversion option to narrow down the origin set of packages to a specified version.
This allows the feature I requested here, i.e going from this state:
foo_0.2 oneiric
foo_0.1 natty
foor_0.1 lucid

to this state:
foo_0.2 oneiric
foo_0.2 natty
foo_0.2 lucid

possibly in the same PPA, by using

~$ lp-promote-ppa user/ppa user/ppa -s foo -i 0.2

Possible improvement are:
* per-package version (as of now it only accepts one version argument, which is applied to filter all packages), I guess it could use some apt-like syntax: "-s foo=0.2"
* copying to distroseries with no prior version of the package

Revision history for this message
Max Bowsher (maxb) wrote :

My UI suggestions in comment #4 appear to have been completely ignored :-/

Revision history for this message
Martin Erik Werner (arand) wrote : Re: [Bug 783503] Re: Tool to support copy across series in a single PPA

> My UI suggestions in comment #4 appear to have been completely ignored
> :-/
Yes, however, this is out of simplicity, rather than opinion. I do not
think that I am able to implement the feature according to those
comments at this point, but I though that I would share this naive
solution at least.
Sorry. I may have come across somewhat blunt.

Revision history for this message
Martin Erik Werner (arand) wrote :

New implementation: lp:~arand/hydrazine/lp-ppa-cross-series-copy

Should be more similar to the UI suggestions given in comment #4, however it takes two PPA references rather than just a single one (thus allowing cross-series cross-ppa copying).

Filters are:
target_series (required argument(s))
origin_series (option)
packagename (option)

it also prints nothing unless --verbose is specified, not sure if this is good from a hydrazine scripts consistency point of view...

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.