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>
Run them with "bitbake-selftest prserv.tests"
(Bitbake rev: 34287fbf3d6be813aa5b767f540e4662f0d8d18d)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Cc: Joshua Watt <JPEWhacker@gmail.com>
Cc: Tim Orling <ticotimo@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>