Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] dnf, libdnf: Ignore if PACKAGE_CLASSES does not have rpm
@ 2020-02-12  5:19 Khem Raj
  2020-02-12  7:11 ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2020-02-12  5:19 UTC (permalink / raw)
  To: openembedded-core

dnf does not work with opkg or dpkg/apt anyway

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/dnf/dnf_4.2.2.bb        | 8 ++++++++
 meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 7 +++++++
 2 files changed, 15 insertions(+)

diff --git a/meta/recipes-devtools/dnf/dnf_4.2.2.bb b/meta/recipes-devtools/dnf/dnf_4.2.2.bb
index f38167f1ad..9e6d5741af 100644
--- a/meta/recipes-devtools/dnf/dnf_4.2.2.bb
+++ b/meta/recipes-devtools/dnf/dnf_4.2.2.bb
@@ -84,3 +84,11 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
                          dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
 "
 SYSTEMD_AUTO_ENABLE ?= "disable"
+
+python () {
+    pkgb = d.getVar("PACKAGE_CLASSES")
+    pkgn = d.getVar("PN")
+    pkgv = d.getVar("PV")
+    if "package_rpm" not in pkgb:
+        raise bb.parse.SkipPackage("%s-%s Needs rpmdb support in libsolv" % (pkgn, pkgv))
+}
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
index 882c435b32..5c9326ca64 100644
--- a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
@@ -27,3 +27,10 @@ EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
 
+python () {
+    pkgb = d.getVar("PACKAGE_CLASSES")
+    pkgn = d.getVar("PN")
+    pkgv = d.getVar("PV")
+    if "package_rpm" not in pkgb:
+        raise bb.parse.SkipPackage("%s-%s Needs rpmdb support in libsolv" % (pkgn, pkgv))
+}
-- 
2.25.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-12 17:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-12  5:19 [PATCH] dnf, libdnf: Ignore if PACKAGE_CLASSES does not have rpm Khem Raj
2020-02-12  7:11 ` Alexander Kanavin
2020-02-12 15:11   ` Khem Raj
2020-02-12 15:30     ` Alexander Kanavin
2020-02-12 16:32     ` Martin Jansa
2020-02-12 17:18       ` Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox