poky/bitbake/lib/prserv
Dan McGregor de29354e84 bitbake: prserv: increment 9 to 10 correctly
Previously, incrementing "0.9" would result in "0.1.0", which
generally gets recognised as a lower version number. Even more
surprising, incrementing "0.99" returned "0.1.0.0".

This is due to the behaviour of the list function on a string
object; it adds each character as an element in a new list,
causing the new string '10' to become the list [ '1', '0' ].

Instead of converting a string to a list, add the string to a
new list, and concatenate it with the existing list slice. And
provide test cases for "0.9" -> "0.10" and related edge cases.

(Bitbake rev: 96ddeefa88ff4c37e9ea096726a7cdca5b5b4572)

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-09-12 16:17:20 +01:00
..
__init__.py bitbake: prserv: increment 9 to 10 correctly 2024-09-12 16:17:20 +01:00
client.py bitbake: prserv: import simplification 2024-05-21 14:23:43 +01:00
db.py bitbake: prserv: import simplification 2024-05-21 14:23:43 +01:00
serv.py bitbake: prserv: import simplification 2024-05-21 14:23:43 +01:00
tests.py bitbake: prserv: increment 9 to 10 correctly 2024-09-12 16:17:20 +01:00