diff options
author | Richard Hughes <richard@hughsie.com> | 2015-10-18 20:47:16 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-10-18 20:56:46 +0100 |
commit | c60e682baffc86c6ed85b77960fe0a17d62f67ea (patch) | |
tree | 150251bac82b7d881028d444cef9bf6a761bca5d /libappstream-builder | |
parent | 16b4707618841eb884a861f2c65d8237cb83ed76 (diff) | |
download | appstream-glib-c60e682baffc86c6ed85b77960fe0a17d62f67ea.tar.gz |
Use a MS-style version number when parsing a hex version
If we're comparing versions that are both converted to strings it doesn't
really matter how the strings are stored (e.g. AA.BB.CC.DD or AA.BB.CCDD) as
the integer rules still apply **if** we don't remove the prefixed zeros.
The only time we have to be careful is where the firmware metainfo uses the
triplet and the .inf file uses the hex version format.
By using the triplet-style by default we match what Intel and Microsoft are
providing in the firmware release notes.
Basically:
* If you're not using the MS-style versioning scheme, just use hex numbers in
both places.
* If you don't care about applying the update on Microsoft Windows, just
don't supply an .inf file at all.
Fixes the other half of https://github.com/hughsie/fwupd/issues/34
This does break API, but we've never had the method in a released version so
I think it's fine to break at this stage. Make sure you update fwupd at the same
time if you're using git master.
The last bit of this fix would to be somehow encode the "display version" onto
the AppStream <release> object, but this needs discussion upstream first.
Diffstat (limited to 'libappstream-builder')
-rw-r--r-- | libappstream-builder/asb-self-test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libappstream-builder/asb-self-test.c b/libappstream-builder/asb-self-test.c index 2d8bc2c..9c99652 100644 --- a/libappstream-builder/asb-self-test.c +++ b/libappstream-builder/asb-self-test.c @@ -522,7 +522,7 @@ asb_test_context_test_func (AsbTestContextMode mode) "<releases>\n" "<release version=\"2.0.2\" timestamp=\"1424116753\">\n" "<location>http://www.hughski.com/downloads/colorhug2/firmware/colorhug-2.0.2.cab</location>\n" - "<checksum filename=\"colorhug-als-2.0.2.cab\" target=\"container\" type=\"sha1\">0608b5e8169706f1351a6351630503de75939a86</checksum>\n" + "<checksum filename=\"colorhug-als-2.0.2.cab\" target=\"container\" type=\"sha1\">7e179f45d2782c3c9744495dd4bbd91ad3d9e841</checksum>\n" "<checksum filename=\"firmware.bin\" target=\"content\" type=\"sha1\">767a8a7b8a7b350b513f57761204b4aaa657aa44</checksum>\n" "<description><p>This unstable release adds the following features:</p>" "<ul><li>Add TakeReadingArray to enable panel latency measurements</li>" @@ -836,7 +836,7 @@ asb_test_firmware_func (void) "<releases>\n" "<release version=\"2.0.2\" timestamp=\"1424116753\">\n" "<location>http://www.hughski.com/downloads/colorhug2/firmware/colorhug-2.0.2.cab</location>\n" - "<checksum filename=\"colorhug-als-2.0.2.cab\" target=\"container\" type=\"sha1\">0608b5e8169706f1351a6351630503de75939a86</checksum>\n" + "<checksum filename=\"colorhug-als-2.0.2.cab\" target=\"container\" type=\"sha1\">7e179f45d2782c3c9744495dd4bbd91ad3d9e841</checksum>\n" "<checksum filename=\"firmware.bin\" target=\"content\" type=\"sha1\">767a8a7b8a7b350b513f57761204b4aaa657aa44</checksum>\n" "<description><p>This unstable release adds the following features:</p>" "<ul><li>Add TakeReadingArray to enable panel latency measurements</li>" @@ -847,14 +847,14 @@ asb_test_firmware_func (void) "</release>\n" "<release version=\"2.0.1\" timestamp=\"1424116753\">\n" "<location>http://www.hughski.com/downloads/colorhug2/firmware/colorhug-2.0.1.cab</location>\n" - "<checksum filename=\"colorhug-als-2.0.1.cab\" target=\"container\" type=\"sha1\">181496f09df2f09c265742c0e5d9a27fb62b4af7</checksum>\n" + "<checksum filename=\"colorhug-als-2.0.1.cab\" target=\"container\" type=\"sha1\">1f8c1a3f92194ebad984df61a6d0c3c1572c1874</checksum>\n" "<checksum filename=\"firmware.bin\" target=\"content\" type=\"sha1\">767a8a7b8a7b350b513f57761204b4aaa657aa44</checksum>\n" "<description><p>This unstable release adds the following features:</p>" "<ul><li>Use TakeReadings() to do a quick non-adaptive measurement</li>" "<li>Scale XYZ measurement with a constant factor to make the CCMX more " "sane</li></ul></description>\n" "<size type=\"installed\">14</size>\n" - "<size type=\"download\">1949</size>\n" + "<size type=\"download\">1951</size>\n" "</release>\n" "</releases>\n" "<provides>\n" |