Skip to contentSkip to conversation

Variable fixes for multilib

PATCH Applied Lianhao Lu 3 participants 10 messages Aug 5, 2011 – Aug 8, 2011

lore
Share & tools
lore

Lianhao Lu

author
#0 lore raw

cover Variable fixes for multilib

This series of patch fixed variable multilib issues, from bug #1333 to #1338.

The following changes since commit 8a731122e7811275f20065ba27645b97fadf362d:
Richard Purdie (1):
eglibc: Fix patch merge breakage

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib llu/ml2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=llu/ml2

Lianhao Lu (6):
SRC_URI: Using BPN instaed of PN.
tcp-wrappers: Using ${PN} in PACKAGES.
qt4x11.bbclass: Using BPN instead of PN.
Misc: Corrected the dependency on non-native for -native package.
ghostscript: Fixed the incorrect DEPENDS.
eglibc-locale: Added ${MLPREFIX} for task dependency.

 meta/classes/qt4x11.bbclass                        |    2 +-
 .../recipes-connectivity/galago/libgalago_0.5.2.bb |    2 +-
 meta/recipes-core/eglibc/eglibc-locale.inc         |    2 +-
 meta/recipes-core/gettext/gettext_0.18.1.1.bb      |    2 +-
 meta/recipes-devtools/intltool/intltool.inc        |    1 +
 .../ghostscript/ghostscript_9.02.bb                |    2 +-
 .../net-tools/net-tools_1.60-23.bb                 |    4 ++--
 .../tcp-wrappers/tcp-wrappers_7.6.bb               |    6 +++---
 .../xorg-util/util-macros_1.14.0.bb                |    4 ++--
 9 files changed, 13 insertions(+), 12 deletions(-)
author
#1 lore raw

PATCH 1/6 SRC_URI: Using BPN instaed of PN.

