Sort modules in module-info by modname, not modtype
This commit is contained in:
parent
7dbf40fdad
commit
32c7ffd2eb
@ -239,8 +239,6 @@ export PS1 PATH
|
|||||||
for modtype, fname in {"scsi": "modules.block",
|
for modtype, fname in {"scsi": "modules.block",
|
||||||
"eth": "modules.networking"}.items():
|
"eth": "modules.networking"}.items():
|
||||||
|
|
||||||
modlist[modtype] = {}
|
|
||||||
|
|
||||||
fname = os.path.join(dst_moddir, fname)
|
fname = os.path.join(dst_moddir, fname)
|
||||||
with open(fname, "r") as f:
|
with open(fname, "r") as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
@ -268,15 +266,14 @@ export PS1 PATH
|
|||||||
|
|
||||||
info = '{0}\n\t{1}\n\t"{2}"\n'
|
info = '{0}\n\t{1}\n\t"{2}"\n'
|
||||||
info = info.format(modname, modtype, desc)
|
info = info.format(modname, modtype, desc)
|
||||||
modlist[modtype][modname] = info
|
modlist[modname] = info
|
||||||
|
|
||||||
# write the source module-info
|
# write the source module-info
|
||||||
moduleinfo = os.path.join(self.workdir, self.const.MODULEINFO)
|
moduleinfo = os.path.join(self.workdir, self.const.MODULEINFO)
|
||||||
with open(moduleinfo, "w") as f:
|
with open(moduleinfo, "w") as f:
|
||||||
f.write("Version 0\n")
|
f.write("Version 0\n")
|
||||||
for modtype, modules in modlist.items():
|
for modname in sorted(modlist.keys()):
|
||||||
for modname in sorted(modules.keys()):
|
f.write(modlist[modname])
|
||||||
f.write(modlist[modtype][modname])
|
|
||||||
|
|
||||||
# create the final module-info
|
# create the final module-info
|
||||||
dst = os.path.join(os.path.dirname(dst_moddir), self.const.MODULEINFO)
|
dst = os.path.join(os.path.dirname(dst_moddir), self.const.MODULEINFO)
|
||||||
|
Loading…
Reference in New Issue
Block a user