diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-12-03 11:02:41 +0100 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-12-06 12:52:10 +0100 |
commit | 3e08333903329240b0d8f23ff81adf308d366e01 (patch) | |
tree | 371a91d9c6125a234d769f0d426262c0f67cbe04 /devel | |
parent | aa6be66254618de23b386fd18dfb4a307af214bb (diff) |
ckmake: sort kernel releases properly
Ever since 3.10, kernel releases weren't sorted properly.
Put them into a parsed list first and then sort them to
get the 3.10/11/12 etc. to the bottom of the list.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Diffstat (limited to 'devel')
-rwxr-xr-x | devel/ckmake | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/devel/ckmake b/devel/ckmake index 7c0ab5a0..8c440513 100755 --- a/devel/ckmake +++ b/devel/ckmake @@ -419,7 +419,7 @@ class kernel_set(): def parse_releases(self, target_kranges): self.target_kranges = target_kranges for dirname, dirnames, filenames in os.walk(modules): - dirnames.sort() + rels = [] for subdirname in dirnames: specifics = get_rel_spec_ubuntu(subdirname) if (not specifics): @@ -439,8 +439,7 @@ class kernel_set(): ver = ver + '.' + specifics['SUBLEVEL'] get_rel_spec_base(subdirname) - rel = dict(idx=len(self.releases), - name=subdirname, + rel = dict(name=subdirname, full_path=dirname + '/' + subdirname, version=ver, @@ -454,6 +453,12 @@ class kernel_set(): processed=False, log='', status=1234) + rels.append(rel) + def relsort(rel): + return int(rel['ver']), int(rel['pat']), int(rel['sub']) + rels.sort(key=relsort) + for rel in rels: + rel['idx'] = len(self.releases) self.evaluate_new_rel(rel) self.refresh() def setup_screen(self): |