Re: [OE-core] [PATCH] dnf: Enable nativesdk

2019-04-12 Thread Alexander Kanavin
On Fri, 12 Apr 2019 at 10:57, Zheng, Ruoqin  wrote:
> > > echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >>
> > > $script
> > > +   echo 'export MACHINE_ARCH=${MACHINE_ARCH}' >> $script
> > > Please explain why this change in the commit.
>
> Dnf is based on rpm and rpm need to read the arch info, but $script did not 
> provide it. So I added it.

Please make a separate commit for this then.

> > > Do not copy-paste large chunks like this please. Assign the
> > > dependencies to a variable, and use it where needed.
>
> If so, how about this way?
>
> BBCLASSEXTEND = "native nativesdk"
>
> RDEPENDS_${PN} += " \
>python3-core \
>..
>"
>
> RDEPENDS_${PN}_class-native = ""

Yes, this should work. There is an issue with class-native RDEPENDS,
where you can put recipe names in it, but not package names (because
there are no packages created for -native). I wrote about it here:
http://lists.openembedded.org/pipermail/openembedded-core/2019-March/280618.html

Alex
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] dnf: Enable nativesdk

2019-04-12 Thread Zheng, Ruoqin
Hi Alex:

> > echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> 
> > $script
> > +   echo 'export MACHINE_ARCH=${MACHINE_ARCH}' >> $script
> > Please explain why this change in the commit.

Dnf is based on rpm and rpm need to read the arch info, but $script did not 
provide it. So I added it.

> > Do not copy-paste large chunks like this please. Assign the 
> > dependencies to a variable, and use it where needed.

If so, how about this way?

BBCLASSEXTEND = "native nativesdk"

RDEPENDS_${PN} += " \
   python3-core \
   ..
   "

RDEPENDS_${PN}_class-native = ""

--
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
   Nanjing, 210012, China
MAIL : zhengrq.f...@cn.fujistu.com


> -Original Message-
> From: Alexander Kanavin [mailto:alex.kana...@gmail.com]
> Sent: Thursday, April 11, 2019 7:19 PM
> To: Zheng, Ruoqin/郑 若钦 
> Cc: OE-core 
> Subject: Re: [OE-core] [PATCH] dnf: Enable nativesdk
> 
> On Thu, 11 Apr 2019 at 08:13, Zheng Ruoqin 
> wrote:
> 
> > --- a/meta/classes/toolchain-scripts.bbclass
> > +++ b/meta/classes/toolchain-scripts.bbclass
> > @@ -101,6 +101,7 @@ toolchain_shared_env_script () {
> > echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
> > echo 'export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"' >> $script
> > echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >>
> > $script
> > +   echo 'export MACHINE_ARCH=${MACHINE_ARCH}' >> $script
> 
> Please explain why this change in the commit.
> 
> > +RDEPENDS_${PN}_class-nativesdk += " \
> > +  python3-core \
> > +  python3-codecs \
> > +  python3-netclient \
> > +  python3-email \
> > +  python3-threading \
> > +  python3-distutils \
> > +  python3-logging \
> > +  python3-fcntl \
> > +  librepo \
> > +  python3-shell \
> > +  libcomps \
> > +  libdnf \
> > +  python3-sqlite3 \
> > +  python3-compression \
> > +  python3-rpm \
> > +  python3-iniparse \
> > +  python3-json \
> > +  python3-curses \
> > +  python3-misc \
> > +  python3-gpg \
> > +  "
> > +
> >  RRECOMMENDS_${PN}_class-target += "gnupg"
> 
> Do not copy-paste large chunks like this please. Assign the dependencies to a
> variable, and use it where needed.
> 
> Alex
> 



-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] dnf: Enable nativesdk

2019-04-11 Thread richard . purdie
On Thu, 2019-04-11 at 14:16 +0200, Alexander Kanavin wrote:
> Presumably to be able to put dnf into SDKs?

nativesdk-dnf would depend on nativesdk-python3-core, not python3-core
though?

nativesdk-dnf doesn't run target packages?

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] dnf: Enable nativesdk

2019-04-11 Thread Alexander Kanavin
Presumably to be able to put dnf into SDKs?

Alex

On Thu, 11 Apr 2019 at 14:05, Richard Purdie
 wrote:
>
> On Thu, 2019-04-11 at 13:19 +0200, Alexander Kanavin wrote:
> > On Thu, 11 Apr 2019 at 08:13, Zheng Ruoqin <
> > zhengrq.f...@cn.fujitsu.com> wrote:
> >
> > > +RDEPENDS_${PN}_class-nativesdk += " \
> > > +  python3-core \
> > > +  python3-codecs \
> > > +  python3-netclient \
> > > +  python3-email \
> > > +  python3-threading \
> > > +  python3-distutils \
> > > +  python3-logging \
> > > +  python3-fcntl \
> > > +  librepo \
> > > +  python3-shell \
> > > +  libcomps \
> > > +  libdnf \
> > > +  python3-sqlite3 \
> > > +  python3-compression \
> > > +  python3-rpm \
> > > +  python3-iniparse \
> > > +  python3-json \
> > > +  python3-curses \
> > > +  python3-misc \
> > > +  python3-gpg \
> > > +  "
> > > +
> > >  RRECOMMENDS_${PN}_class-target += "gnupg"
> >
> > Do not copy-paste large chunks like this please. Assign the
> > dependencies to a variable, and use it where needed.
>
> Its worse than that, those are target dependencies, why would nativesdk
> need them?
>
> Cheers,
>
> Richard
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] dnf: Enable nativesdk

