diff mbox series

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

Message ID 20220214092114.19110-1-po-hsu.lin@canonical.com
State New
Headers show
Series [autotest-client-tests] UBUNTU: SAUCE: ubuntu_lxc: use source code from the archive | expand

Commit Message

Po-Hsu Lin Feb. 14, 2022, 9:21 a.m. UTC
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@canonical.com>
---
 ubuntu_lxc/ubuntu_lxc.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Po-Hsu Lin Feb. 15, 2022, 7:45 a.m. UTC | #1
Applied and pushed.

Thanks
Sam
diff mbox series

Patch

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')