Skip to contentSkip to conversation

wr-misc patches

PATCH In review Hongxu Jia 4 participants 13 messages Mar 28, 2014 – Mar 31, 2014

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover wr-misc patches

WindRiver patches was sent for YP compliance.

There are total 22 patches, and separate them into 4 parts, each part is individual which means there is no dependence between them.

//Hongxu

The following changes since commit 8c3eb5ee4582b6f6d489549290937657f37fc19e:

packagegroup-toolset-native: Update after ocf-linux -> cryptodev-linux change (2014-03-27 19:53:30 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/wr-misc-patches-4
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/wr-misc-patches-4

Konrad Scherer (1):
syslinux.bbclass: Enable additional kernel parameters for syslinux

Mark Hatle (2):
packagegroups: Remove toolchain *-symlinks packages
packagegroup-self-hosted: Use packagegroup-core-buildessential

Ming Liu (1):
kernel.bbclass: handles symbolic KERNEL_OUTPUT in bundle_initramfs
task

Peter Seebach (1):
libc-common.bbclass: rename ALL the packages

 meta/classes/kernel.bbclass                         | 21 ++++++++++++++++++---
 meta/classes/libc-common.bbclass                    | 19 +++++++++++++------
 meta/classes/syslinux.bbclass                       |  5 +++++
 .../packagegroup-core-buildessential.bb             |  4 ----
 .../packagegroups/packagegroup-self-hosted.bb       | 16 +---------------
 5 files changed, 37 insertions(+), 28 deletions(-)
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH 1/5 kernel.bbclass: handles symbolic KERNEL_OUTPUT in bundle_initramfs task

From: Ming Liu <[email protected]>

In many cases, KERNEL_OUTPUT is a symbolic link to the real bootable image, but in bundle_initramfs task, it's not considered so that the KERNEL_OUTPUT is being renamed/restored as a regular file, this leads it finally point to a incorrect target, or even worse, break the bundle_initramfs task for KERNEL_OUTPUT is not going to be regenerated in case it is a symbolic link to vmlinux.

---
 meta/classes/kernel.bbclass | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
meta/classes/kernel.bbclass +18 -3
index 19b159b..b5e5a85 100644
@@ -128,13 +128,28 @@ do_bundle_initramfs () {
 	if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
 		echo "Creating a kernel image with a bundled initramfs..."
 		copy_initramfs
-		if [ -e ${KERNEL_OUTPUT} ] ; then
+		# Backuping kernel image relies on its type(regular file or symbolic link)
+		linkpath=""
+		realpath=""
+		if [ -h ${KERNEL_OUTPUT} ] ; then
+			linkpath=`readlink -n ${KERNEL_OUTPUT}`
+			realpath=`readlink -fn ${KERNEL_OUTPUT}`
+			mv -f $realpath $realpath.bak
+		elif [ -f ${KERNEL_OUTPUT} ]; then
 			mv -f ${KERNEL_OUTPUT} ${KERNEL_OUTPUT}.bak
 		fi
 		use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio
 		kernel_do_compile
-		mv -f ${KERNEL_OUTPUT} ${KERNEL_OUTPUT}.initramfs
-		mv -f ${KERNEL_OUTPUT}.bak ${KERNEL_OUTPUT}
+		# Restoring kernel image
+		if [ -n "$realpath" ]; then
+			mv -f $realpath $realpath.initramfs
+			mv -f $realpath.bak $realpath
+			cd ${B}/$(dirname ${KERNEL_OUTPUT})
+			ln -sf $linkpath.initramfs
+		else
+			mv -f ${KERNEL_OUTPUT} ${KERNEL_OUTPUT}.initramfs
+			mv -f ${KERNEL_OUTPUT}.bak ${KERNEL_OUTPUT}
+		fi
 		# Update install area
 		echo "There is kernel image bundled with initramfs: ${B}/${KERNEL_OUTPUT}.initramfs"
 		install -m 0644 ${B}/${KERNEL_OUTPUT}.initramfs ${D}/boot/${KERNEL_IMAGETYPE}-initramfs-${MACHINE}.bin
Signature · 1 line
1.8.1.2
author
#2 lore raw

PATCH 2/5 packagegroups: Remove toolchain *-symlinks packages

In reply to Hongxu Jia

From: Mark Hatle <[email protected]>

We are no longer producing the *-symlinks packages, so remove the dependencies to those items.

---
 meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb | 4 ----
 meta/recipes-core/packagegroups/packagegroup-self-hosted.bb         | 4 ----
 2 files changed, 8 deletions(-)
meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb +0 -4
index 74ed247..e21f8c1 100644
@@ -12,13 +12,9 @@ RDEPENDS_packagegroup-core-buildessential = "\
     autoconf \
     automake \
     binutils \
-    binutils-symlinks \
     cpp \
-    cpp-symlinks \
     gcc \
-    gcc-symlinks \
     g++ \
-    g++-symlinks \
     gettext \
     make \
     libstdc++ \
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +0 -4
index 8e3b917..5581d8e 100644
@@ -69,20 +69,16 @@ RDEPENDS_packagegroup-self-hosted-sdk = "\
     autoconf \
     automake \
     binutils \
-    binutils-symlinks \
     ccache \
     coreutils \
     cpp \
-    cpp-symlinks \
     distcc \
     eglibc-utils \
     eglibc-gconv-ibm850 \
     file \
     findutils \
     g++ \
-    g++-symlinks \
     gcc \
-    gcc-symlinks \
     intltool \
     ldd \
     less \
Signature · 1 line
1.8.1.2
#3 lore raw

Re: [PATCH 2/5] packagegroups: Remove toolchain *-symlinks packages

Quoted 5 lines · Hongxu Jia

From: Mark Hatle <[email protected]>

We are no longer producing the *-symlinks packages, so remove the dependencies to those items.

Quoted 7 lines
---
 meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb | 4 ----
 meta/recipes-core/packagegroups/packagegroup-self-hosted.bb         | 4 ----
 2 files changed, 8 deletions(-)

The binutils-symlinks package was removed however the gcc related ones have not been. This patch is therefore not appropriate until that has happened.

Cheers,

Richard

Quoted 46 lines
meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb +0 -4
index 74ed247..e21f8c1 100644
@@ -12,13 +12,9 @@ RDEPENDS_packagegroup-core-buildessential = "\
     autoconf \
     automake \
     binutils \
-    binutils-symlinks \
     cpp \
-    cpp-symlinks \
     gcc \
-    gcc-symlinks \
     g++ \
-    g++-symlinks \
     gettext \
     make \
     libstdc++ \
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +0 -4
index 8e3b917..5581d8e 100644
@@ -69,20 +69,16 @@ RDEPENDS_packagegroup-self-hosted-sdk = "\
     autoconf \
     automake \
     binutils \
-    binutils-symlinks \
     ccache \
     coreutils \
     cpp \
-    cpp-symlinks \
     distcc \
     eglibc-utils \
     eglibc-gconv-ibm850 \
     file \
     findutils \
     g++ \
-    g++-symlinks \
     gcc \
-    gcc-symlinks \
     intltool \
     ldd \
     less \
Signature · 1 line
1.8.1.2
author
#4 lore raw

Re: [PATCH 2/5] packagegroups: Remove toolchain *-symlinks packages

Quoted 13 lines · Richard Purdie
Quoted 5 lines · Hongxu Jia

From: Mark Hatle <[email protected]>

We are no longer producing the *-symlinks packages, so remove the dependencies to those items.

Quoted 7 lines
---
  meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb | 4 ----
  meta/recipes-core/packagegroups/packagegroup-self-hosted.bb         | 4 ----
  2 files changed, 8 deletions(-)
Quoted 3 lines

The binutils-symlinks package was removed however the gcc related ones have not been. This patch is therefore not appropriate until that has happened.

Got it, I will drop this patch in V2.

//Hongxu

Quoted 51 lines

Cheers,

Richard

Quoted 46 lines
meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb +0 -4
index 74ed247..e21f8c1 100644
@@ -12,13 +12,9 @@ RDEPENDS_packagegroup-core-buildessential = "\
      autoconf \
      automake \
      binutils \
-    binutils-symlinks \
      cpp \
-    cpp-symlinks \
      gcc \
-    gcc-symlinks \
      g++ \
-    g++-symlinks \
      gettext \
      make \
      libstdc++ \
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +0 -4
index 8e3b917..5581d8e 100644
@@ -69,20 +69,16 @@ RDEPENDS_packagegroup-self-hosted-sdk = "\
      autoconf \
      automake \
      binutils \
-    binutils-symlinks \
      ccache \
      coreutils \
      cpp \
-    cpp-symlinks \
      distcc \
      eglibc-utils \
      eglibc-gconv-ibm850 \
      file \
      findutils \
      g++ \
-    g++-symlinks \
      gcc \
-    gcc-symlinks \
      intltool \
      ldd \
      less \
Signature · 1 line
1.8.1.2
author
#5 lore raw

PATCH 3/5 packagegroup-self-hosted: Use packagegroup-core-buildessential

In reply to Hongxu Jia

From: Mark Hatle <[email protected]>

Instead of manually specifying build dependencies, use the packagegroup-core-buildessential. This ensures there is only one place that needs to be modified when toolchain items and dependencies change.

---
 meta/recipes-core/packagegroups/packagegroup-self-hosted.bb | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +1 -11
index 5581d8e..fe49fb4 100644
@@ -66,33 +66,23 @@ RRECOMMENDS_packagegroup-self-hosted-host-tools = "\
 
 # eglibc-utils: for rpcgen
 RDEPENDS_packagegroup-self-hosted-sdk = "\
-    autoconf \
-    automake \
-    binutils \
     ccache \
     coreutils \
-    cpp \
     distcc \
     eglibc-utils \
     eglibc-gconv-ibm850 \
     file \
     findutils \
-    g++ \
-    gcc \
     intltool \
     ldd \
     less \
     libssp \
     libssp-dev \
     libssp-staticdev \
-    libstdc++ \
-    libstdc++-dev \
-    libtool \
-    make \
     mktemp \
+    packagegroup-core-buildessential \
     perl-module-re \
     perl-module-text-wrap \
-    pkgconfig \
     quilt \
     sed \
     "
Signature · 1 line
1.8.1.2
#6 lore raw

Re: [PATCH 3/5] packagegroup-self-hosted: Use packagegroup-core-buildessential

Hello all,

This is an important patch, please make sure that BA still works correctly after this one gets merged (including properly building an image in BA).

Thanks,
Cristian Iorga
YP
Intel Corporation

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hongxu Jia
Sent: Friday, March 28, 2014 11:44 AM
To: [email protected]
Cc: Wold, Saul
Subject: [OE-core] [PATCH 3/5] packagegroup-self-hosted: Use packagegroup-core-buildessential

From: Mark Hatle <[email protected]>

Instead of manually specifying build dependencies, use the packagegroup-core-buildessential. This ensures there is only one place that needs to be modified when toolchain items and dependencies change.

---
 meta/recipes-core/packagegroups/packagegroup-self-hosted.bb | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +1 -11
index 5581d8e..fe49fb4 100644
@@ -66,33 +66,23 @@ RRECOMMENDS_packagegroup-self-hosted-host-tools = "\
 
 # eglibc-utils: for rpcgen
 RDEPENDS_packagegroup-self-hosted-sdk = "\
-    autoconf \
-    automake \
-    binutils \
     ccache \
     coreutils \
-    cpp \
     distcc \
     eglibc-utils \
     eglibc-gconv-ibm850 \
     file \
     findutils \
-    g++ \
-    gcc \
     intltool \
     ldd \
     less \
     libssp \
     libssp-dev \
     libssp-staticdev \
-    libstdc++ \
-    libstdc++-dev \
-    libtool \
-    make \
     mktemp \
+    packagegroup-core-buildessential \
     perl-module-re \
     perl-module-text-wrap \
-    pkgconfig \
     quilt \
     sed \
     "

--
1.8.1.2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#7 lore raw

Re: [PATCH 3/5] packagegroup-self-hosted: Use packagegroup-core-buildessential

Quoted 3 lines · Cristian

Hello all,

This is an important patch, please make sure that BA still works correctly after this one gets merged (including properly building an image in BA).

Hi Cristian,

I have built the build-appliance-image with this one merged, and everything is ok, but I could not understand what the 'BA' means, would you please explain that?

Thanks,
//Hongxu

Quoted 70 lines

Thanks,
Cristian Iorga
YP
Intel Corporation

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hongxu Jia
Sent: Friday, March 28, 2014 11:44 AM
To: [email protected]
Cc: Wold, Saul
Subject: [OE-core] [PATCH 3/5] packagegroup-self-hosted: Use packagegroup-core-buildessential

From: Mark Hatle <[email protected]>

Instead of manually specifying build dependencies, use the packagegroup-core-buildessential. This ensures there is only one place that needs to be modified when toolchain items and dependencies change.

---
  meta/recipes-core/packagegroups/packagegroup-self-hosted.bb | 12 +-----------
  1 file changed, 1 insertion(+), 11 deletions(-)
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +1 -12
index 5581d8e..fe49fb4 100644
@@ -66,33 +66,23 @@ RRECOMMENDS_packagegroup-self-hosted-host-tools = "\
 
  # eglibc-utils: for rpcgen
  RDEPENDS_packagegroup-self-hosted-sdk = "\
-    autoconf \
-    automake \
-    binutils \
      ccache \
      coreutils \
-    cpp \
      distcc \
      eglibc-utils \
      eglibc-gconv-ibm850 \
      file \
      findutils \
-    g++ \
-    gcc \
      intltool \
      ldd \
      less \
      libssp \
      libssp-dev \
      libssp-staticdev \
-    libstdc++ \
-    libstdc++-dev \
-    libtool \
-    make \
      mktemp \
+    packagegroup-core-buildessential \
      perl-module-re \
      perl-module-text-wrap \
-    pkgconfig \
      quilt \
      sed \
      "
--

1.8.1.2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw

Re: [PATCH 3/5] packagegroup-self-hosted: Use packagegroup-core-buildessential

Hello,

BA is short for Build Appliance, and corresponds to build-appliance-image target.
Like I previously said, only building BA is not a proper test.
After the change that you proposed (a fine change, I might say), building images in BA is another test that needs to be performed in order to validate your change. See details here: https://www.yoctoproject.org/documentation/build-appliance-manual

Regards,
Cristian Iorga
YP
Intel Corporation

-----Original Message-----
From: Hongxu Jia [mailto:[email protected]]
Sent: Monday, March 31, 2014 11:32 AM
To: Iorga, Cristian
Cc: [email protected]; Georgescu, Alexandru C
Subject: Re: [OE-core] [PATCH 3/5] packagegroup-self-hosted: Use packagegroup-core-buildessential

Quoted 3 lines · Cristian

Hello all,

This is an important patch, please make sure that BA still works correctly after this one gets merged (including properly building an image in BA).

Hi Cristian,

I have built the build-appliance-image with this one merged, and everything is ok, but I could not understand what the 'BA' means, would you please explain that?

Thanks,
//Hongxu

Quoted 76 lines

Thanks,
Cristian Iorga
YP
Intel Corporation

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hongxu Jia
Sent: Friday, March 28, 2014 11:44 AM
To: [email protected]
Cc: Wold, Saul
Subject: [OE-core] [PATCH 3/5] packagegroup-self-hosted: Use packagegroup-core-buildessential

From: Mark Hatle <[email protected]>

Instead of manually specifying build dependencies, use the packagegroup-core-buildessential. This ensures there is only one place that needs to be modified when toolchain items and dependencies change.

---
  meta/recipes-core/packagegroups/packagegroup-self-hosted.bb | 12 +-----------
  1 file changed, 1 insertion(+), 11 deletions(-)
(quoted diff) +0 -0

a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb index 5581d8e..fe49fb4 100644

meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +1 -11
@@ -66,33 +66,23 @@ RRECOMMENDS_packagegroup-self-hosted-host-tools = 
 "\
 
  # eglibc-utils: for rpcgen
  RDEPENDS_packagegroup-self-hosted-sdk = "\
-    autoconf \
-    automake \
-    binutils \
      ccache \
      coreutils \
-    cpp \
      distcc \
      eglibc-utils \
      eglibc-gconv-ibm850 \
      file \
      findutils \
-    g++ \
-    gcc \
      intltool \
      ldd \
      less \
      libssp \
      libssp-dev \
      libssp-staticdev \
-    libstdc++ \
-    libstdc++-dev \
-    libtool \
-    make \
      mktemp \
+    packagegroup-core-buildessential \
      perl-module-re \
      perl-module-text-wrap \
-    pkgconfig \
      quilt \
      sed \
      "

--
1.8.1.2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#9 lore raw

PATCH 4/5 syslinux.bbclass: Enable additional kernel parameters for syslinux

In reply to Hongxu Jia

From: Konrad Scherer <[email protected]>

Add additional parameter 'SYSLINUX_KERNEL_ARGS' in order to allow for specific kernel parameters to be set when using syslinux.

The extra kernel parameters are added to btype[1] and then written out as part of the APPEND field.

---
 meta/classes/syslinux.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
meta/classes/syslinux.bbclass +5 -0
index 62d4b7a..8964d3f 100644
@@ -15,6 +15,7 @@
 # ${SYSLINUX_DEFAULT_CONSOLE} - set to "console=ttyX" to change kernel boot default console
 # ${SYSLINUX_SERIAL} - Set an alternate serial port or turn off serial with empty string
 # ${SYSLINUX_SERIAL_TTY} - Set alternate console=tty... kernel boot argument
+# ${SYSLINUX_KERNEL_ARGS} - Add additional kernel arguments
 
 do_bootimg[depends] += "syslinux:do_populate_sysroot \
                         syslinux-native:do_populate_sysroot"
@@ -162,6 +163,10 @@ python build_syslinux_cfg () {
         for btype in btypes:
             cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))
 
+            exargs = d.getVar('SYSLINUX_KERNEL_ARGS', True)
+            if exargs:
+                btype[1] += " " + exargs
+
             append = localdata.getVar('APPEND', True)
             initrd = localdata.getVar('INITRD', True)
 
Signature · 1 line
1.8.1.2
author
#10 lore raw

PATCH 5/5 libc-common.bbclass: rename ALL the packages

In reply to Hongxu Jia

From: Peter Seebach <[email protected]>

The DEBIAN_NAMES feature renames some of the libc packages to "libc6*" names --but only some. A previous patch added the -dbg package. However, this doesn't cover other packages (such as the -doc package), and it didn't take multilibs into account.

---
 meta/classes/libc-common.bbclass | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
meta/classes/libc-common.bbclass +13 -6
index daf499d..53bf467 100644
@@ -25,12 +25,19 @@ def get_libc_fpu_setting(bb, d):
 
 python populate_packages_prepend () {
     if d.getVar('DEBIAN_NAMES', True):
+        pkgs = d.getVar('PACKAGES', True).split()
         bpn = d.getVar('BPN', True)
-        d.setVar('PKG_'+bpn, 'libc6')
-        d.setVar('PKG_'+bpn+'-dev', 'libc6-dev')
-        d.setVar('PKG_'+bpn+'-dbg', 'libc6-dbg')
+        prefix = d.getVar('MLPREFIX', True) or ""
+        # Set the base package...
+        d.setVar('PKG_' + prefix + bpn, prefix + 'libc6')
+        initial = prefix + bpn + '-'
+        for p in pkgs:
+            # And all the subpackages.
+            if p.startswith(initial):
+                renamed = p.replace(bpn, 'libc6', 1)
+                d.setVar('PKG_' + p, renamed)
         # For backward compatibility with old -dbg package
-        d.appendVar('RPROVIDES_' + bpn + '-dbg', ' libc-dbg')
-        d.appendVar('RCONFLICTS_' + bpn + '-dbg', ' libc-dbg')
-        d.appendVar('RREPLACES_' + bpn + '-dbg', ' libc-dbg')
+        d.appendVar('RPROVIDES_' + initial + 'dbg', ' ' + prefix + 'libc-dbg')
+        d.appendVar('RCONFLICTS_' + initial + 'dbg', ' ' + prefix + 'libc-dbg')
+        d.appendVar('RREPLACES_' + initial + 'dbg', ' ' + prefix + 'libc-dbg')
 }
Signature · 1 line
1.8.1.2
#11 lore raw

Re: [PATCH 5/5] libc-common.bbclass: rename ALL the packages

Quoted 22 lines · Hongxu Jia

From: Peter Seebach <[email protected]>

The DEBIAN_NAMES feature renames some of the libc packages to "libc6*" names --but only some. A previous patch added the -dbg package. However, this doesn't cover other packages (such as the -doc package), and it didn't take multilibs into account.

---
 meta/classes/libc-common.bbclass | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
meta/classes/libc-common.bbclass +0 -0
index daf499d..53bf467 100644
@@ -25,12 +25,19 @@ def get_libc_fpu_setting(bb, d):
 
 python populate_packages_prepend () {

meta/classes/libc-common.bbclass def get_libc_fpu_setting(bb, d): · line 33

Quoted 10 lines
meta/classes/libc-common.bbclass +5 -3
     if d.getVar('DEBIAN_NAMES', True):
+        pkgs = d.getVar('PACKAGES', True).split()
         bpn = d.getVar('BPN', True)
-        d.setVar('PKG_'+bpn, 'libc6')
-        d.setVar('PKG_'+bpn+'-dev', 'libc6-dev')
-        d.setVar('PKG_'+bpn+'-dbg', 'libc6-dbg')
+        prefix = d.getVar('MLPREFIX', True) or ""
+        # Set the base package...
+        d.setVar('PKG_' + prefix + bpn, prefix + 'libc6')
+        initial = prefix + bpn + '-'

I would prefer better variable name here, first thing on my mind when I've seen it was eglibc-initial and I was wondering why should all libc packages be renamed like that.

Quoted 21 lines
meta/classes/libc-common.bbclass +8 -3
+        for p in pkgs:
+            # And all the subpackages.
+            if p.startswith(initial):
+                renamed = p.replace(bpn, 'libc6', 1)
+                d.setVar('PKG_' + p, renamed)
         # For backward compatibility with old -dbg package
-        d.appendVar('RPROVIDES_' + bpn + '-dbg', ' libc-dbg')
-        d.appendVar('RCONFLICTS_' + bpn + '-dbg', ' libc-dbg')
-        d.appendVar('RREPLACES_' + bpn + '-dbg', ' libc-dbg')
+        d.appendVar('RPROVIDES_' + initial + 'dbg', ' ' + prefix + 'libc-dbg')
+        d.appendVar('RCONFLICTS_' + initial + 'dbg', ' ' + prefix + 'libc-dbg')
+        d.appendVar('RREPLACES_' + initial + 'dbg', ' ' + prefix + 'libc-dbg')
 }
Signature · 7 lines
1.8.1.2

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
author
#12 lore raw

Re: [PATCH 5/5] libc-common.bbclass: rename ALL the packages

Quoted 22 lines · Martin Jansa
Quoted 21 lines · Hongxu Jia

From: Peter Seebach <[email protected]>

The DEBIAN_NAMES feature renames some of the libc packages to "libc6*" names --but only some. A previous patch added the -dbg package. However, this doesn't cover other packages (such as the -doc package), and it didn't take multilibs into account.

---
  meta/classes/libc-common.bbclass | 19 +++++++++++++------
  1 file changed, 13 insertions(+), 6 deletions(-)
meta/classes/libc-common.bbclass +0 -0
index daf499d..53bf467 100644
@@ -25,12 +25,19 @@ def get_libc_fpu_setting(bb, d):
 
Quoted 14 lines

meta/classes/libc-common.bbclass def get_libc_fpu_setting(bb, d): · line 33

Quoted 11 lines
meta/classes/libc-common.bbclass +5 -3
  python populate_packages_prepend () {
      if d.getVar('DEBIAN_NAMES', True):
+        pkgs = d.getVar('PACKAGES', True).split()
          bpn = d.getVar('BPN', True)
-        d.setVar('PKG_'+bpn, 'libc6')
-        d.setVar('PKG_'+bpn+'-dev', 'libc6-dev')
-        d.setVar('PKG_'+bpn+'-dbg', 'libc6-dbg')
+        prefix = d.getVar('MLPREFIX', True) or ""
+        # Set the base package...
+        d.setVar('PKG_' + prefix + bpn, prefix + 'libc6')
+        initial = prefix + bpn + '-'

I would prefer better variable name here, first thing on my mind when I've seen it was eglibc-initial and I was wondering why should all libc packages be renamed like that.

Yep, how about 'libcprefix' instead,

s/initial/libcprefix/

//Hongxu

Quoted 21 lines
Quoted 21 lines
meta/classes/libc-common.bbclass +8 -3
+        for p in pkgs:
+            # And all the subpackages.
+            if p.startswith(initial):
+                renamed = p.replace(bpn, 'libc6', 1)
+                d.setVar('PKG_' + p, renamed)
          # For backward compatibility with old -dbg package
-        d.appendVar('RPROVIDES_' + bpn + '-dbg', ' libc-dbg')
-        d.appendVar('RCONFLICTS_' + bpn + '-dbg', ' libc-dbg')
-        d.appendVar('RREPLACES_' + bpn + '-dbg', ' libc-dbg')
+        d.appendVar('RPROVIDES_' + initial + 'dbg', ' ' + prefix + 'libc-dbg')
+        d.appendVar('RCONFLICTS_' + initial + 'dbg', ' ' + prefix + 'libc-dbg')
+        d.appendVar('RREPLACES_' + initial + 'dbg', ' ' + prefix + 'libc-dbg')
  }
Signature · 7 lines
1.8.1.2

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core