2019-04-11 Thread Richard Purdie
On Thu, 2019-04-11 at 13:19 +0200, Alexander Kanavin wrote:
> On Thu, 11 Apr 2019 at 08:13, Zheng Ruoqin <
> zhengrq.f...@cn.fujitsu.com> wrote:
> 
> > +RDEPENDS_${PN}_class-nativesdk += " \
> > +  python3-core \
> > +  python3-codecs \
> > +  python3-netclient \
> > +  python3-email \
> > +  python3-threading \
> > +  python3-distutils \
> > +  python3-logging \
> > +  python3-fcntl \
> > +  librepo \
> > +  python3-shell \
> > +  libcomps \
> > +  libdnf \
> > +  python3-sqlite3 \
> > +  python3-compression \
> > +  python3-rpm \
> > +  python3-iniparse \
> > +  python3-json \
> > +  python3-curses \
> > +  python3-misc \
> > +  python3-gpg \
> > +  "
> > +
> >  RRECOMMENDS_${PN}_class-target += "gnupg"
> 
> Do not copy-paste large chunks like this please. Assign the
> dependencies to a variable, and use it where needed.

Its worse than that, those are target dependencies, why would nativesdk
need them?

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] dnf: Enable nativesdk

2019-04-11 Thread Alexander Kanavin
On Thu, 11 Apr 2019 at 08:13, Zheng Ruoqin  wrote:

> --- a/meta/classes/toolchain-scripts.bbclass
> +++ b/meta/classes/toolchain-scripts.bbclass
> @@ -101,6 +101,7 @@ toolchain_shared_env_script () {
> echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
> echo 'export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"' >> $script
> echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
> +   echo 'export MACHINE_ARCH=${MACHINE_ARCH}' >> $script

Please explain why this change in the commit.

> +RDEPENDS_${PN}_class-nativesdk += " \
> +  python3-core \
> +  python3-codecs \
> +  python3-netclient \
> +  python3-email \
> +  python3-threading \
> +  python3-distutils \
> +  python3-logging \
> +  python3-fcntl \
> +  librepo \
> +  python3-shell \
> +  libcomps \
> +  libdnf \
> +  python3-sqlite3 \
> +  python3-compression \
> +  python3-rpm \
> +  python3-iniparse \
> +  python3-json \
> +  python3-curses \
> +  python3-misc \
> +  python3-gpg \
> +  "
> +
>  RRECOMMENDS_${PN}_class-target += "gnupg"

Do not copy-paste large chunks like this please. Assign the
dependencies to a variable, and use it where needed.

Alex
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] dnf: Enable nativesdk

2019-04-11 Thread Zheng Ruoqin
Make dnf work on nativesdk environment.

Signed-off-by: Zheng Ruoqin 
---
 meta/classes/toolchain-scripts.bbclass |  1 +
 meta/recipes-devtools/dnf/dnf_4.1.0.bb | 29 +
 2 files changed, 30 insertions(+)

diff --git a/meta/classes/toolchain-scripts.bbclass 
b/meta/classes/toolchain-scripts.bbclass
index 1a2ec4f..de50b7e 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -101,6 +101,7 @@ toolchain_shared_env_script () {
echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
echo 'export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"' >> $script
echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
+   echo 'export MACHINE_ARCH=${MACHINE_ARCH}' >> $script
echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
echo 'export ARCH=${ARCH}' >> $script
echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
diff --git a/meta/recipes-devtools/dnf/dnf_4.1.0.bb 
b/meta/recipes-devtools/dnf/dnf_4.1.0.bb
index d45023e..a5bded0 100644
--- a/meta/recipes-devtools/dnf/dnf_4.1.0.bb
+++ b/meta/recipes-devtools/dnf/dnf_4.1.0.bb
@@ -49,6 +49,29 @@ RDEPENDS_${PN}_class-target += " \
   python3-gpg \
   "
 
+RDEPENDS_${PN}_class-nativesdk += " \
+  python3-core \
+  python3-codecs \
+  python3-netclient \
+  python3-email \
+  python3-threading \
+  python3-distutils \
+  python3-logging \
+  python3-fcntl \
+  librepo \
+  python3-shell \
+  libcomps \
+  libdnf \
+  python3-sqlite3 \
+  python3-compression \
+  python3-rpm \
+  python3-iniparse \
+  python3-json \
+  python3-curses \
+  python3-misc \
+  python3-gpg \
+  "
+
 RRECOMMENDS_${PN}_class-target += "gnupg"
 
 # Create a symlink called 'dnf' as 'make install' does not do it, but
@@ -66,6 +89,12 @@ 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 \
-- 
1.8.3.1



-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core