def squashspaces(string):
return re.sub("\s+", " ", string)
+ def sortpkglist(string):
+ pkgiter = re.finditer(r'[a-zA-Z0-9.-]+( \([><=]+ [^ )]+\))?', string, 0)
+ pkglist = [p.group(0) for p in pkgiter]
+ pkglist.sort()
+ return ' '.join(pkglist)
+
+ def sortlist(string):
+ items = string.split(' ')
+ items.sort()
+ return ' '.join(items)
+
pn = d.getVar('PN', True)
pe = d.getVar('PE', True) or "0"
pv = d.getVar('PV', True)
rcpinfo.pe = pe
rcpinfo.pv = pv
rcpinfo.pr = pr
- rcpinfo.depends = squashspaces(d.getVar('DEPENDS', True) or "")
+ rcpinfo.depends = sortlist(squashspaces(d.getVar('DEPENDS', True) or ""))
rcpinfo.packages = packages
write_recipehistory(rcpinfo, d)
write_latestlink(None, pe, pv, pr, d)
pkginfo.pe = pe
pkginfo.pv = pv
pkginfo.pr = pr
- pkginfo.rdepends = squashspaces(getpkgvar(pkg, 'RDEPENDS') or "")
- pkginfo.rrecommends = squashspaces(getpkgvar(pkg, 'RRECOMMENDS') or "")
+ pkginfo.rdepends = sortpkglist(squashspaces(getpkgvar(pkg, 'RDEPENDS') or ""))
+ pkginfo.rrecommends = sortpkglist(squashspaces(getpkgvar(pkg, 'RRECOMMENDS') or ""))
pkginfo.files = squashspaces(getpkgvar(pkg, 'FILES') or "")
# Gather information about packaged files