From 7e82344d577f602c3b2ed56a4d224fd8abf49abb Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Wed, 3 Dec 2025 10:24:14 +0100 Subject: [PATCH] ubuntu-build: fix non batch mode errors The current version is not working ``` $ ubuntu-build librsync resolute retry Traceback (most recent call last): File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 354, in __getattr__ return self.lp_get_parameter(attr) ~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 249, in lp_get_parameter raise KeyError("No such parameter: %s" % param_name) KeyError: 'No such parameter: getComponent' ``` The way launchpadlib is used was changed in 010af53 but non batch mode was not correctly updated. Also tweak the way the release is computed for distroseries to be able to retry a package in e.g "resolute-proposed". --- ubuntu-build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ubuntu-build b/ubuntu-build index c70eebc..16b5d15 100755 --- a/ubuntu-build +++ b/ubuntu-build @@ -181,7 +181,7 @@ def main(): archive = launchpad.archives.getByReference(reference=args.archive) try: - distroseries = ubuntu.getSeries(name_or_version=release) + distroseries = ubuntu.getSeries(name_or_version=release.split("-")[0]) except lazr.restfulclient.errors.NotFound as error: Logger.error(error) sys.exit(1) @@ -234,11 +234,11 @@ def main(): # are in place. if operation == "retry": necessary_privs = archive.checkUpload( - component=sources.getComponent(), + component=component, distroseries=distroseries, person=launchpad.me, pocket=pocket, - sourcepackagename=sources.getPackageName(), + sourcepackagename=sources.source_package_name, ) if not necessary_privs: Logger.error(