[From nobody Thu Jun 25 05:55:53 2020
Received: from mail.toke.dk ([45.145.95.4])
 by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
 id 1jWQMz-0000tS-FD
 for openwrt-devel@lists.openwrt.org; Wed, 06 May 2020 20:10:19 +0000
From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= &lt;toke@toke.dk&gt;
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023;
 t=1588795450; bh=Zl8pUoO+4nJDmhRJzHxfCZEVGldQQwJT6zEtKQfFf4c=;
 h=From:To:Cc:Subject:Date:From;
 b=QpzNGHVYtw/QjsCs6RSRMcTYw7wSWmEMes0CNjsWUDk20Eo3T9dMC/uQKMJqINYjQ
 ic0TTx4a8x/NX/6CGmcx8Kt6jMPijv6gEVTCskAvIWdcD0o/ZwiiEItvVBd/C48Ut0
 F7pxsv2qacOtkKLQQQhOwCp8t25CFcx5FV4Zn3/cPB5SVqbJHl+jEDDlDmbVKtMr3n
 9FfwRKT7xPdt9+iIeXDRTI0AdikQptoD0l5mowH6jHybUYxoSRTf4PcGtICuF6icsM
 0K9GF5V7ybAa6UPiHuYPADodZRlRe3VnYNdA3jLCGJ/EpfNgsODufAcz8boVL5D4/V
 PKsTEEd3A4WKg==
To: openwrt-devel@lists.openwrt.org
Cc: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= &lt;toke@toke.dk&gt;,
 Kevin Darbyshire-Bryant &lt;ldir@darbyshire-bryant.me.uk&gt;
Subject: [PATCH] kernel: Add kmod-sch-cake-virtual package to resolve
 dependency errors
Date: Wed,  6 May 2020 22:03:55 +0200
Message-Id: &lt;20200506200355.926305-1-toke@toke.dk&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20200506_131017_820624_A6AB0F3A 
X-CRM114-Status: UNSURE (   7.00  )
X-CRM114-Notice: Please train this message.
X-Spam-Score: -0.2 (/)
X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary:
 Content analysis details:   (-0.2 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
 author's domain
 -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from
 envelope-from domain
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
 valid

As reported in https://github.com/openwrt/packages/issues/12072, the
imagebuilder fails due to a dependency resolution error when the userspace
packages are built using a target that has a different kernel version than
that which is being run. To resolve this, add a virtual kernel package with
the conditional dependency currently used in sqm-scripts. The idea is to
move the sqm-scripts dependency to this virtual package, which hopefully
should be consistent with the actual kernel module being built.

Signed-off-by: Toke Høiland-Jørgensen &lt;toke@toke.dk&gt;
---
 package/kernel/kmod-sched-cake-oot/Makefile | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/package/kernel/kmod-sched-cake-oot/Makefile b/package/kernel/kmod-sched-cake-oot/Makefile
index 963681c1fb..5a9e1099a4 100644
--- a/package/kernel/kmod-sched-cake-oot/Makefile
+++ b/package/kernel/kmod-sched-cake-oot/Makefile
@@ -29,14 +29,26 @@ define KernelPackage/sched-cake-oot
   DEPENDS:=@LINUX_4_14 +kmod-sched-core +kmod-ipt-conntrack
 endef
 
+define KernelPackage/sched-cake-virtual
+  SUBMENU:=Network Support
+  TITLE:=Virtual package for sched-cake
+  URL:=https://github.com/dtaht/sch_cake
+  DEPENDS:=+!LINUX_4_14:kmod-sched-cake +LINUX_4_14:kmod-sched-cake-oot
+endef
+
 include $(INCLUDE_DIR)/kernel-defaults.mk
 
-define KernelPackage/sched-cake/description
+define KernelPackage/sched-cake-oot/description
   O(ut) O(f) T(ree) Common Applications Kept Enhanced fq_codel/blue derived shaper
 endef
 
+define KernelPackage/sched-cake-virtual/description
+  Virtual package for resolving sch_cake dependencies
+endef
+
 define Build/Compile
 	$(KERNEL_MAKE) M=&quot;$(PKG_BUILD_DIR)&quot; modules
 endef
 
 $(eval $(call KernelPackage,sched-cake-oot))
+$(eval $(call KernelPackage,sched-cake-virtual))
-- 
2.26.2


]