Hi Richard, New patch has been created on https://patchwork.yoctoproject.org/project/oe-core/patch/[email protected]/ This will update AUTOINC in the pkgdata instead of do_package_write_ipk. Please review and let me know your comments.
Cheers Sreejith On Thu, Oct 24, 2024 at 3:48 PM Sreejith Ravi via lists.openembedded.org <[email protected]> wrote: > Currently, RDEPENDS for -staticdev and -dev is set using EXTENDPKGV > in meta/conf/bitbake.conf: > ---------------------------------- > EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" > DEV_PKG_DEPENDENCY = "${PN} (= ${EXTENDPKGV})" > RDEPENDS:${PN}-staticdev = "${PN}-dev (= ${EXTENDPKGV})" > ---------------------------------- > > During the do_package task, AUTOINC is replaced in PKGV > (via package_setup_pkgv), which is used for creating the package name. > However, Yocto sets RDEPENDS with PKGV during the recipe parsing stage, > resulting in the RDEPENDS field in the IPK control data containing AUTOINC. > > As the IPK name is generated with the updated PKGV, but the version in > RDEPENDS still uses AUTOINC, this mismatch leads to installation failures. > > Example: libnsl > install libnsl-staticdev throws the error, nothing provides > libnsl-dev = 1.2.0+gitAUTOINC+4a062cf418-r0 > ---------------------------------- > IPKs available: > libnsl2_1.2.0+git0+4a062cf418-r0_armv7at2hf-neon.ipk > libnsl-src_1.2.0+git0+4a062cf418-r0_armv7at2hf-neon.ipk > libnsl-dbg_1.2.0+git0+4a062cf418-r0_armv7at2hf-neon.ipk > libnsl-staticdev_1.2.0+git0+4a062cf418-r0_armv7at2hf-neon.ipk > libnsl-dev_1.2.0+git0+4a062cf418-r0_armv7at2hf-neon.ipk > > control data: libnsl-staticdev > Package: libnsl-staticdev > Version: 1.2.0+git0+4a062cf418-r0 > ---- > ---- > Depends: libnsl-dev (= 1.2.0+gitAUTOINC+4a062cf418-r0) > Provides: libnsl2-staticdev > Source: libnsl2_git.bb > > control data: libnsl-dev > Package: libnsl-dev > Version: 1.2.0+git0+4a062cf418-r0 > ---- > ---- > Depends: libnsl2 (= 1.2.0+gitAUTOINC+4a062cf418-r0), libtirpc-dev > Recommends: gcc-runtime-dev, glibc-dev, libtirpc-dev > Provides: libnsl2-dev > Source: libnsl2_git.bb > ---------------------------------- > > This patch fixes the RDEPENDS versions set using EXTENDPKGV in the -dev and > -staticdev packages. It replaces AUTOINC before generating the package > control data. > > Updated control data: > ---------------------------------- > Package: libnsl-dev > Version: 1.2.0+git0+4a062cf418-r0 > ---- > ---- > Depends: libnsl2 (= 1.2.0+git0+4a062cf418-r0), libtirpc-dev > Recommends: gcc-runtime-dev, glibc-dev, libtirpc-dev > Provides: libnsl2-dev > Source: libnsl2_git.bb > > Package: libnsl-staticdev > Version: 1.2.0+git0+4a062cf418-r0 > ---- > ---- > Depends: libnsl-dev (= 1.2.0+git0+4a062cf418-r0) > Provides: libnsl2-staticdev > Source: libnsl2_git.bb > ---------------------------------- > > Signed-off-by: Sreejith Ravi <[email protected]> > --- > meta/classes-global/package.bbclass | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/meta/classes-global/package.bbclass > b/meta/classes-global/package.bbclass > index 6cd8c0140f..066a7ff835 100644 > --- a/meta/classes-global/package.bbclass > +++ b/meta/classes-global/package.bbclass > @@ -325,6 +325,15 @@ python package_setup_pkgv() { > # Adjust pkgv as necessary... > if 'AUTOINC' in pkgv: > d.setVar("PKGV", pkgv.replace("AUTOINC", "${PRSERV_PV_AUTOINC}")) > + > + # Adjust dependencies that are statically set with EXTENDPKGV > + vars = > ["RDEPENDS","RPROVIDES","RRECOMMENDS","RSUGGESTS","RREPLACES","RCONFLICTS"] > + packages = d.getVar('PACKAGES').split() > + for var in vars: > + for pkg in packages: > + val = d.getVar("%s_%s"%(var,pkg)) > + if val and 'AUTOINC' in val: > + d.setVar("%s_%s"%(var,pkg), val.replace("AUTOINC", > "${PRSERV_PV_AUTOINC}")) > } > > > -- > 2.43.0 > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#206438): https://lists.openembedded.org/g/openembedded-core/message/206438 Mute This Topic: https://lists.openembedded.org/mt/109187668/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
