[MDEV-27386] cpack rpm with multiple archs of libsepol installed detects verison incorrectly Created: 2021-12-30  Updated: 2021-12-31  Resolved: 2021-12-30

Status: Closed
Project: MariaDB Server
Component/s: Packaging
Affects Version/s: 10.2
Fix Version/s: 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None
Environment:

rpm



 Description   

On a system its quite easy to have x86 and x86_64 package installed.

$ dnf info libsepol
Last metadata expiration check: 3:52:47 ago on Thu 30 Dec 2021 12:38:03.
Installed Packages
Name         : libsepol
Version      : 3.3
Release      : 2.fc35
Architecture : i686
Size         : 802 k
...
 
Name         : libsepol
Version      : 3.3
Release      : 2.fc35
Architecture : x86_64
Size         : 738 k
Source       : libsepol-3.3-2.fc35.src.rpm
Repository   : @

RPM -qf used to determine the installed version dillegenly appends the two:

$ rpm -q --qf "%{VERSION}" libsepol
3.33.3

Resulting in a rather unobtainable version number.

A more accurate representation is:

$ rpm -q --qf "%{VERSION}" libsepol.x86_64
3.3


Generated at Thu Feb 08 09:52:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.