diff options
-rw-r--r-- | meta/classes/buildhistory.bbclass | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 3964247445..1b6b2493e4 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -126,6 +126,17 @@ python buildhistory_emit_pkghistory() { | |||
126 | def squashspaces(string): | 126 | def squashspaces(string): |
127 | return re.sub("\s+", " ", string) | 127 | return re.sub("\s+", " ", string) |
128 | 128 | ||
129 | def sortpkglist(string): | ||
130 | pkgiter = re.finditer(r'[a-zA-Z0-9.-]+( \([><=]+ [^ )]+\))?', string, 0) | ||
131 | pkglist = [p.group(0) for p in pkgiter] | ||
132 | pkglist.sort() | ||
133 | return ' '.join(pkglist) | ||
134 | |||
135 | def sortlist(string): | ||
136 | items = string.split(' ') | ||
137 | items.sort() | ||
138 | return ' '.join(items) | ||
139 | |||
129 | pn = d.getVar('PN', True) | 140 | pn = d.getVar('PN', True) |
130 | pe = d.getVar('PE', True) or "0" | 141 | pe = d.getVar('PE', True) or "0" |
131 | pv = d.getVar('PV', True) | 142 | pv = d.getVar('PV', True) |
@@ -136,7 +147,7 @@ python buildhistory_emit_pkghistory() { | |||
136 | rcpinfo.pe = pe | 147 | rcpinfo.pe = pe |
137 | rcpinfo.pv = pv | 148 | rcpinfo.pv = pv |
138 | rcpinfo.pr = pr | 149 | rcpinfo.pr = pr |
139 | rcpinfo.depends = squashspaces(d.getVar('DEPENDS', True) or "") | 150 | rcpinfo.depends = sortlist(squashspaces(d.getVar('DEPENDS', True) or "")) |
140 | rcpinfo.packages = packages | 151 | rcpinfo.packages = packages |
141 | write_recipehistory(rcpinfo, d) | 152 | write_recipehistory(rcpinfo, d) |
142 | write_latestlink(None, pe, pv, pr, d) | 153 | write_latestlink(None, pe, pv, pr, d) |
@@ -164,8 +175,8 @@ python buildhistory_emit_pkghistory() { | |||
164 | pkginfo.pe = pe | 175 | pkginfo.pe = pe |
165 | pkginfo.pv = pv | 176 | pkginfo.pv = pv |
166 | pkginfo.pr = pr | 177 | pkginfo.pr = pr |
167 | pkginfo.rdepends = squashspaces(getpkgvar(pkg, 'RDEPENDS') or "") | 178 | pkginfo.rdepends = sortpkglist(squashspaces(getpkgvar(pkg, 'RDEPENDS') or "")) |
168 | pkginfo.rrecommends = squashspaces(getpkgvar(pkg, 'RRECOMMENDS') or "") | 179 | pkginfo.rrecommends = sortpkglist(squashspaces(getpkgvar(pkg, 'RRECOMMENDS') or "")) |
169 | pkginfo.files = squashspaces(getpkgvar(pkg, 'FILES') or "") | 180 | pkginfo.files = squashspaces(getpkgvar(pkg, 'FILES') or "") |
170 | 181 | ||
171 | # Gather information about packaged files | 182 | # Gather information about packaged files |