Skip to contentSkip to conversation

dnf: Enable nativesdk

PATCH Superseded Lei Maohui 2 participants 2 messages Apr 24, 2019

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Lei Maohui

author
#0 lore raw

PATCH v3 1/1 dnf: Enable nativesdk

Make dnf work on nativesdk environment.

---
 meta/recipes-devtools/dnf/dnf_4.2.2.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/dnf/dnf_4.2.2.bb +8 -1
index 3970b41..159d7e9 100644
@@ -26,7 +26,7 @@ EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -
 
 BBCLASSEXTEND = "native nativesdk"
 
-RDEPENDS_${PN}_class-target += " \
+RDEPENDS_${PN} += " \
   python3-core \
   python3-codecs \
   python3-netclient \
@@ -49,6 +49,8 @@ RDEPENDS_${PN}_class-target += " \
   python3-gpg \
   "
 
+RDEPENDS_${PN}_class-native = ""
+
 RRECOMMENDS_${PN}_class-target += "gnupg"
 
 # Create a symlink called 'dnf' as 'make install' does not do it, but
@@ -66,6 +68,11 @@ do_install_append_class-native() {
                 RPM_NO_CHROOT_FOR_SCRIPTS=1
 }
 
+do_install_append_class-nativesdk() {
+        create_wrapper ${D}/${bindir}/dnf \
+                RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm \
+                RPM_NO_CHROOT_FOR_SCRIPTS=1 }
+
 SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
                          dnf-automatic.service dnf-automatic.timer \
                          dnf-automatic-download.service dnf-automatic-download.timer \
Signature · 1 line
2.7.4
#1 lore raw
Quoted 40 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Lei Maohui
Sent: den 24 april 2019 05:38
To: [email protected]
Subject: [OE-core] [PATCH v3] dnf: Enable nativesdk

Make dnf work on nativesdk environment.

---
 meta/recipes-devtools/dnf/dnf_4.2.2.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes- renamed from meta/recipes-devtools/dnf/dnf_4.2.2.bb +0 -0

devtools/dnf/dnf_4.2.2.bb
index 3970b41..159d7e9 100644

meta/recipes-devtools/dnf/dnf_4.2.2.bb +0 -0
@@ -26,7 +26,7 @@ EXTRA_OECMAKE = " -DWITH_MAN=0 -

DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -

BBCLASSEXTEND = "native nativesdk"

meta/recipes-devtools/dnf/dnf_4.2.2.bb +3 -1
-RDEPENDS_${PN}_class-target += " \
+RDEPENDS_${PN} += " \
   python3-core \
   python3-codecs \
   python3-netclient \
@@ -49,6 +49,8 @@ RDEPENDS_${PN}_class-target += " \
   python3-gpg \
   "
 
+RDEPENDS_${PN}_class-native = ""
+
 RRECOMMENDS_${PN}_class-target += "gnupg"
 
 # Create a symlink called 'dnf' as 'make install' does not do it, but

meta/recipes-devtools/dnf/dnf_4.2.2.bb do_install_append_class-native() { · line 74

Quoted 7 lines
meta/recipes-devtools/dnf/dnf_4.2.2.bb +4 -0
@@ -66,6 +68,11 @@ do_install_append_class-native() {
                 RPM_NO_CHROOT_FOR_SCRIPTS=1
 }
 
+do_install_append_class-nativesdk() {
+        create_wrapper ${D}/${bindir}/dnf \
+                RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm \
+                RPM_NO_CHROOT_FOR_SCRIPTS=1 }

Move the "}" above to a line of its own.

Quoted 7 lines
meta/recipes-devtools/dnf/dnf_4.2.2.bb +1 -0
+
 SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
                          dnf-automatic.service dnf-automatic.timer \
                          dnf-automatic-download.service dnf-automatic-

download.timer \
--
2.7.4

//Peter