Skip to content

Commit

Permalink
Merge pull request #736 from camptocamp/fix-dpkg-version
Browse files Browse the repository at this point in the history
Get the right version when the bin package and the source package has…
  • Loading branch information
sbrunner authored Sep 27, 2022
2 parents 321898d + 61e0fe7 commit 85eb45d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
8 changes: 6 additions & 2 deletions c2cciutils/lib/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,13 @@ def get_dpkg_packages_versions(
if package not in ("base-files",):
package_version[package] = version
package = value
version = None
if name == "Source":
package = value.split(" ")[0]
if name == "Version":
source_split = value.split(" ")
package = source_split[0]
if len(source_split) > 1:
version = Version.from_string(source_split[1].strip("()"))
if name == "Version" and version is None:
version = Version.from_string(value)
# Don't take care on the epoch
version = Version(upstream=version.upstream, revision=version.revision)
Expand Down
18 changes: 10 additions & 8 deletions ci/dpkg-versions.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# See repository list: https://repology.org/repositories/statistics

camptocamp/c2cciutils:latest:
ubuntu_22_04/acl: 2.3.1-1
ubuntu_22_04/adduser: 3.118ubuntu5
Expand All @@ -23,13 +25,13 @@ camptocamp/c2cciutils:latest:
ubuntu_22_04/e2fsprogs: 1.46.5-2ubuntu1.1
ubuntu_22_04/expat: 2.4.7-1
ubuntu_22_04/findutils: 4.8.0-1ubuntu3
ubuntu_22_04/gcc-12: 12-20220319-1ubuntu1
ubuntu_22_04/gcc-12: 12.1.0-2ubuntu1~22.04
ubuntu_22_04/glibc: 2.35-0ubuntu3.1
ubuntu_22_04/gmp: 6.2.1+dfsg-3ubuntu1
ubuntu_22_04/gnupg2: 2.2.27-3ubuntu2.1
ubuntu_22_04/gnutls28: 3.7.3-4ubuntu1.1
ubuntu_22_04/grep: 3.7-1build1
ubuntu_22_04/gzip: 1.10-4ubuntu4
ubuntu_22_04/gzip: 1.10-4ubuntu4.1
ubuntu_22_04/hostname: 3.23ubuntu2
ubuntu_22_04/init-system-helpers: '1.62'
ubuntu_22_04/keyutils: 1.6.1-2ubuntu3
Expand Down Expand Up @@ -62,29 +64,29 @@ camptocamp/c2cciutils:latest:
ubuntu_22_04/ncurses: 6.3-2
ubuntu_22_04/nettle: 3.7.3-1build2
ubuntu_22_04/nghttp2: 1.43.0-1build3
ubuntu_22_04/nodejs: 16.17.0-deb-1nodesource1
ubuntu_22_04/nodejs: 16.17.1-deb-1nodesource1
ubuntu_22_04/npth: 1.6-3build2
ubuntu_22_04/openldap: 2.5.13+dfsg-0ubuntu0.22.04.1
ubuntu_22_04/openssl: 3.0.2-0ubuntu1.6
ubuntu_22_04/p11-kit: 0.24.0-6build1
ubuntu_22_04/pam: 1.4.0-11ubuntu2
ubuntu_22_04/pcre2: 10.39-3build1
ubuntu_22_04/pcre2: 10.39-3ubuntu0.1
ubuntu_22_04/pcre3: 8.39-13ubuntu0.22.04.1
ubuntu_22_04/perl: 5.34.0-3ubuntu1
ubuntu_22_04/pinentry: 1.1.1-1build2
ubuntu_22_04/procps: 3.3.17-6ubuntu2
ubuntu_22_04/python-pip: 22.0.2+dfsg-1
ubuntu_22_04/python3-defaults: 3.10.4-0ubuntu2
ubuntu_22_04/python3-stdlib-extensions: 3.10.4-0ubuntu1
ubuntu_22_04/python3.10: 3.10.4-3ubuntu0.1
ubuntu_22_04/python3-defaults: 3.10.6-1~22.04
ubuntu_22_04/python3-stdlib-extensions: 3.10.6-1~22.04
ubuntu_22_04/python3.10: 3.10.6-1~22.04
ubuntu_22_04/readline: 8.1.2-1
ubuntu_22_04/rtmpdump: 2.4+20151223.gitfa8646d.1-2build4
ubuntu_22_04/sed: 4.8-1ubuntu2
ubuntu_22_04/sensible-utils: 0.0.17
ubuntu_22_04/setuptools: 59.6.0-1.2
ubuntu_22_04/shadow: 4.8.1-2ubuntu2
ubuntu_22_04/sqlite3: 3.37.2-2
ubuntu_22_04/systemd: 249.11-0ubuntu3.4
ubuntu_22_04/systemd: 249.11-0ubuntu3.6
ubuntu_22_04/sysvinit: 3.01-1ubuntu1
ubuntu_22_04/tar: 1.34+dfsg-1build3
ubuntu_22_04/ubuntu-keyring: 2021.03.26
Expand Down

0 comments on commit 85eb45d

Please sign in to comment.