summaryrefslogtreecommitdiffstats
path: root/src/analyze/analyze-compare-versions.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* analyze: don't warn about version spec compliant versionsJoerg Behrmann2023-07-181-5/+5
| | | | | | | | | | | | This commits adds version_is_valid_versionspec and uses it in analyze-compare-version.c. version_is_valid_versionspec differs from version_is_valid in that it acepts empty strings and since valid characters in a version spec version are all ASCII letters and digits as well as "-.~^", but ",_+" allowed by version_is_valid are not. Also give a more specific warning message on invalid characters.
* analyze: also check for version string validityLennart Poettering2023-06-201-4/+14
| | | | | | It's highly interesting to see if tools such as systemd-sysupdate consider a version valid, hence let's output that too (though gracefully, not fatally)
* compare: support textual operators, and port analyze over to itLennart Poettering2022-09-011-16/+11
|
* analyze: use IN_SET() in one more placeFrantisek Sumsal2022-05-301-1/+1
|
* basic: add helper function to print </==/>Zbigniew Jędrzejewski-Szmek2022-05-251-1/+1
|
* analyze: use '' instead of the empty string when showing versionsZbigniew Jędrzejewski-Szmek2022-05-251-2/+2
| | | | | | It looks like garbled output… I didn't use shell-escape, because the other characters that are special for the shell that are used in versions should not be escaped.
* analyze: add compare-versionsZbigniew Jędrzejewski-Szmek2022-05-191-0/+47
The interface, output, and exit status convention are all taken directly from rpmdev-vercmp and dpkg --compare-versions. The implementation is different though. See test-string-util for a list of known cases where we compare strings incompatibly. The idea is that this string comparison function will be declared as "the" method to use for boot entry ordering in the specification and similar uses. Thus it's nice to allow users to compare strings.