@@ -105,15 +105,15 @@ ifneq ($(do_tools),true)
endif
ifeq ($(do_zfs),false)
- do_zfs_disable:=$(shell cat $(DROOT)/zfs-modules.ignore >>$(prev_abidir)/../modules.ignore)
+ do_zfs_disable:=$(shell for m in $$(cat $(DROOT)/zfs-modules.ignore); do grep -qxF $$m $(prev_abidir)/../modules.ignore 2>/dev/null || echo $$m >> $(prev_abidir)/../modules.ignore; done)
endif
ifeq ($(do_dkms_vbox),false)
- do_vbox_disable:=$(shell cat $(DROOT)/vbox-modules.ignore >>$(prev_abidir)/../modules.ignore)
+ do_vbox_disable:=$(shell for m in $$(cat $(DROOT)/vbox-modules.ignore); do grep -qxF $$m $(prev_abidir)/../modules.ignore 2>/dev/null || echo $$m >> $(prev_abidir)/../modules.ignore; done)
endif
ifeq ($(do_dkms_wireguard),false)
- do_wireguard_disable:=$(shell cat $(DROOT)/wireguard-modules.ignore >>$(prev_abidir)/../modules.ignore)
+ do_wireguard_disable:=$(shell for m in $$(cat $(DROOT)/wireguard-modules.ignore); do grep -qxF $$m $(prev_abidir)/../modules.ignore 2>/dev/null || echo $$m >> $(prev_abidir)/../modules.ignore; done)
endif
# Either tools package needs the common source preparation
If we always append the list of disabled modules to modules.ignore we may end up having lots of duplicate entries during the kernel cranking process. Prevent this by checking which modules are already present in modules.ignore before appending them. NOTE: it would be better to generate modules.ignore using some information from the builder itself, rather than maintaining all the *.ignore files. But for now, as a first step, let's prevent the duplicate entries at least. Signed-off-by: Andrea Righi <andrea.righi@canonical.com> --- debian/rules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)