dpkg: error: --compare-versions takes three arguments: <version> <relation> <version>

Bug #2069274 reported by Heinrich Schuchardt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Committed
Undecided
Frode Nordahl

Bug Description

I used autopkgtest 5.34ubuntu2 on Oracular

   sh -x /usr/bin/autopkgtest-build-lxd ubuntu-daily:noble/amd64

It fails with

+ REUSE=
+ [ lxc = incus ]
+ lxc version
+ sed -ne s/Client version: // p
+ dpkg --compare-versions 5.21.1 LTS ge 5.14
dpkg: error: --compare-versions takes three arguments: <version> <relation> <version>

We need to remove the LTS postfix.
---
ProblemType: Bug
ApportVersion: 2.28.1-0ubuntu4
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
DistroRelease: Ubuntu 24.10
InstallationDate: Installed on 2021-07-01 (1078 days ago)
InstallationMedia: Kubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
NonfreeKernelModules: zfs
Package: autopkgtest 5.34ubuntu2
PackageArchitecture: all
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Tags: oracular
Uname: Linux 6.8.0-31-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dialout dip libvirt lpadmin lxd plugdev sambashare sbuild sispmctl sudo
_MarkForUpload: True

Revision history for this message
Heinrich Schuchardt (xypron) wrote : Dependencies.txt

apport information

description: updated
tags: added: apport-collected oracular
description: updated
Revision history for this message
Heinrich Schuchardt (xypron) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Heinrich Schuchardt (xypron) wrote : ProcEnviron.txt

apport information

Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

In salsa.debian.org the problem is already fixed:

tools/autopkgtest-build-lxd:256:
if [ "$COMMAND" = incus ] || dpkg --compare-versions "$(lxc version | awk '/Client version:/{print$3}')" ge 5.14; then

Patch 7638e2cd8f6a ("autopkgtest-build-lxd: fix shellcheck warnings and check in pre-commit")
by Paride Legovini, 2024-05-07

Revision history for this message
Paride Legovini (paride) wrote :

That's actually fixed in 287e463300eee924d1879498a879edd2f4634f43 by Frode Nordahl.

Changed in autopkgtest (Ubuntu):
status: New → Fix Committed
assignee: nobody → Frode Nordahl (fnordahl)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.