Skip to main content

Copy Ubuntu PPA packages from one release pocket to another

Project description

ppa-copy-packages

Copy published PPA packages from one release pocket to another.

We build a few Debian packages containing various helpful scripts (i.e. the packages have Architecture: all and do not need to be recompiled when system library versions change). We want them to be available for all supported Ubuntu releases. So we upload a version built for the oldest supported LTS release to our PPA and use this script to copy the built packages to all other releases in the same PPA:

ppa-copy-packages -O pov -s xenial -t bionic disco -p pov-admin-tools ...

I do the same thing with gtimelog, which is a pure Python program and also doesn’t need to be recompiled:

ppa-copy-packages -O gtimelog -s xenial -t bionic disco -p gtimelog

And sometimes, when I’m feeling brave, I try this trick with C programs such as pwsafe:

ppa-copy-packages -O mg -s xenial -t bionic disco -p pwsafe

Authentication is taken care of by launchpadlib, which opens a browser window on first run and asks you to log in and authorize its access token (which is stored in the system keyring for your convenience).

Synopsis

$ ppa-copy-packages -h
usage: ppa-copy-packages [-h] [--version] [-v] [-q] [-n] [-w] [-b]
                         [--debug] -O OWNER [-N NAME] -p NAME [NAME ...]
                         -s SERIES -t SERIES [SERIES ...]
                         [--architectures ARCH [ARCH ...]]
                         [--pocket POCKET] [--launchpad-instance INSTANCE]

copy Ubuntu PPA packages from one release pocket to another

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v, --verbose         More verbose output (can be stacked)
  -q, --quiet           Less verbose output
  -n, --dry-run         Don't make any changes
  -w, --wait            Wait for pending packages to be published
  -b, --browse          Open the PPA page in a browser, don't do anything
                        else.
  --debug               Very verbose logging, for debugging this script

PPA selection:
  -O OWNER, --owner OWNER
                        owner of the PPA
  -N NAME, --name NAME  name of the PPA (default: ppa)
  -p NAME [NAME ...], --packages NAME [NAME ...]
                        names of packages to copy
  -s SERIES, --source-series SERIES
                        source series (e.g. xenial)
  -t SERIES [SERIES ...], --target-series SERIES [SERIES ...]
                        target series (e.g. bionic)
  --architectures ARCH [ARCH ...]
                        architectures to check for published binaries (default
                        is ['i386', 'amd64'])
  --pocket POCKET       pocket name (you probably don't want to change this;
                        default is Release)
  --launchpad-instance INSTANCE
                        Launchpad instance (default: production)

Changelog

1.9.4 (2022-10-21)

  • Copy packages one by one to avoid Launchpad timeouts.

  • Do not copy the same packages more than once when using –wait.

  • Fix TypeError: ‘<’ not supported between instances of ‘str’ and ‘NoneType’ when using –wait.

1.9.3 (2020-10-31)

  • Handle ‘needs building’ state when using –wait.

1.9.2 (2020-07-02)

  • Fix ValueError: Namespace GnomeKeyring not available (GH #3).

1.9.1 (2019-09-06)

  • Fix TypeError: unhashable type: ‘Entry’.

1.9 (2019-09-05)

  • First release to PyPI.

  • Unified three older scripts I had lying around with hardcoded configuration.

  • Replaced hardcoded configuration with command-line arguments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ppa-copy-packages-1.9.4.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

ppa_copy_packages-1.9.4-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file ppa-copy-packages-1.9.4.tar.gz.

File metadata

  • Download URL: ppa-copy-packages-1.9.4.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for ppa-copy-packages-1.9.4.tar.gz
Algorithm Hash digest
SHA256 52387d64f66fefd5af627d7f173a5cba572c5c2d92011c9ac04d39d01888d4d4
MD5 08b85db66fa6ff51d887a3ba25daa120
BLAKE2b-256 ab5f775fe44da9646b9e5f6a622bf3eecc59fa76306d4ad0b7b9f0741f0fdbdd

See more details on using hashes here.

File details

Details for the file ppa_copy_packages-1.9.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ppa_copy_packages-1.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 766531b74c0d81058538a3d497464455d7d9662bd81add71e58124875d8cd858
MD5 b0f6f03b81adf037cec7f49aef98fdcc
BLAKE2b-256 09ab893aa6d0cc0595735081e12f8cf60468c4d447a000c13a8b74e2988aab11

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page