Re: [yocto] Task chain for population to sysroot-native?

Paul Barker <[email protected]> Wed, 03 Jun 2026 19:10:20 +0100
Newsgroups org.yoctoproject.lists.yocto
Message-ID <[email protected]>
--=-dyyxDuXT5GBAhnvTFNcu
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Wed, 2026-06-03 at 10:30 -0700, H. Wulff via lists.yoctoproject.org
wrote:
> Hi!
>=20
> We have the need to modify some fonts at Yocto build time. So, I created =
a recipe for [fonttools python module](https://github.com/fonttools/fonttoo=
ls) on which our recipe `DEPENDS`. The goal is to have the font tools avail=
able at build time of our recipe by populating to `recipe-sysroot-native`. =
Our recipe depends on fonttools like this:
>=20
> ```
> DEPENDS =3D+ "fonttools-native"
> ```
>=20
> And the fonttools recipe looks like this:
>=20
> ```
> LICENSE =3D "MIT"
> LIC_FILES_CHKSUM =3D "file://LICENSE;md5=3D211c9e4671bde3881351f22a2901f6=
92"
>=20
> PV =3D "4.63.0"
>=20
> SRC_URI =3D "git://github.com/fonttools/fonttools.git;protocol=3Dhttps;br=
anch=3Dmain"
> SRCREV =3D "7fc2aa089b1bdc0d03157de2423e9b6681d22c20"
>=20
> S =3D "${WORKDIR}/git"
>=20
> inherit setuptools3
>=20
> BBCLASSEXTEND =3D "native"
>=20
> do_install:append() {
>     install -d ${D}${bindir}
>     for PYFILE in ${S}/Snippets/*.py
>     do
>         install -m 0755 ${PYFILE} ${D}${bindir}
>     done
> }
> ```
> The problem is that nothing gets populated to `recipe-sysroot-native` whe=
n our receipe gets build. But the font tools package gets perfectly build s=
tand alone.
>=20
> So the question is what tasks are called when doing populate sysroot nati=
ve. Where does the populate-sysroot-native task gets the files from? I had =
a look at `${SYSROOT_DIRS_NATIVE}` and `${D}${bindir}` is one of the folder=
s. So, at least the files I added via `do_install:append()` should be avail=
able in `recipe-sysroot-native`.
>=20
> Can please someone shine some light on this?

Adding native to BBCLASSEXTEND allows you to build a -native variant of
your recipe, in this case it would be named 'fonttools-native-native'.

What you want instead is 'inherit native', as this is a native-only
recipe and already has -native in the name it should use the native
bbclass directly.

See for example meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
in openembedded-core.

Best regards,

--=20
Paul Barker


--=-dyyxDuXT5GBAhnvTFNcu
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----

iIcEABYKAC8WIQSzjPXf5Y1BDWhU2iCrY1Tsnbr0bgUCaiBuDBEccGF1bEBwYmFy
a2VyLmRldgAKCRCrY1Tsnbr0bpTkAQD4XqwTRn/D6UeKiLm6+9W10NiTiPjypmul
WiBBxTu4pgEA3DDqsNV+BEdZQk6sEKYTh2l+EbieW+jBOM3WI8d1xg8=
=s7/z
-----END PGP SIGNATURE-----

--=-dyyxDuXT5GBAhnvTFNcu--