Brian Murray has proposed merging autopkgtest-cloud:add-apt-repo into autopkgtest-cloud:master.
Requested reviews: Canonical's Ubuntu QA (canonical-ubuntu-qa) For more details, see: https://code.launchpad.net/~ubuntu-release/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/462535 The sed call modifying /etc/apt/sources.list (to add a PPA was failing) so I switched it to using add-apt-repository. (This'll fail for private PPAs but its better than failing for everything‽) Here's part of the failure I was observing: d/worker/worker[194401]: ERROR: 0s autopkgtest [19:02:36]: starting date and time: 2024-03-15 19:02:36+0000 0s autopkgtest [19:02:36]: git checkout: b506e79c ssh-setup/nova: fix ARCH having two lines of data 0s autopkgtest [19:02:36]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/auto> 73s autopkgtest [19:03:49]: testbed dpkg architecture: amd64 73s autopkgtest [19:03:49]: testbed apt version: 2.7.12 73s autopkgtest [19:03:49]: @@@@@@@@@@@@@@@@@@@@ test bed setup 73s Reading package lists... 73s Building dependency tree... 73s Reading state information... 73s Calculating upgrade... 74s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 74s Reading package lists... 74s Building dependency tree... 74s Reading state information... 75s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 75s Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). 75s Executing: /tmp/apt-key-gpghome.ZUpEkGbbVC/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-key 0F1FB299A1ECD860B7376336C9FD332D2F4EBC9C 75s gpg: key C9FD332D2F4EBC9C: public key "Launchpad PPA for Mitchell Dzurick" imported 75s gpg: Total number processed: 1 75s gpg: imported: 1 75s sed: can't read /etc/apt/sources.list: No such file or directory 87s Creating nova instance adt-noble-amd64-multipath-tools-20240315-184900-juju-7f2275-prod-proposed-migration-environment-2 from image adt/ubuntu-noble-amd64-serve I'm not positive we should merge this but it could be start for a more complete fix. -- Your team Canonical's Ubuntu QA is requested to review the proposed merge of autopkgtest-cloud:add-apt-repo into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker index f1bbac5..ef26550 100755 --- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker +++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker @@ -827,6 +827,7 @@ def request(msg): try: (ppacreds, _, ppaurl) = ppa.rpartition("@") (ppaurl, _, fingerprint) = ppaurl.partition(":") + # pylint: disable=unused-variable (ppacreds_user, ppacreds_pass) = ( ppacreds.split(":") if ppacreds else (None, None) ) @@ -891,25 +892,18 @@ def request(msg): if ppacreds_user: # Any run with at least one private PPA needs to be private. private = True + # pylint: disable=unused-variable ppaprefix = "https://%s:%s@private-" % ( ppacreds_user, ppacreds_pass, ) else: + # pylint: disable=unused-variable ppaprefix = "http://" - # add GPG key argv += [ "--setup-commands", - "apt-key adv --keyserver keyserver.ubuntu.com --recv-key " - + fingerprint, - ] - # add apt source - argv += [ - "--setup-commands", - 'REL=$(sed -rn "/^(deb|deb-src) .*(ubuntu.com|ftpmaster)/ { s/^[^ ]+ +(\[.*\] *)?[^ ]* +([^ -]+) +.*$/\\2/p; q }" /etc/apt/sources.list); ' - 'echo "deb %(prefix)sppa.launchpad.net/%(u)s/%(p)s/ubuntu $REL main" > /etc/apt/sources.list.d/autopkgtest-%(u)s-%(p)s.list; ' - 'echo "deb-src %(prefix)sppa.launchpad.net/%(u)s/%(p)s/ubuntu $REL main" >> /etc/apt/sources.list.d/autopkgtest-%(u)s-%(p)s.list;' - % {"prefix": ppaprefix, "u": ppauser, "p": ppaname}, + "add-apt-repository --enable-source --yes ", + "--ppa %(u)s:%(p)s" % {"u": ppauser, "p": ppaname}, ] # put results into separate container, named by the last PPA
-- Mailing list: https://launchpad.net/~canonical-ubuntu-qa Post to : canonical-ubuntu-qa@lists.launchpad.net Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa More help : https://help.launchpad.net/ListHelp