[autotest-client-tests][PATCH] UBUNTU: SAUCE: ubuntu_lxc: use source code from the archive

Po-Hsu Lin po-hsu.lin at canonical.com
Mon Feb 14 09:21:14 UTC 2022


BugLink: https://bugs.launchpad.net/bugs/1960094

Use the source code from the archive for the test, so that we won't
have a version mismatch issue between the git repo and the package in
our archives caused by the package upload delays.

Patch tested on Focal and this "undefined symbol: strlcat" error does
not exist anymore.

Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
---
 ubuntu_lxc/ubuntu_lxc.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/ubuntu_lxc/ubuntu_lxc.py b/ubuntu_lxc/ubuntu_lxc.py
index 178000aa..2e5d589b 100644
--- a/ubuntu_lxc/ubuntu_lxc.py
+++ b/ubuntu_lxc/ubuntu_lxc.py
@@ -48,11 +48,10 @@ class ubuntu_lxc(test.test):
         if self.series not in ['precise', 'trusty', 'xenial']:
             os.chdir('/tmp')
             shutil.rmtree('lxc-pkg-ubuntu', ignore_errors=True)
-            if self.series == 'jammy':
-                print("We don't have dpm-jammy branch yet, use the latest dpm-impish branch instead.")
-                self.series = 'impish'
-            cmd = 'git clone --depth=1 https://github.com/lxc/lxc-pkg-ubuntu.git -b dpm-{}'.format(self.series)
-            utils.system(cmd)
+            # Fetch source code from the archive instead of https://github.com/lxc/lxc-pkg-ubuntu.git
+            # To avoid version mismatch issue LP: #1960094
+            utils.system('apt-get source --download-only lxc')
+            utils.system("dpkg-source -x lxc*dsc lxc-pkg-ubuntu")
             os.chdir('/tmp/lxc-pkg-ubuntu')
             gcc_multiarch = utils.system_output('gcc -print-multiarch',  retain_output=False)
             utils.system('autoreconf -f -i')
-- 
2.25.1




More information about the kernel-team mailing list