commit: e218181a346d02f68e92267d94f299319104d3b6 Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za> AuthorDate: Thu Jun 11 19:59:13 2020 +0000 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> CommitDate: Thu Jun 25 11:18:23 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e218181a
net-misc/dahdi: fix install issue w.r.t. depmod. If the kernel sources are not yet compiled, then there is no System.map, and as a result the kernel build system won't run depmod, resulting in the modules.* files normally generated by this to not exist. This causes the rm in the ebuild to fail. Substitute with a find mechanism that only deletes if it exists. At the same time clean up some empty files on the image that carries firmware version information which we don't care about. Closes: https://bugs.gentoo.org/725022 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za> Closes: https://github.com/gentoo/gentoo/pull/16196 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> net-misc/dahdi/dahdi-3.1.0-r1.ebuild | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net-misc/dahdi/dahdi-3.1.0-r1.ebuild b/net-misc/dahdi/dahdi-3.1.0-r1.ebuild index bd1d6c11293..f69efcbe418 100644 --- a/net-misc/dahdi/dahdi-3.1.0-r1.ebuild +++ b/net-misc/dahdi/dahdi-3.1.0-r1.ebuild @@ -97,5 +97,11 @@ src_install() { DAHDI_MODULES_EXTRA="${JNET_DRIVERS// /.o }.o$(usex oslec " dahdi_echocan_oslec.o" "")" \ LDFLAGS="$(raw-ldflags)" install - rm -r "${ED}"/lib/modules/*/modules.* || die "Error removing bogus modules" + # Remove the blank "version" files (these files are all empty, and root owned). + find "${ED}/lib/firmware" -name ".*" -delete || die "Error removing empty firmware version files" + + # If the kernel sources have a System.map, and there a suitable depmod + # available (seemingly when we're not cross-compiling), then the kernel + # sources depmod kicks in. Remove the files caused by that. + find "${ED}/lib/modules" -name "modules.*" -delete || die "Error deleting bogus modules.* files" }