os-util: avoid matching on the wrong extension-release file
authorLuca Boccassi <bluca@debian.org>
Wed, 3 Jul 2024 20:27:28 +0000 (21:27 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 4 Jul 2024 10:49:28 +0000 (12:49 +0200)
commit92d1fe3efac7b3a700317ec71b64cab5ebc17b42
tree7b5edab4eab3d9fd47c583f7509ce7861a3c09f2
parent96110261ee7716bf19a6920a4206365614ad3857
os-util: avoid matching on the wrong extension-release file

The previous commit tries to extract a substring from the
extension-release suffix, but that is not right, it's only the
images that need to be versioned and extracted, use the extension-release
suffix as-is. Otherwise if it happens to contain a prefix that
matches the wrong image, it will be taken into account.

Follow-up for 37543971aff79f3a37646ffc2bb5845c9394797b
src/basic/os-util.c
test/units/TEST-29-PORTABLE.sh