Patchwork [05/10] eglibc: fix packaging of some of nativesdk packages, V2

login
register
mail settings
Submitter lumag
Date Sept. 23, 2011, 7:46 p.m.
Message ID <1316807201-22623-5-git-send-email-dbaryshkov@gmail.com>
Download mbox | patch
Permalink /patch/12045/
State New, archived
Headers show

Comments

lumag - Sept. 23, 2011, 7:46 p.m.
eglibc.inc contains packaging rules that depend on PKGSUFFIX expansion.
However that variable wasn't expanded properly in some case. E.g.

PACKAGES = " ... nscd${PKGSUFFIX} ..."
FILES_nscd${PKGSUFFIX} = "${sbindir}/nscd*"

would be expanded to

PACKAGES = " ... nscd-nativesdk ..."
FILES_nscd = "${sbindir}/nscd*"

Thus leading to empty -nativesdk packages and missing files. To overcome
that use python code blob to properly define PKGSUFFIX variable.

As a change from V1, fix the glibc-thread-db related problem by using
${PN} instead of eglibc-XXX-nativesdk for extra-nss and thread-db
packages.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 meta/recipes-core/eglibc/eglibc-locale.inc  |   13 +++++++++----
 meta/recipes-core/eglibc/eglibc-package.inc |   13 +++++++++----
 meta/recipes-core/eglibc/eglibc_2.12.bb     |    2 +-
 meta/recipes-core/eglibc/eglibc_2.13.bb     |    2 +-
 4 files changed, 20 insertions(+), 10 deletions(-)
Richard Purdie - Sept. 25, 2011, 5:22 p.m.
On Fri, 2011-09-23 at 23:46 +0400, Dmitry Eremin-Solenikov wrote:
> eglibc.inc contains packaging rules that depend on PKGSUFFIX expansion.
> However that variable wasn't expanded properly in some case. E.g.
> 
> PACKAGES = " ... nscd${PKGSUFFIX} ..."
> FILES_nscd${PKGSUFFIX} = "${sbindir}/nscd*"
> 
> would be expanded to
> 
> PACKAGES = " ... nscd-nativesdk ..."
> FILES_nscd = "${sbindir}/nscd*"
> 
> Thus leading to empty -nativesdk packages and missing files. To overcome
> that use python code blob to properly define PKGSUFFIX variable.
> 
> As a change from V1, fix the glibc-thread-db related problem by using
> ${PN} instead of eglibc-XXX-nativesdk for extra-nss and thread-db
> packages.
> 
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>

I've merged the pieces of this patch series that didn't get feedback.
I'm still not 100% convinced this patch is right. I'd like to understand
more about the errors you're seeing that area leading you to submit
it...

Cheers,

Richard

Patch

diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/eglibc/eglibc-locale.inc
index d9720e4..ef3699c 100644
--- a/meta/recipes-core/eglibc/eglibc-locale.inc
+++ b/meta/recipes-core/eglibc/eglibc-locale.inc
@@ -26,10 +26,15 @@  BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips"
 # set "0" for qemu emulation of native localedef for locale generation
 LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1"
 
-PR = "r18"
-
-PKGSUFFIX = ""
-PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
+PR = "r19"
+
+python __anonymous () {
+    import bb
+    if bb.data.inherits_class("nativesdk", d):
+        bb.data.setVar("PKGSUFFIX", "-nativesdk", d)
+    else:
+        bb.data.setVar("PKGSUFFIX", "", d)
+}
 
 PROVIDES = "virtual/libc-locale${PKGSUFFIX}"
 
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index 519a49c..8e9582c 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -17,8 +17,13 @@  python __anonymous () {
 # Set this to zero if you don't want ldconfig in the output package
 USE_LDCONFIG ?= "1"
 
-PKGSUFFIX = ""
-PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
+python __anonymous () {
+    import bb
+    if bb.data.inherits_class("nativesdk", d):
+        bb.data.setVar("PKGSUFFIX", "-nativesdk", d)
+    else:
+        bb.data.setVar("PKGSUFFIX", "", d)
+}
 
 PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} ldd${PKGSUFFIX} ${PN}-utils eglibc-extra-nss${PKGSUFFIX} eglibc-thread-db${PKGSUFFIX} ${PN}-pic ${PN}-dev ${PN}-doc libcidn${PKGSUFFIX} libmemusage${PKGSUFFIX} libsegfault${PKGSUFFIX} ${PN}-pcprofile libsotruss${PKGSUFFIX}"
 
@@ -28,8 +33,8 @@  RPROVIDES_${PN}-utils = "glibc${PKGSUFFIX}-utils"
 RPROVIDES_${PN}-pic = "glibc${PKGSUFFIX}-pic"
 RPROVIDES_${PN}-dev = "glibc${PKGSUFFIX}-dev"
 RPROVIDES_${PN}-doc = "glibc${PKGSUFFIX}-doc"
-RPROVIDES_eglibc-extra-nss${PKGSUFFIX} = "glibc-extra-nss${PKGSUFFIX}"
-RPROVIDES_eglibc-thread-db${PKGSUFFIX} = "glibc-thread-db${PKGSUFFIX}"
+RPROVIDES_${PN}-extra-nss = "glibc${PKGSUFFIX}-extra-nss"
+RPROVIDES_${PN}-thread-db = "glibc${PKGSUFFIX}-thread-db"
 RPROVIDES_${PN}-pcprofile = "glibc${PKGSUFFIX}-pcprofile"
 RPROVIDES_${PN}-dbg = "glibc-dbg${PKGSUFFIX}"
 libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
diff --git a/meta/recipes-core/eglibc/eglibc_2.12.bb b/meta/recipes-core/eglibc/eglibc_2.12.bb
index 4220219..e4305a8 100644
--- a/meta/recipes-core/eglibc/eglibc_2.12.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.12.bb
@@ -1,7 +1,7 @@ 
 require eglibc.inc
 
 DEPENDS += "gperf-native"
-PR = "r27"
+PR = "r28"
 
 SRCREV = "14158"
 
diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
index fc8ac64..c549d9d 100644
--- a/meta/recipes-core/eglibc/eglibc_2.13.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.13.bb
@@ -3,7 +3,7 @@  require eglibc.inc
 SRCREV = "14157"
 
 DEPENDS += "gperf-native"
-PR = "r17"
+PR = "r18"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_13"