This should fix 2 bugs reported last week: - `depmod -n` failing. Like for other binary indexes we just skip now - programs like lspci failing since they don't ignore errors from kmod_load_resources() - the new modules.builtin.alias.bin may not exist if depmod from kmod 27 wasn't executed for that kernel version. Also modules.builtin.modinfo (from where the former is extracted) is only available on recent kernel versions. So make this index optional for kmod_load_resources() - other parts of the code already assume it's optional Lucas De Marchi (6): gitignore: ignore .cache.mk when building modules depmod: do not output .bin to stdout libkmod: simplify lookup when builtin.modinfo.bin file is missing libkmod: fix return error when opening index libkmod: allow modules.alias.builtin to be optional testsuite: add check for kmod_load_resources libkmod/libkmod-index.c | 31 ++++++----- libkmod/libkmod-index.h | 4 +- libkmod/libkmod-module.c | 8 +-- libkmod/libkmod.c | 50 ++++++++++-------- testsuite/module-playground/.gitignore | 1 + .../lib/modules/5.6.0/modules.alias | 1 + .../lib/modules/5.6.0/modules.alias.bin | Bin 0 -> 12 bytes .../lib/modules/5.6.0/modules.builtin | 1 + .../lib/modules/5.6.0/modules.builtin.bin | Bin 0 -> 39 bytes .../lib/modules/5.6.0/modules.dep | 0 .../lib/modules/5.6.0/modules.dep.bin | Bin 0 -> 12 bytes .../lib/modules/5.6.0/modules.devname | 1 + .../lib/modules/5.6.0/modules.softdep | 1 + .../lib/modules/5.6.0/modules.symbols | 1 + .../lib/modules/5.6.0/modules.symbols.bin | Bin 0 -> 12 bytes testsuite/test-init.c | 31 +++++++++++ tools/depmod.c | 6 ++- 17 files changed, 95 insertions(+), 41 deletions(-) create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.alias create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.alias.bin create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.builtin create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.builtin.bin create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.dep create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.dep.bin create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.devname create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.softdep create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.symbols create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.symbols.bin -- 2.25.1