Ubuntu – Launchpad: CLI “Copying packages”

command linelaunchpadppa

I'm using Launchpad to upload a .dsc, a debian.tar.gz and a .orig.tar.xz. The orig archive contains both i386 and amd64 files, and I use debian/rules to build different architecture packages. But it only builds on Trusty series. I would like to use the feature Copy packages, but I want it to be automated.

Currently, I have to connect to Launchpad, click View Package Details, click Copy Packages, and use:

> Destination PPA:
> This PPA

> Destination series:
> Utopic

> Copy existing binaries

Is there a way to automate all this "copy the existing binaries from the older series to the new series", or to do it through CLI to use it in a script ?

Thank you


Leads :

  • Q: Maybe ubuntu-archive-tools can help me do that, it seem to have a copy-package python script ?

    A: It doesn't work with that: python copy-package -y -b --ppa-name=myname/myppa --to-ppa-name=myname/myppa -s trusty --to-suite=utopic -e versionofpackage

  • Q: Maybe if I change my changelog entry from trusty ; urgency=low to utopic trusty ; urgency=low ?

    A: It doesn't work : Unable to find distroseries: utopic trusty. Further error processing not possible because of a critical previous error.

  • Q: Build 1 orig.tar.xz and multiple .dsc & debian.tar.gz

    A: I currently build an incremented version-number (i.e. mypackage-1.1.0-0trusty0 and mypackage-1.1.0-0utopic0), but the solution could be better since I have to reupload the orig.tar.xz for each and that it takes twice the place in the PPA since the built .deb aren't considered as a copy of each other but 2 packages.

Best Answer

copy-package is good for this, but the correct modern invocation would be:

./copy-package --from=~myname/ubuntu/myppa --from-suite=trusty --to=~myname/ubuntu/myppa --to-suite=utopic -b -y packagename

(As saiarcot895 correctly noted, you needed to separate --ppa and --ppa-name, but this was always very confusing which was among the reasons we added the unified --from and --to options for specifying archives. Also, you neglected to include the package name, which was probably why you got no output; more recent versions of copy-package check for this.)