clearlinux / swupd-server

Software update server (deprecated)
Other
13 stars 17 forks source link

Switch secondary sort order for version-sorted manifests #38

Closed phmccarty closed 7 years ago

phmccarty commented 7 years ago

To ease human readability of manifests, but without impacting manifest delta efficiency, use a lexicographic filename secondary sort order when sorting manifests by version.

Below is an example of how this commit changes the sorted order (the first column is the version, and the second column is the filename).

# Before
10  zyxw
10  abcd
20  test2
20  test1
20  abba
20  aaaa
30  zzyy

# After
10  abcd
10  zyxw
20  aaaa
20  abba
20  test1
20  test2
30  zzyy
mrkz commented 7 years ago

I'd appreciate a short example of how the data in manifests changes with this commit. e.g:

# From
10 zzyy
20 zzaa
20 aaaa
20 bbaa
20 abba
80 aaaa

# To
10 zzyy
20 aaaa
20 abba
20 bbaa
20 zzaa
80 aaaa
phmccarty commented 7 years ago

@mrkz I added an example to the commit message.

tmarcu commented 7 years ago

+1