[YOCTO #1333]
In multilib cases, PN has the prefix of MLPREFIX. It is not correct to use PN in SRC_URI. We should use the pruned BPN instead.

---
 .../recipes-connectivity/galago/libgalago_0.5.2.bb |    2 +-
 .../net-tools/net-tools_1.60-23.bb                 |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-connectivity/galago/libgalago_0.5.2.bb +1 -1
index 3a47620..a4203ec 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
 
 DEPENDS = 	"dbus glib-2.0 dbus-glib"
 
-SRC_URI =	"http://www.galago-project.org/files/releases/source/${BPN}/${P}.tar.gz \
+SRC_URI =	"http://www.galago-project.org/files/releases/source/${BPN}/${BPN}-${PV}.tar.gz \
                  file://mkdir.patch;patch=1 \
                  file://pkgconfig.patch;patch=1 "
 
meta/recipes-extended/net-tools/net-tools_1.60-23.bb +2 -2
index 41041aa..213fb60 100644
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
 PR = "r0"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \
-           ${DEBIAN_MIRROR}/main/n/net-tools/${PN}_${PV}.diff.gz;apply=no;name=patch \
+           ${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \
            file://net-tools-config.h \
            file://net-tools-config.make" 
 
@@ -31,7 +31,7 @@ PARALLEL_MAKE = ""
 # up all previously applied patches in the start
 nettools_do_patch() {
 	cd ${S}
-	patch -p1 < ${WORKDIR}/${PN}_${PV}.diff
+	patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff
 	QUILT_PATCHES=${S}/debian/patches quilt push -a
 	rm -rf ${S}/patches ${S}/.pc
 }
Signature · 1 line
1.7.0.4
author
#2 lore raw

PATCH 2/6 tcp-wrappers: Using ${PN} in PACKAGES.

[YOCTO #1334]
Using ${PN} instead of tcp-wrappers in PACKAGES and FILES_*, since the FILES_tcp-wrappers would be overwritten by FILES_${PN} when the variable name gets expansioned.

---
 .../tcp-wrappers/tcp-wrappers_7.6.bb               |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +3 -3
index 1aeb9ff..3eecd4d 100644
@@ -8,12 +8,12 @@ LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
 PR ="r0"
 
 
-PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev tcp-wrappers tcp-wrappers-doc"
+PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev ${PN} ${PN}-doc"
 FILES_libwrap = "${base_libdir}/lib*.so.*"
 FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5"
 FILES_libwrap-dev = "${libdir}/lib*.so ${libdir}/lib*.a ${includedir}"
-FILES_tcp-wrappers = "${bindir}"
-FILES_tcp-wrappers-doc = "${mandir}/man8"
+FILES_${PN} = "${sbindir}"
+FILES_${PN}-doc = "${mandir}/man8"
 
 SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
            file://00_man_quoting.diff \
Signature · 1 line
1.7.0.4
author
#3 lore raw

PATCH 3/6 qt4x11.bbclass: Using BPN instead of PN.

In reply to Lianhao Lu

[YOCTO #1335] Using BPN instead of BP to decide the DEPENDS content for multilib cases.

---
 meta/classes/qt4x11.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/qt4x11.bbclass +1 -1
index abb1d9d..ee2cdca 100644
@@ -1,4 +1,4 @@
-DEPENDS_prepend = "${@["qt4-x11-free ", ""][(bb.data.getVar('PN', d, 1)[:12] == 'qt4-x11-free')]}"
+DEPENDS_prepend = "${@["qt4-x11-free ", ""][(bb.data.getVar('BPN', d, True)[:12] == 'qt4-x11-free')]}"
 
 inherit qmake2
 
Signature · 1 line
1.7.0.4
author
#4 lore raw

PATCH 4/6 Misc: Corrected the dependency on non-native for -native package.

In reply to Lianhao Lu

[YOCTO #1336] Corrected the wrong dependency on non-native for -native packages for the following recipes:

- util-macros
- intltool

---
 meta/recipes-core/gettext/gettext_0.18.1.1.bb      |    2 +-
 meta/recipes-devtools/intltool/intltool.inc        |    1 +
 .../xorg-util/util-macros_1.14.0.bb                |    4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)
meta/recipes-core/gettext/gettext_0.18.1.1.bb +1 -1
index cc0129f..9ec851e 100644
@@ -9,7 +9,7 @@ PR = "r2"
 DEPENDS = "libxml2-native gettext-native virtual/libiconv ncurses expat"
 DEPENDS_virtclass-native = "libxml2-native"
 PROVIDES = "virtual/libintl virtual/gettext"
-PROVIDES_virtclass-native = ""
+PROVIDES_virtclass-native = "virtual/gettext-native"
 CONFLICTS_${PN} = "proxy-libintl"
 SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
           "
meta/recipes-devtools/intltool/intltool.inc +1 -0
index c934654..1e778b6 100644
@@ -9,6 +9,7 @@ S = "${WORKDIR}/intltool-${PV}"
 DEPENDS = "libxml-parser-perl-native"
 #RDEPENDS_${PN} = "libxml-parser-perl"
 RRECOMMENDS_${PN} = "perl-modules"
+RRECOMMENDS_${PN}_virtclass-native = ""
 
 inherit autotools pkgconfig perlnative
 
meta/recipes-graphics/xorg-util/util-macros_1.14.0.bb +2 -2
index 88ee4f6..4fa235b 100644
@@ -12,8 +12,8 @@ PR = "r0"
 
 # ${PN} is empty so we need to tweak -dev and -dbg package dependencies
 DEPENDS = "libgpg-error"
-DEPENDS_virtclass-native = "virtual/gettext"
-DEPENDS_virtclass-nativesdk = "virtual/gettext"
+DEPENDS_virtclass-native = "virtual/gettext-native"
+DEPENDS_virtclass-nativesdk = "virtual/gettext-nativesdk"
 
 RDEPENDS_${PN}-dev = ""
 RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
Signature · 1 line
1.7.0.4
author
#5 lore raw

PATCH 5/6 ghostscript: Fixed the incorrect DEPENDS.

In reply to Lianhao Lu

[YOCTO #1337]
Using ghostscript-native instead of ${PN}-native in DEPENDS to correct the invalid DEPENDS in multilib cases.

---
 .../ghostscript/ghostscript_9.02.bb                |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-extended/ghostscript/ghostscript_9.02.bb +1 -1
index 28c6c9e..2e46734 100644
@@ -17,7 +17,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d151214b3131251dfc9d858593acbd24"
 
 PR = "r4"
 
-DEPENDS = "${PN}-native tiff jpeg fontconfig cups"
+DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
 DEPENDS_virtclass-native = ""
 
 SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.bz2"
Signature · 1 line
1.7.0.4
#6 lore raw

Re: [PATCH 5/6] ghostscript: Fixed the incorrect DEPENDS.

Quoted 14 lines · Lianhao Lu

[YOCTO #1337]
Using ghostscript-native instead of ${PN}-native in DEPENDS to correct the invalid DEPENDS in multilib cases.

---
  .../ghostscript/ghostscript_9.02.bb                |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-extended/ghostscript/ghostscript_9.02.bb +0 -0
index 28c6c9e..2e46734 100644

meta/recipes-extended/ghostscript/ghostscript_9.02.bb LIC_FILES_CHKSUM = "file://LICENSE;md5=d151214b3131251dfc9d858593acbd24" · line 23

Quoted 8 lines
meta/recipes-extended/ghostscript/ghostscript_9.02.bb +1 -1
@@ -17,7 +17,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d151214b3131251dfc9d858593acbd24"
 
  PR = "r4"
 
-DEPENDS = "${PN}-native tiff jpeg fontconfig cups"
+DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
  DEPENDS_virtclass-native = ""
 
  SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.bz2"

This looks a generic issue to me. i.e. when the dependency ends with "-native", we should make sure it won't has multilib prefix. so the following patch will be more generic. or at least, we should document somewhere that "${PN}-native" dependency is not right.

meta/classes/multilib.bbclass +5 -1
index 6e1669f..c73e5f9 100644
@@ -43,7 +43,11 @@ python __anonymous () {
         newdeps = []
         for dep in deps:
             if dep.endswith(("-native", "-native-runtime")):
-                newdeps.append(dep)
+                if dep.startswith(variant):
+                    # remove the leading MLPREFIX
+                    newdeps.append(dep[len(variant)+1:])
+                else:
+                    newdeps.append(dep)
             else:
                 newdeps.append(extend_name(dep))
         d.setVar(varname, " ".join(newdeps))

comment? if it is Ok, I will submit a patch.

Regards
Ke

#7 lore raw

Re: [PATCH 5/6] ghostscript: Fixed the incorrect DEPENDS.

Quoted 47 lines · Yu Ke
Quoted 14 lines · Lianhao Lu

[YOCTO #1337]
Using ghostscript-native instead of ${PN}-native in DEPENDS to correct the invalid DEPENDS in multilib cases.

---
  .../ghostscript/ghostscript_9.02.bb                |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-extended/ghostscript/ghostscript_9.02.bb +0 -0
index 28c6c9e..2e46734 100644

meta/recipes-extended/ghostscript/ghostscript_9.02.bb LIC_FILES_CHKSUM = "file://LICENSE;md5=d151214b3131251dfc9d858593acbd24" · line 23

Quoted 8 lines
meta/recipes-extended/ghostscript/ghostscript_9.02.bb +1 -1
@@ -17,7 +17,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d151214b3131251dfc9d858593acbd24"
 
  PR = "r4"
 
-DEPENDS = "${PN}-native tiff jpeg fontconfig cups"
+DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
  DEPENDS_virtclass-native = ""
 
  SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.bz2"

This looks a generic issue to me. i.e. when the dependency ends with "-native", we should make sure it won't has multilib prefix. so the following patch will be more generic. or at least, we should document somewhere that "${PN}-native" dependency is not right.

meta/classes/multilib.bbclass +5 -1
index 6e1669f..c73e5f9 100644
@@ -43,7 +43,11 @@ python __anonymous () {
          newdeps = []
          for dep in deps:
              if dep.endswith(("-native", "-native-runtime")):
-                newdeps.append(dep)
+                if dep.startswith(variant):
+                    # remove the leading MLPREFIX
+                    newdeps.append(dep[len(variant)+1:])
+                else:
+                    newdeps.append(dep)
              else:
                  newdeps.append(extend_name(dep))
          d.setVar(varname, " ".join(newdeps))
Quoted 1 line

comment? if it is Ok, I will submit a patch.

I'm not sure I like this. I think fixing the individual recipes to use BPN instead of PN might be a better way to handle this.

We could also error upon detecting this situation instead of magically fixing it up as above...

Cheers,

Richard

author
#8 lore raw

PATCH 6/6 eglibc-locale: Added ${MLPREFIX} for task dependency.

In reply to Lianhao Lu

[YOCTO #1338] Added ${MLPREFIX} to the task dependency between eglibc-locale:do_install and the corresponding virtual/libc's do_populate_sysroot.

---
 meta/recipes-core/eglibc/eglibc-locale.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-core/eglibc/eglibc-locale.inc +1 -1
index ca3940d..b8107ee 100644
@@ -62,6 +62,6 @@ do_install () {
 
 inherit libc-package
 
-do_install[depends] += "virtual/libc${PKGSUFFIX}:do_populate_sysroot"
+do_install[depends] += "virtual/${MLPREFIX}libc${PKGSUFFIX}:do_populate_sysroot"
 
 BBCLASSEXTEND = "nativesdk"
Signature · 1 line
1.7.0.4
#9 lore raw
In reply to Lianhao Lu
Quoted 11 lines · Lianhao Lu

This series of patch fixed variable multilib issues, from bug #1333 to #1338.

The following changes since commit 8a731122e7811275f20065ba27645b97fadf362d:
Richard Purdie (1):
eglibc: Fix patch merge breakage

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib llu/ml2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=llu/ml2

Quoted 7 lines

Lianhao Lu (6):
SRC_URI: Using BPN instaed of PN.
tcp-wrappers: Using ${PN} in PACKAGES.
qt4x11.bbclass: Using BPN instead of PN.
Misc: Corrected the dependency on non-native for -native package.
ghostscript: Fixed the incorrect DEPENDS.
eglibc-locale: Added ${MLPREFIX} for task dependency.

Merged to master, there are some good fixes in there, thanks.

Richard