All of lore.kernel.org
 help / color / mirror / Atom feed
* [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes
@ 2012-05-24  4:42 Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 01/28] qemumips64.conf: Add machine configuration for mips64(eb) Saul Wold
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

Richard,

I have been building and running images from the following changes
(not the mips64 or sh4 yet).

A number of the changes below (from Robert, Nitin and Xiaofeng) are candiates
for 1.2.1.

The package_deb.bbclass change needs more review, I believe that Joshua also
proposed a fix, but caused other breakage, this seems to resolve the problem, 
but I am not sure about it.

Paul's change to add checksum does add some warnings, which I assume he or
someone will fix shortly, they seem to be from older recipes.

Thanks
	Sau!

The following changes since commit e6333825c3482a559a0c0499e17f8f48d3042ddf:

  tune-mips64.inc: Add new tune file for mips64 big-endian (2012-05-20 20:24:37 -0700)

are available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib sgw/fix
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/fix

Andreas Oberritter (6):
  ppp: avoid host contamination
  libnss-mdns: fix postinst scripts
  wpa-supplicant: fix packaging error since last commit
  netbase: merge init script updates from upstream
  distutils.bbclass: don't delete .pyo files
  python: bump PR of packages after update of distutils.bbclass

Christopher Larson (3):
  tcmode-external-csl: preferred external-csl-toolchain's gdbserver
  Rename 'external-csl' to 'external-sourcery'
  external-sourcery-toolchain: ignore GNU_HASH issues with its packages

Enrico Scholz (1):
  libtool: fixed parallel build related race

Joshua Lock (7):
  Revert "sanity.bbclass: check user can read and write to SSTATE_DIR"
  sanity.bbclass: copy the data store and finalise before running
    checks
  sanity.bbclass: data.getVar(VAR, obj, exp) -> obj.getVar(VAR, exp)
  sanity.bbclass: add newline to check_create_long_filename failure
    message
  sanity.bbclass: add extra information when SSTATE_CACHE unusable
  sanity.bbclass: catch an extra exception in
    check_create_long_filename
  sanity.bbclass: check sanity at BuildStarted rather than ConfigParsed

Khem Raj (5):
  qemumips64.conf: Add machine configuration for mips64(eb)
  qemush4.conf: Add machine configuration for qemush4
  gcc-4.7: Add knowledge about arm hf dynamic loader
  eglibc: Add ARM hf dynamic linker support
  gcc: Grok for callconvention-hard to enable hard float

Marko Lindqvist (1):
  package_deb.bbclass: don't handle advanced dependency marker as
    version number

Nitin A Kamble (1):
  eglibc: package mtrace separately

Paul Eggleton (1):
  classes/base: add checksum file list at parse time

Robert Yang (2):
  package_rpm.bbclass: Fix incremental rpm image generation
  rpm 5.4.0: respect to the arch when choose the alternatives

Xiaofeng Yan (1):
  ncurses: Avoid occasional builling failure when having parallel
    processable task

 meta/classes/base.bbclass                          |    1 +
 meta/classes/distutils.bbclass                     |    4 -
 meta/classes/package_deb.bbclass                   |   19 +-
 meta/classes/package_rpm.bbclass                   |   20 +-
 meta/classes/sanity.bbclass                        |  157 +++++-----
 meta/conf/distro/include/tcmode-external-csl.inc   |  119 +-------
 .../distro/include/tcmode-external-sourcery.inc    |  118 +++++++
 meta/conf/machine/qemumips64.conf                  |   13 +
 meta/conf/machine/qemush4.conf                     |   13 +
 .../libnss-mdns/libnss-mdns_0.10.bb                |   15 +-
 .../makefile-remove-hard-usr-reference.patch       |   16 +
 meta/recipes-connectivity/ppp/ppp_2.4.5.bb         |    2 +-
 .../wpa-supplicant/wpa-supplicant-0.7.inc          |    2 +-
 .../wpa-supplicant/wpa-supplicant_0.7.3.bb         |    2 +-
 .../eglibc/eglibc-2.15/add_HAVE_ARM_PCS_VFP.patch  |   28 ++
 .../eglibc/eglibc-2.15/ldso_arm_hf_support.patch   |  338 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc-package.inc        |    7 +-
 meta/recipes-core/eglibc/eglibc_2.13.bb            |    2 +-
 meta/recipes-core/eglibc/eglibc_2.15.bb            |    4 +-
 ...toolchain.bb => external-sourcery-toolchain.bb} |    6 +
 .../SUPPORTED                                      |    0
 meta/recipes-core/ncurses/ncurses.inc              |   23 +-
 meta/recipes-core/netbase/netbase-4.47/init        |  101 ++++--
 meta/recipes-core/netbase/netbase_4.47.bb          |    2 +-
 meta/recipes-core/tasks/task-core-tools-debug.bb   |    4 +
 meta/recipes-devtools/gcc/gcc-4.7.inc              |    1 +
 .../gcc/gcc-4.7/arm-hard-float-loader.patch        |   48 +++
 meta/recipes-devtools/gcc/gcc-common.inc           |    2 +
 meta/recipes-devtools/libtool/libtool-2.4.2.inc    |    3 +-
 .../python/python-argparse_1.2.1.bb                |    2 +-
 .../python/python-imaging_1.1.7.bb                 |    2 +-
 .../python/python-pycurl_7.19.0.bb                 |    2 +-
 meta/recipes-devtools/python/python-pyrex_0.9.9.bb |    2 +-
 meta/recipes-devtools/python/python-scons_2.1.0.bb |    2 +-
 .../python/python-setuptools_0.6c11.bb             |    2 +-
 .../rpm/rpm/rpm-respect-arch.patch                 |   67 ++++
 meta/recipes-devtools/rpm/rpm_5.4.0.bb             |    3 +-
 37 files changed, 883 insertions(+), 269 deletions(-)
 create mode 100644 meta/conf/distro/include/tcmode-external-sourcery.inc
 create mode 100644 meta/conf/machine/qemumips64.conf
 create mode 100644 meta/conf/machine/qemush4.conf
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.15/add_HAVE_ARM_PCS_VFP.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.15/ldso_arm_hf_support.patch
 rename meta/recipes-core/meta/{external-csl-toolchain.bb => external-sourcery-toolchain.bb} (96%)
 rename meta/recipes-core/meta/{external-csl-toolchain => external-sourcery-toolchain}/SUPPORTED (100%)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.7/arm-hard-float-loader.patch
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-respect-arch.patch

-- 
1.7.7.6




^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Consolidated Pull 01/28] qemumips64.conf: Add machine configuration for mips64(eb)
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 02/28] qemush4.conf: Add machine configuration for qemush4 Saul Wold
                   ` (27 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Khem Raj <raj.khem@gmail.com>

New machine description for qemu emulating malta64/mips64
big-endian system

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/conf/machine/qemumips64.conf |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644 meta/conf/machine/qemumips64.conf

diff --git a/meta/conf/machine/qemumips64.conf b/meta/conf/machine/qemumips64.conf
new file mode 100644
index 0000000..8e9a488
--- /dev/null
+++ b/meta/conf/machine/qemumips64.conf
@@ -0,0 +1,13 @@
+#@TYPE: Machine
+#@NAME: mti_malta64 MIPS64
+#@DESCRIPTION: mti_malta64
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/tune-mips64.inc
+
+KERNEL_IMAGETYPE = "vmlinux"
+KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
+
+SERIAL_CONSOLE = "115200 ttyS0"
+
+MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 02/28] qemush4.conf: Add machine configuration for qemush4
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 01/28] qemumips64.conf: Add machine configuration for mips64(eb) Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 03/28] gcc-4.7: Add knowledge about arm hf dynamic loader Saul Wold
                   ` (26 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Khem Raj <raj.khem@gmail.com>

SH4 qemu emulation using rts7751r2dplus board

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/conf/machine/qemush4.conf |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644 meta/conf/machine/qemush4.conf

diff --git a/meta/conf/machine/qemush4.conf b/meta/conf/machine/qemush4.conf
new file mode 100644
index 0000000..acf7faf
--- /dev/null
+++ b/meta/conf/machine/qemush4.conf
@@ -0,0 +1,13 @@
+#@TYPE: Machine
+#@NAME: base
+#@DESCRIPTION: rts7751r2dplus
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/tune-sh4.inc
+
+KERNEL_IMAGETYPE = "zImage"
+
+SERIAL_CONSOLE = "115200 ttySC1 noiotrap earlyprintk=sh-sci.1"
+
+MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 03/28] gcc-4.7: Add knowledge about arm hf dynamic loader
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 01/28] qemumips64.conf: Add machine configuration for mips64(eb) Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 02/28] qemush4.conf: Add machine configuration for qemush4 Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 04/28] eglibc: Add ARM hf dynamic linker support Saul Wold
                   ` (25 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Khem Raj <raj.khem@gmail.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-4.7.inc              |    1 +
 .../gcc/gcc-4.7/arm-hard-float-loader.patch        |   48 ++++++++++++++++++++
 2 files changed, 49 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.7/arm-hard-float-loader.patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc
index efd166c..0321776 100644
--- a/meta/recipes-devtools/gcc/gcc-4.7.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.7.inc
@@ -65,6 +65,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
 	   file://libgcc-sjlj-check.patch \
 	   file://cpp-honor-sysroot.patch \
 	   file://mips64-default-n64.patch \
+	   file://arm-hard-float-loader.patch \
 	  "
 
 S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${BRANCH}"
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/arm-hard-float-loader.patch b/meta/recipes-devtools/gcc/gcc-4.7/arm-hard-float-loader.patch
new file mode 100644
index 0000000..dfa0d19
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.7/arm-hard-float-loader.patch
@@ -0,0 +1,48 @@
+This patch is still being discussed by probably is almost
+final version. We add the OE notion of multilib on top
+
+Upstream-Status: Backport [ adapted ]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: gcc-4_7-branch/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4_7-branch.orig/gcc/config/arm/linux-eabi.h	2012-04-30 15:28:31.891863845 -0700
++++ gcc-4_7-branch/gcc/config/arm/linux-eabi.h	2012-04-30 15:37:11.531888994 -0700
+@@ -32,7 +32,8 @@
+   while (false)
+ 
+ /* We default to a soft-float ABI so that binaries can run on all
+-   target hardware.  */
++   target hardware.  If you override this to use the hard-float ABI then
++   change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well.  */
+ #undef  TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
+ 
+@@ -59,10 +60,23 @@
+ #undef  SUBTARGET_EXTRA_LINK_SPEC
+ #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
+ 
+-/* Use ld-linux.so.3 so that it will be possible to run "classic"
+-   GNU/Linux binaries on an EABI system.  */
++/* GNU/Linux on ARM currently supports three dynamic linkers:
++   - ld-linux.so.2 - for the legacy ABI
++   - ld-linux.so.3 - for the EABI-derived soft-float ABI
++   - ld-linux-armhf.so.3 - for the EABI-derived hard-float ABI.
++   All the dynamic linkers live in /lib.
++   We default to soft-float, but this can be overridden by changing both
++   GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
++
+ #undef  GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
++#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
++
++ #define GLIBC_DYNAMIC_LINKER \
++    "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \
++     %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
++     %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+ 
+ /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
+    use the GNU/Linux version, not the generic BPABI version.  */
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 04/28] eglibc: Add ARM hf dynamic linker support
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (2 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 03/28] gcc-4.7: Add knowledge about arm hf dynamic loader Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 05/28] gcc: Grok for callconvention-hard to enable hard float Saul Wold
                   ` (24 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Khem Raj <raj.khem@gmail.com>

The work is done in glibc upstream we backport
the relevant patches

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../eglibc/eglibc-2.15/add_HAVE_ARM_PCS_VFP.patch  |   28 ++
 .../eglibc/eglibc-2.15/ldso_arm_hf_support.patch   |  338 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc_2.15.bb            |    4 +-
 3 files changed, 369 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.15/add_HAVE_ARM_PCS_VFP.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.15/ldso_arm_hf_support.patch

diff --git a/meta/recipes-core/eglibc/eglibc-2.15/add_HAVE_ARM_PCS_VFP.patch b/meta/recipes-core/eglibc/eglibc-2.15/add_HAVE_ARM_PCS_VFP.patch
new file mode 100644
index 0000000..0f95c2f
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.15/add_HAVE_ARM_PCS_VFP.patch
@@ -0,0 +1,28 @@
+From: Carlos O'Donell <carlos_odonell@mentor.com>
+Date: Mon, 7 May 2012 20:04:41 +0000 (-0400)
+Subject: ARM: Define HAVE_ARM_PCS_VFP in config.h.
+X-Git-Url: http://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=6a43ec980c5a0500149ef37d4854eac0e270da6f;hp=05c2c9618f583ea4acd69b3fe5ae2a2922dd2ddc
+
+ARM: Define HAVE_ARM_PCS_VFP in config.h.
+
+If the compiler and flags would select the hard-float ABI
+then the ARM configure fragment will set HAVE_ARM_PCS_VFP.
+This is later used by the ARM shlib-versions to select
+the appropriately named dynamic linker.
+---
+
+Upstream-Status: Backport
+-Khem
+
+Index: libc/config.h.in
+===================================================================
+--- libc.orig/config.h.in	2012-01-04 22:06:28.000000000 -0800
++++ libc/config.h.in	2012-05-08 11:25:56.581079069 -0700
+@@ -233,4 +233,7 @@
+ 
+ #define HAVE_REGEX 1
+ 
++/* The ARM hard-float ABI is being used.  */
++#undef HAVE_ARM_PCS_VFP
++
+ #endif
diff --git a/meta/recipes-core/eglibc/eglibc-2.15/ldso_arm_hf_support.patch b/meta/recipes-core/eglibc/eglibc-2.15/ldso_arm_hf_support.patch
new file mode 100644
index 0000000..7a53da6
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.15/ldso_arm_hf_support.patch
@@ -0,0 +1,338 @@
+From d3b36017d43af570ca7f79e711749dd4ade76979 Mon Sep 17 00:00:00 2001
+From: Carlos O'Donell <carlos_odonell@mentor.com>
+Date: Mon, 7 May 2012 22:14:44 -0400
+Subject: [PATCH] ARM: Use /lib/ld-linux-armhf.so.3 for the hard-float ABI.
+
+The hard-float ABI will now use /lib/ld-linux-armhf.so.3.
+We detect the use of the hard-float ABI and select the
+appropriate dynamic linker name. You must have a new or
+patched compiler which also uses the new dynamic loader
+name when the hard-float ABI is selected.
+---
+ ChangeLog.arm              |    8 ++
+ sysdeps/arm/configure      |  184 ++++++++++++++++++++++++++++++++++++++++++++
+ sysdeps/arm/configure.in   |   17 ++++
+ sysdeps/arm/shlib-versions |    8 ++-
+ 4 files changed, 216 insertions(+), 1 deletions(-)
+ mode change 100644 => 100755 sysdeps/arm/configure
+
+Upstream-Status: Backport
+-Khem
+
+Index: libc/ports/sysdeps/arm/configure.in
+===================================================================
+--- libc.orig/ports/sysdeps/arm/configure.in	2012-05-08 11:42:59.161128560 -0700
++++ libc/ports/sysdeps/arm/configure.in	2012-05-08 11:43:29.373130066 -0700
+@@ -18,3 +18,20 @@
+ if test $libc_cv_asm_cfi_directive_sections != yes; then
+   AC_MSG_ERROR([need .cfi_sections in this configuration])
+ fi
++
++# We check to see if the compiler and flags are
++# selecting the hard-float ABI and if they are then
++# we set libc_cv_arm_pcs_vfp to yes which causes
++# HAVE_ARM_PCS_VFP to be defined in config.h and
++# in include/libc-symbols.h and thus available to
++# shlib-versions to select the appropriate name for
++# the dynamic linker via %ifdef.
++AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI],
++  [libc_cv_arm_pcs_vfp],
++  [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP
++                      yes
++                     #endif
++  ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
++if test $libc_cv_arm_pcs_vfp = yes; then
++  AC_DEFINE(HAVE_ARM_PCS_VFP)
++fi
+Index: libc/ports/sysdeps/arm/shlib-versions
+===================================================================
+--- libc.orig/ports/sysdeps/arm/shlib-versions	2012-05-08 11:42:59.145128546 -0700
++++ libc/ports/sysdeps/arm/shlib-versions	2012-05-08 11:43:29.409130022 -0700
+@@ -1,4 +1,10 @@
+ arm.*-.*-linux-gnueabi.*	DEFAULT			GLIBC_2.4
+ 
+-arm.*-.*-linux-gnueabi.*	ld=ld-linux.so.3
++%ifdef HAVE_ARM_PCS_VFP
++# The EABI-derived hard-float ABI uses a new dynamic linker.
++arm.*-.*-linux-gnueabi.*       ld=ld-linux-armhf.so.3
++%else
++# The EABI-derived soft-float ABI continues to use ld-linux.so.3.
++arm.*-.*-linux-gnueabi.*       ld=ld-linux.so.3
++%endif
+ arm.*-.*-linux.*	ld=ld-linux.so.2
+Index: libc/ports/sysdeps/arm/configure
+===================================================================
+--- libc.orig/ports/sysdeps/arm/configure	2012-05-08 11:43:46.437130836 -0700
++++ libc/ports/sysdeps/arm/configure	2012-05-08 11:49:10.393145653 -0700
+@@ -1,3 +1,100 @@
++# as_fn_set_status STATUS
++# -----------------------
++# Set $? to STATUS, without forking.
++as_fn_set_status ()
++{
++  return $1
++} # as_fn_set_status
++
++# as_fn_exit STATUS
++# -----------------
++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
++as_fn_exit ()
++{
++  set +e
++  as_fn_set_status $1
++  exit $1
++} # as_fn_exit
++# as_fn_arith ARG...
++# ------------------
++# Perform arithmetic evaluation on the ARGs, and store the result in the
++# global $as_val. Take advantage of shells that can avoid forks. The arguments
++# must be portable across $(()) and expr.
++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
++  eval 'as_fn_arith ()
++  {
++    as_val=$(( $* ))
++  }'
++else
++  as_fn_arith ()
++  {
++    as_val=`expr "$@" || test $? -eq 1`
++  }
++fi # as_fn_arith
++
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++   test "X`expr 00001 : '.*\(...\)'`" = X001; then
++  as_expr=expr
++else
++  as_expr=false
++fi
++
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
++  as_basename=basename
++else
++  as_basename=false
++fi
++
++as_me=`$as_basename -- "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++	 X"$0" : 'X\(//\)$' \| \
++	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X/"$0" |
++    sed '/^.*\/\([^/][^/]*\)\/*$/{
++	    s//\1/
++	    q
++	  }
++	  /^X\/\(\/\/\)$/{
++	    s//\1/
++	    q
++	  }
++	  /^X\/\(\/\).*/{
++	    s//\1/
++	    q
++	  }
++	  s/.*/./; q'`
++
++
++  as_lineno_1=$LINENO as_lineno_1a=$LINENO
++  as_lineno_2=$LINENO as_lineno_2a=$LINENO
++  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
++  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
++  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
++  sed -n '
++    p
++    /[$]LINENO/=
++  ' <$as_myself |
++    sed '
++      s/[$]LINENO.*/&-/
++      t lineno
++      b
++      :lineno
++      N
++      :loop
++      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
++      t loop
++      s/-\n.*//
++    ' >$as_me.lineno &&
++  chmod +x "$as_me.lineno" ||
++    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
++
++  # Don't try to exec as it changes $[0], causing all sort of problems
++  # (the dirname of $[0] is not the place where we might find the
++  # original and so on.  Autoconf is especially sensitive to this).
++  . "./$as_me.lineno"
++  # Exit status is that of the last command.
++  exit
++}
+ # This file is generated from configure.in by Autoconf.  DO NOT EDIT!
+  # Local configure fragment for sysdeps/arm.
+ 
+@@ -31,3 +128,170 @@
+ $as_echo "$as_me: error: need .cfi_sections in this configuration" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
++
++# We check to see if the compiler and flags are
++# selecting the hard-float ABI and if they are then
++# we set libc_cv_arm_pcs_vfp to yes which causes
++# HAVE_ARM_PCS_VFP to be defined in config.h and
++# in include/libc-symbols.h and thus available to
++# shlib-versions to select the appropriate name for
++# the dynamic linker via %ifdef.
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
++$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
++if ${ac_cv_path_GREP+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -z "$GREP"; then
++  ac_path_GREP_found=false
++  # Loop through the user's path and test for each of PROGNAME-LIST
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_prog in grep ggrep; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
++      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
++      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
++# Check for GNU ac_path_GREP and select it if it is found.
++  # Check for GNU $ac_path_GREP
++case `"$ac_path_GREP" --version 2>&1` in
++*GNU*)
++  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
++*)
++  ac_count=0
++  $as_echo_n 0123456789 >"conftest.in"
++  while :
++  do
++    cat "conftest.in" "conftest.in" >"conftest.tmp"
++    mv "conftest.tmp" "conftest.in"
++    cp "conftest.in" "conftest.nl"
++    $as_echo 'GREP' >> "conftest.nl"
++    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++    as_fn_arith $ac_count + 1 && ac_count=$as_val
++    if test $ac_count -gt ${ac_path_GREP_max-0}; then
++      # Best one so far, save it but keep looking for a better one
++      ac_cv_path_GREP="$ac_path_GREP"
++      ac_path_GREP_max=$ac_count
++    fi
++    # 10*(2^10) chars as input seems more than enough
++    test $ac_count -gt 10 && break
++  done
++  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++      $ac_path_GREP_found && break 3
++    done
++  done
++  done
++IFS=$as_save_IFS
++  if test -z "$ac_cv_path_GREP"; then
++    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++  fi
++else
++  ac_cv_path_GREP=$GREP
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
++$as_echo "$ac_cv_path_GREP" >&6; }
++ GREP="$ac_cv_path_GREP"
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
++$as_echo_n "checking for egrep... " >&6; }
++if ${ac_cv_path_EGREP+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
++   then ac_cv_path_EGREP="$GREP -E"
++   else
++     if test -z "$EGREP"; then
++  ac_path_EGREP_found=false
++  # Loop through the user's path and test for each of PROGNAME-LIST
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_prog in egrep; do
++    for ac_exec_ext in '' $ac_executable_extensions; do
++      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
++      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
++# Check for GNU ac_path_EGREP and select it if it is found.
++  # Check for GNU $ac_path_EGREP
++case `"$ac_path_EGREP" --version 2>&1` in
++*GNU*)
++  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
++*)
++  ac_count=0
++  $as_echo_n 0123456789 >"conftest.in"
++  while :
++  do
++    cat "conftest.in" "conftest.in" >"conftest.tmp"
++    mv "conftest.tmp" "conftest.in"
++    cp "conftest.in" "conftest.nl"
++    $as_echo 'EGREP' >> "conftest.nl"
++    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++    as_fn_arith $ac_count + 1 && ac_count=$as_val
++    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
++      # Best one so far, save it but keep looking for a better one
++      ac_cv_path_EGREP="$ac_path_EGREP"
++      ac_path_EGREP_max=$ac_count
++    fi
++    # 10*(2^10) chars as input seems more than enough
++    test $ac_count -gt 10 && break
++  done
++  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++      $ac_path_EGREP_found && break 3
++    done
++  done
++  done
++IFS=$as_save_IFS
++  if test -z "$ac_cv_path_EGREP"; then
++    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++  fi
++else
++  ac_cv_path_EGREP=$EGREP
++fi
++
++   fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
++$as_echo "$ac_cv_path_EGREP" >&6; }
++ EGREP="$ac_cv_path_EGREP"
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the ARM hard-float ABI" >&5
++$as_echo_n "checking whether the compiler is using the ARM hard-float ABI... " >&6; }
++if ${libc_cv_arm_pcs_vfp+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#ifdef __ARM_PCS_VFP
++                      yes
++                     #endif
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "yes" >/dev/null 2>&1; then :
++  libc_cv_arm_pcs_vfp=yes
++else
++  libc_cv_arm_pcs_vfp=no
++fi
++rm -f conftest*
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcs_vfp" >&5
++$as_echo "$libc_cv_arm_pcs_vfp" >&6; }
++if test $libc_cv_arm_pcs_vfp = yes; then
++  $as_echo "#define HAVE_ARM_PCS_VFP 1" >>confdefs.h
++
++fi
diff --git a/meta/recipes-core/eglibc/eglibc_2.15.bb b/meta/recipes-core/eglibc/eglibc_2.15.bb
index fa92670..6dd846f 100644
--- a/meta/recipes-core/eglibc/eglibc_2.15.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.15.bb
@@ -3,7 +3,7 @@ require eglibc.inc
 SRCREV = "17386"
 
 DEPENDS += "gperf-native"
-PR = "r10"
+PR = "r11"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_15"
@@ -25,6 +25,8 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http
            file://initgroups_keys.patch \
            file://use-localstatedir-for-vardbdir.patch \
            file://eglibc_fix_findidx_parameters.patch \
+           file://add_HAVE_ARM_PCS_VFP.patch \
+           file://ldso_arm_hf_support.patch \
           "
 LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 05/28] gcc: Grok for callconvention-hard to enable hard float
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (3 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 04/28] eglibc: Add ARM hf dynamic linker support Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 06/28] tcmode-external-csl: preferred external-csl-toolchain's gdbserver Saul Wold
                   ` (23 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Khem Raj <raj.khem@gmail.com>

If callconvention-hard is set then we build gcc defaulting
to hard-float ABI

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-common.inc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index f550aab..c479403 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -10,6 +10,8 @@ inherit autotools gettext
 FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/gcc-${PV}"
 
 def get_gcc_fpu_setting(bb, d):
+    if d.getVar('ARMPKGSFX_EABI', True) is "hf":
+        return "--with-float=hard"
     if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
         return "--with-float=soft"
     if d.getVar('TARGET_FPU', True) in [ 'ppc-efd' ]:
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 06/28] tcmode-external-csl: preferred external-csl-toolchain's gdbserver
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (4 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 05/28] gcc: Grok for callconvention-hard to enable hard float Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 07/28] Rename 'external-csl' to 'external-sourcery' Saul Wold
                   ` (22 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Christopher Larson <kergoth@gmail.com>

Signed-off-by: Christopher Larson <kergoth@gmail.com>
---
 meta/conf/distro/include/tcmode-external-csl.inc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/conf/distro/include/tcmode-external-csl.inc b/meta/conf/distro/include/tcmode-external-csl.inc
index 731780b..0fa2ee1 100644
--- a/meta/conf/distro/include/tcmode-external-csl.inc
+++ b/meta/conf/distro/include/tcmode-external-csl.inc
@@ -34,6 +34,7 @@ PREFERRED_PROVIDER_virtual/libintl = "external-csl-toolchain"
 PREFERRED_PROVIDER_virtual/libiconv = "external-csl-toolchain"
 PREFERRED_PROVIDER_glibc-thread-db = "external-csl-toolchain"
 PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-csl-toolchain"
+PREFERRED_PROVIDER_gdbserver ??= "external-csl-toolchain"
 
 # No need to re-compile the locale files
 GLIBC_INTERNAL_USE_BINARY_LOCALE = "precompiled"
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 07/28] Rename 'external-csl' to 'external-sourcery'
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (5 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 06/28] tcmode-external-csl: preferred external-csl-toolchain's gdbserver Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 08/28] external-sourcery-toolchain: ignore GNU_HASH issues with its packages Saul Wold
                   ` (21 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Christopher Larson <kergoth@gmail.com>

This is a rename per the purchase of CodeSourcery by Mentor Graphics
Corporation, and associated naming change.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
---
 meta/conf/distro/include/tcmode-external-csl.inc   |  120 +-------------------
 .../distro/include/tcmode-external-sourcery.inc    |  118 +++++++++++++++++++
 ...toolchain.bb => external-sourcery-toolchain.bb} |    0
 .../SUPPORTED                                      |    0
 4 files changed, 120 insertions(+), 118 deletions(-)
 create mode 100644 meta/conf/distro/include/tcmode-external-sourcery.inc
 rename meta/recipes-core/meta/{external-csl-toolchain.bb => external-sourcery-toolchain.bb} (100%)
 rename meta/recipes-core/meta/{external-csl-toolchain => external-sourcery-toolchain}/SUPPORTED (100%)

diff --git a/meta/conf/distro/include/tcmode-external-csl.inc b/meta/conf/distro/include/tcmode-external-csl.inc
index 0fa2ee1..9e530ab 100644
--- a/meta/conf/distro/include/tcmode-external-csl.inc
+++ b/meta/conf/distro/include/tcmode-external-csl.inc
@@ -1,118 +1,2 @@
-#
-# Configuration to use external CSL toolchain
-#
-
-EXTERNAL_TOOLCHAIN ?= "/usr/local/csl/${TARGET_ARCH}"
-
-TOOLCHAIN_PATH_ADD = "${EXTERNAL_TOOLCHAIN}/bin:"
-PATH =. "${TOOLCHAIN_PATH_ADD}"
-
-CSL_TARGET_SYS_powerpc ?= "powerpc-linux-gnu"
-CSL_TARGET_SYS_powerpc64 ?= "powerpc-linux-gnu"
-CSL_TARGET_SYS_arm ?= "arm-none-linux-gnueabi"
-CSL_TARGET_SYS_mips ?= "mips-linux-gnu"
-CSL_TARGET_SYS_mipsel ?= "mips-linux-gnu"
-CSL_TARGET_SYS_mips64 ?= "mips-linux-gnu"
-CSL_TARGET_SYS_i686 ?= "i686-pc-linux-gnu"
-CSL_TARGET_SYS_i586 ?= "i686-pc-linux-gnu"
-CSL_TARGET_SYS = "${TARGET_SYS}"
-
-TARGET_PREFIX = "${CSL_TARGET_SYS}-"
-
-PREFERRED_PROVIDER_linux-libc-headers = "external-csl-toolchain"
-PREFERRED_PROVIDER_linux-libc-headers-dev = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "external-csl-toolchain"
-PREFERRED_PROVIDER_libgcc = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/libc = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/libintl = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/libiconv = "external-csl-toolchain"
-PREFERRED_PROVIDER_glibc-thread-db = "external-csl-toolchain"
-PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-csl-toolchain"
-PREFERRED_PROVIDER_gdbserver ??= "external-csl-toolchain"
-
-# No need to re-compile the locale files
-GLIBC_INTERNAL_USE_BINARY_LOCALE = "precompiled"
-ENABLE_BINARY_LOCALE_GENERATION = ""
-
-TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}"
-
-# Translate to CodeSourcery's names for their optimized files in the toolchain
-def csl_target_core(d):
-    coredata = {
-        'armv7a-vfp-neon': 'armv7-a-neon',
-        'i586': 'sgxx-glibc',
-        'i686': 'sgxx-glibc',
-        'core2': 'sgxx-glibc',
-        'mips': 'mips32',
-        'mipsel': 'el',
-        'powerpc-nf': 'nof',
-        'ppce500': 'te500v1',
-        'ppce500mc': 'te500mc',
-        'ppce500v2': 'te500v2',
-        'ppce600': 'te600'
-    }
-    return coredata.get(d.getVar('TUNE_PKGARCH', True), '')
-
-CSL_TARGET_CORE ?= "${@csl_target_core(d)}"
-
-# Unfortunately, the CSL ia32 toolchain has non-prefixed binaries in its
-# bindir (e.g. gcc, ld). To avoid this messing up our build, we avoid adding
-# this bindir to our PATH, and instead add symlinks to the prefixed binaries
-# to our staging toolchain bindir.
-
-python toolchain_metadata_setup () {
-    if not isinstance(e, bb.event.ConfigParsed):
-        return
-
-    d = e.data
-
-    l = d.createCopy()
-    l.finalize()
-    if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/gcc', l)):
-        d.setVar('TOOLCHAIN_PATH_ADD', '')
-}
-addhandler toolchain_metadata_setup
-
-python toolchain_setup () {
-    if not isinstance(e, bb.event.BuildStarted):
-        return
-
-    d = e.data
-
-    if not d.getVar('TOOLCHAIN_PATH_ADD', True):
-        populate_toolchain_links(d)
-}
-addhandler toolchain_setup
-
-def populate_toolchain_links(d):
-    import errno
-    import os
-    from glob import glob
-
-    d = d.createCopy()
-    d.finalize()
-
-    pattern = d.expand('${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}*')
-    files = glob(pattern)
-    if not files:
-        bb.fatal("Unable to populate toolchain binary symlinks in %s" % pattern)
-
-    bindir = d.getVar('STAGING_BINDIR_TOOLCHAIN', True)
-    bb.mkdirhier(bindir)
-    for f in files:
-        base = os.path.basename(f)
-        newpath = os.path.join(bindir, base)
-        try:
-            os.symlink(f, newpath)
-        except OSError as exc:
-            if exc.errno == errno.EEXIST:
-                break
-            bb.fatal("Unable to populate toolchain binary symlink for %s: %s" % (newpath, exc))
-
-require conf/distro/include/csl-versions.inc
+TCMODE = "external-sourcery"
+require conf/distro/include/tcmode-${TCMODE}.inc
diff --git a/meta/conf/distro/include/tcmode-external-sourcery.inc b/meta/conf/distro/include/tcmode-external-sourcery.inc
new file mode 100644
index 0000000..79fef25
--- /dev/null
+++ b/meta/conf/distro/include/tcmode-external-sourcery.inc
@@ -0,0 +1,118 @@
+#
+# Configuration to use external Sourcery G++ toolchain
+#
+
+EXTERNAL_TOOLCHAIN ?= "/usr/local/csl/${TARGET_ARCH}"
+
+TOOLCHAIN_PATH_ADD = "${EXTERNAL_TOOLCHAIN}/bin:"
+PATH =. "${TOOLCHAIN_PATH_ADD}"
+
+CSL_TARGET_SYS_powerpc ?= "powerpc-linux-gnu"
+CSL_TARGET_SYS_powerpc64 ?= "powerpc-linux-gnu"
+CSL_TARGET_SYS_arm ?= "arm-none-linux-gnueabi"
+CSL_TARGET_SYS_mips ?= "mips-linux-gnu"
+CSL_TARGET_SYS_mipsel ?= "mips-linux-gnu"
+CSL_TARGET_SYS_mips64 ?= "mips-linux-gnu"
+CSL_TARGET_SYS_i686 ?= "i686-pc-linux-gnu"
+CSL_TARGET_SYS_i586 ?= "i686-pc-linux-gnu"
+CSL_TARGET_SYS = "${TARGET_SYS}"
+
+TARGET_PREFIX = "${CSL_TARGET_SYS}-"
+
+PREFERRED_PROVIDER_linux-libc-headers = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_linux-libc-headers-dev = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_libgcc = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/libc = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/libintl = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/libiconv = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_glibc-thread-db = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-sourcery-toolchain"
+PREFERRED_PROVIDER_gdbserver ??= "external-sourcery-toolchain"
+
+# No need to re-compile the locale files
+GLIBC_INTERNAL_USE_BINARY_LOCALE = "precompiled"
+ENABLE_BINARY_LOCALE_GENERATION = ""
+
+TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}"
+
+# Translate to CodeSourcery's names for their optimized files in the toolchain
+def csl_target_core(d):
+    coredata = {
+        'armv7a-vfp-neon': 'armv7-a-neon',
+        'i586': 'sgxx-glibc',
+        'i686': 'sgxx-glibc',
+        'core2': 'sgxx-glibc',
+        'mips': 'mips32',
+        'mipsel': 'el',
+        'powerpc-nf': 'nof',
+        'ppce500': 'te500v1',
+        'ppce500mc': 'te500mc',
+        'ppce500v2': 'te500v2',
+        'ppce600': 'te600'
+    }
+    return coredata.get(d.getVar('TUNE_PKGARCH', True), '')
+
+CSL_TARGET_CORE ?= "${@csl_target_core(d)}"
+
+# Unfortunately, the CSL ia32 toolchain has non-prefixed binaries in its
+# bindir (e.g. gcc, ld). To avoid this messing up our build, we avoid adding
+# this bindir to our PATH, and instead add symlinks to the prefixed binaries
+# to our staging toolchain bindir.
+
+python toolchain_metadata_setup () {
+    if not isinstance(e, bb.event.ConfigParsed):
+        return
+
+    d = e.data
+
+    l = d.createCopy()
+    l.finalize()
+    if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/gcc', l)):
+        d.setVar('TOOLCHAIN_PATH_ADD', '')
+}
+addhandler toolchain_metadata_setup
+
+python toolchain_setup () {
+    if not isinstance(e, bb.event.BuildStarted):
+        return
+
+    d = e.data
+
+    if not d.getVar('TOOLCHAIN_PATH_ADD', True):
+        populate_toolchain_links(d)
+}
+addhandler toolchain_setup
+
+def populate_toolchain_links(d):
+    import errno
+    import os
+    from glob import glob
+
+    d = d.createCopy()
+    d.finalize()
+
+    pattern = d.expand('${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}*')
+    files = glob(pattern)
+    if not files:
+        bb.fatal("Unable to populate toolchain binary symlinks in %s" % pattern)
+
+    bindir = d.getVar('STAGING_BINDIR_TOOLCHAIN', True)
+    bb.mkdirhier(bindir)
+    for f in files:
+        base = os.path.basename(f)
+        newpath = os.path.join(bindir, base)
+        try:
+            os.symlink(f, newpath)
+        except OSError as exc:
+            if exc.errno == errno.EEXIST:
+                break
+            bb.fatal("Unable to populate toolchain binary symlink for %s: %s" % (newpath, exc))
+
+require conf/distro/include/csl-versions.inc
diff --git a/meta/recipes-core/meta/external-csl-toolchain.bb b/meta/recipes-core/meta/external-sourcery-toolchain.bb
similarity index 100%
rename from meta/recipes-core/meta/external-csl-toolchain.bb
rename to meta/recipes-core/meta/external-sourcery-toolchain.bb
diff --git a/meta/recipes-core/meta/external-csl-toolchain/SUPPORTED b/meta/recipes-core/meta/external-sourcery-toolchain/SUPPORTED
similarity index 100%
rename from meta/recipes-core/meta/external-csl-toolchain/SUPPORTED
rename to meta/recipes-core/meta/external-sourcery-toolchain/SUPPORTED
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 08/28] external-sourcery-toolchain: ignore GNU_HASH issues with its packages
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (6 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 07/28] Rename 'external-csl' to 'external-sourcery' Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 09/28] classes/base: add checksum file list at parse time Saul Wold
                   ` (20 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Christopher Larson <kergoth@gmail.com>

Signed-off-by: Christopher Larson <kergoth@gmail.com>
---
 .../meta/external-sourcery-toolchain.bb            |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-core/meta/external-sourcery-toolchain.bb b/meta/recipes-core/meta/external-sourcery-toolchain.bb
index a14e958..b8cb6d9 100644
--- a/meta/recipes-core/meta/external-sourcery-toolchain.bb
+++ b/meta/recipes-core/meta/external-sourcery-toolchain.bb
@@ -92,6 +92,12 @@ PACKAGES =+ "libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev linux
 # This test should be fixed to ignore .a files in .debug dirs
 INSANE_SKIP_${PN}-dbg = "staticdev"
 
+# We don't care about GNU_HASH in prebuilt binaries
+INSANE_SKIP_${PN}-utils += "ldflags"
+INSANE_SKIP_libstdc++ += "ldflags"
+INSANE_SKIP_libgcc += "ldflags"
+INSANE_SKIP_gdbserver += "ldflags"
+
 PKG_${PN} = "eglibc"
 PKG_${PN}-dev = "eglibc-dev"
 PKG_${PN}-staticdev = "eglibc-staticdev"
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 09/28] classes/base: add checksum file list at parse time
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (7 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 08/28] external-sourcery-toolchain: ignore GNU_HASH issues with its packages Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 10/28] package_deb.bbclass: don't handle advanced dependency marker as version number Saul Wold
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Paul Eggleton <paul.eggleton@linux.intel.com>

Connect the new fetcher file checksum code so that we get a list of the
files to be checksummed at parse time.

The file-checksums flag will not be read unless we are using a version
of BitBake that supports the function we call within it, so it is safe
to include this change even when the metadata will still be used with
older versions of BitBake.

Implements [YOCTO #2044].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/base.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index bb39b7b..79685f7 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -77,6 +77,7 @@ THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
 
 addtask fetch
 do_fetch[dirs] = "${DL_DIR}"
+do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}"
 python base_do_fetch() {
 
 	src_uri = (d.getVar('SRC_URI', True) or "").split()
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 10/28] package_deb.bbclass: don't handle advanced dependency marker as version number
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (8 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 09/28] classes/base: add checksum file list at parse time Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 11/28] package_rpm.bbclass: Fix incremental rpm image generation Saul Wold
                   ` (18 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Marko Lindqvist <cazfi74@gmail.com>

Strip advanced dependency markers away from Provides before writing
them to control file. Left in place they would mean package version
number in control file format.

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 meta/classes/package_deb.bbclass |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 4096fa2..2e0ea92 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -206,6 +206,23 @@ python do_package_deb () {
     import re, copy
     import textwrap
 
+    def deb_explode_dep_ver(varname):
+        # Remove markers from string so they won't get handled as version numbers
+        depstr = localdata.getVar(varname, True) or ""
+        start = depstr.find("(")
+        while start != -1:
+            # We are not searching ")" from full string in case it's malformed in a way
+            # that first ")" is before first "("
+            endstr = depstr[start:len(depstr)]
+            end = endstr.find(")")
+            if (end == len(endstr) - 1) or (end == -1):
+                tmpstr = depstr[0:start]
+            else:
+                tmpstr = depstr[0:start] + depstr[start+end+1:len(depstr)]
+            depstr = tmpstr
+            start = depstr.find("(")
+        return bb.utils.explode_dep_versions(depstr)
+
     workdir = d.getVar('WORKDIR', True)
     if not workdir:
         bb.error("WORKDIR not defined, unable to package")
@@ -341,7 +358,7 @@ python do_package_deb () {
                 if '*' in dep:
                         del rrecommends[dep]
         rsuggests = bb.utils.explode_dep_versions(localdata.getVar("RSUGGESTS", True) or "")
-        rprovides = bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or "")
+        rprovides = deb_explode_dep_ver("RPROVIDES")
         rreplaces = bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or "")
         rconflicts = bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or "")
         if rdepends:
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 11/28] package_rpm.bbclass: Fix incremental rpm image generation
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (9 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 10/28] package_deb.bbclass: don't handle advanced dependency marker as version number Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 12/28] rpm 5.4.0: respect to the arch when choose the alternatives Saul Wold
                   ` (17 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Robert Yang <liezhi.yang@windriver.com>

Fix the incremental rpm image generation, it didn't work since the code
has been changed.

The btmanifest should have a ".manifest" suffix, so that it can be moved
to ${T} by rootfs_rpm.bbclass:
mv ${IMAGE_ROOTFS}/install/*.manifest ${T}/

Note: The locale pkgs would always be re-installed.

[YOCTO #2440]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/package_rpm.bbclass |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 2da7a8b..daa9db4 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -158,28 +158,24 @@ rpm_common_comand () {
 rpm_update_pkg () {
 
     manifest=$1
-    btmanifest=$manifest.bt
+    btmanifest=$manifest.bt.manifest
+    pre_btmanifest=${T}/${btmanifest##/*/}
     local target_rootfs="${INSTALL_ROOTFS_RPM}"
 
     # Save the rpm's build time for incremental image generation, and the file
     # would be moved to ${T}
-    rm -f $btmanifest
     for i in `cat $manifest`; do
         # Use "rpm" rather than "${RPM}" here, since we don't need the
         # '--dbpath' option
-        echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`" >> $btmanifest
-    done
+        echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`"
+    done | sort -u > $btmanifest
 
     # Only install the different pkgs if incremental image generation is set
-    if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest -a \
+    if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" -a \
         "${IMAGE_PKGTYPE}" = "rpm" ]; then
-        cur_list="$btmanifest"
-        pre_list="${T}/total_solution_bt.manifest"
-        sort -u $cur_list -o $cur_list
-        sort -u $pre_list -o $pre_list
-        comm -1 -3 $cur_list $pre_list | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
+        comm -1 -3 $btmanifest $pre_btmanifest | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
             ${target_rootfs}/install/remove.manifest
-        comm -2 -3 $cur_list $pre_list | awk '{print $1}' > \
+        comm -2 -3 $btmanifest $pre_btmanifest | awk '{print $1}' > \
             ${target_rootfs}/install/incremental.manifest
 
         # Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not
@@ -462,7 +458,7 @@ EOF
 	# probably a feature. The only way to convince rpm to actually run the preinstall scripts 
 	# for base-passwd and shadow first before installing packages that depend on these packages 
 	# is to do two image installs, installing one set of packages, then the other.
-	if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest ]; then
+	if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" ]; then
 		echo "Skipping pre install due to exisitng image"
 	else
 		echo "# Initial Install manifest" > ${target_rootfs}/install/initial_install.manifest
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 12/28] rpm 5.4.0: respect to the arch when choose the alternatives
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (10 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 11/28] package_rpm.bbclass: Fix incremental rpm image generation Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 13/28] eglibc: package mtrace separately Saul Wold
                   ` (16 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Robert Yang <liezhi.yang@windriver.com>

There is a bug if we:
1) bitbake diffutils with MACHINE=crownbay
2) bitbake diffutils with MACHINE=qemux86
3) bitbake core-image-sato with MACHINE=crownbay

Then the diffutils.i586 would be installed to the crownbay's image, this
is because diffutils.i586 is newer than diffutils.core2, and rpm doesn't
respect to the arch priorities:

We have put the archs in order in _solve_dbpath:

crownbay/solvedb:core2/solvedb:i586/solvedb:all/solvedb

Fix rpm to respect to the order, for example, if it finds a pkg in both
core2/ and i586/, and the core2/ comes first, it should not use the one
in i586/ even if it's build time is newer.

Note: Don't worry about the _free(*ptr), it can check whether ptr is
NULL or not.

This is for the denzil branch, and the master branch also needs it.

[YOCTO #2360]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 .../rpm/rpm/rpm-respect-arch.patch                 |   67 ++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.0.bb             |    3 +-
 2 files changed, 69 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-respect-arch.patch

diff --git a/meta/recipes-devtools/rpm/rpm/rpm-respect-arch.patch b/meta/recipes-devtools/rpm/rpm/rpm-respect-arch.patch
new file mode 100644
index 0000000..9b63b37
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-respect-arch.patch
@@ -0,0 +1,67 @@
+rpmts.c: respect to the arch priorities
+
+Let rpm respect to the priorities when choose alternatives rpm, the arch
+which comes first is preferred.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ lib/rpmts.c |   14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
+
+diff --git a/lib/rpmts.c b/lib/rpmts.c
+index 3fbbc9e..40ec08e 100644
+--- a/lib/rpmts.c
++++ b/lib/rpmts.c
+@@ -353,6 +353,7 @@ int rpmtsSolve(rpmts ts, rpmds ds, /*@unused@*/ const void * data)
+     Header h = NULL;
+     size_t bhnamelen = 0;
+     time_t bhtime = 0;
++    const char *bharch = NULL;
+     rpmTag rpmtag;
+     const char * keyp;
+     size_t keylen = 0;
+@@ -409,6 +410,7 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __FUNCTION__, ts, ds, data);
+ 	while ((h = rpmmiNext(mi)) != NULL) {
+ 	    size_t hnamelen;
+ 	    time_t htime;
++	    const char *harch = NULL;
+ 
+ 	    if (rpmtag == RPMTAG_PROVIDENAME && !rpmdsAnyMatchesDep(h, ds, 1))
+ 		continue;
+@@ -431,12 +433,23 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __FUNCTION__, ts, ds, data);
+ 	    if (htime <= bhtime)
+ 		continue;
+ 
++	    /* XXX Respect to the arch priorities */
++	    he->tag = RPMTAG_ARCH;
++	    xx = headerGet(h, he, 0);
++	    harch = ((xx && he->p.str) ? xstrdup(he->p.str) : NULL);
++	    he->p.ptr = _free(he->p.ptr);
++	    if (bharch && (strcmp(bharch, harch) != 0))
++		continue;
++
+ 	    /* Save new "best" candidate. */
+ 	    (void)headerFree(bh);
+ 	    bh = NULL;
+ 	    bh = headerLink(h);
+ 	    bhtime = htime;
+ 	    bhnamelen = hnamelen;
++	    bharch = _free(bharch);
++	    bharch = xstrdup(harch);
++	    harch = _free(harch);
+ 	}
+ 	mi = rpmmiFree(mi);
+ 
+@@ -449,6 +462,7 @@ fprintf(stderr, "--> %s(%p,%p,%p)\n", __FUNCTION__, ts, ds, data);
+       } while (1);
+ 
+     }
++    bharch = _free(bharch);
+ 
+     /* Is there a suggested resolution? */
+     if (bh == NULL)
+-- 
+1.7.1
+
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index 5ee6b47..d79d199 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -45,7 +45,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
 DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}"
 extrarpmdeps = "python perl file"
 extrarpmdeps_virtclass-native = "python-native file-native"
-PR = "r36"
+PR = "r37"
 
 # rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
 # in order to extract the distribution SRPM into a format we can extract...
@@ -70,6 +70,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex
 	   file://pythondeps.sh \
 	   file://rpmdeps-oecore.patch \
 	   file://rpm-resolvedep.patch \
+	   file://rpm-respect-arch.patch \
 	  "
 
 #	   file://rpm-autoconf.patch \
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 13/28] eglibc: package mtrace separately
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (11 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 12/28] rpm 5.4.0: respect to the arch when choose the alternatives Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 14/28] ncurses: Avoid occasional builling failure when having parallel processable task Saul Wold
                   ` (15 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Nitin A Kamble <nitin.a.kamble@intel.com>

add libc-mtrace as dependency for task-core-tools-debug

now eglibc-mtrace gets included in an sdk image and not in a non-sdk image.

This does not affect builds with uclibc.

This fixes bug: [YOCTO# 2374]

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 meta/recipes-core/eglibc/eglibc-package.inc      |    7 ++++++-
 meta/recipes-core/eglibc/eglibc_2.13.bb          |    2 +-
 meta/recipes-core/tasks/task-core-tools-debug.bb |    4 ++++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index 7d97567..ce37155 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -20,11 +20,12 @@ USE_LDCONFIG ?= "1"
 PKGSUFFIX = ""
 PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
 
-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}-staticdev ${PN}-doc libcidn${PKGSUFFIX} libmemusage${PKGSUFFIX} libsegfault${PKGSUFFIX} ${PN}-pcprofile libsotruss${PKGSUFFIX}"
+PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} ldd${PKGSUFFIX} ${PN}-mtrace ${PN}-utils eglibc-extra-nss${PKGSUFFIX} eglibc-thread-db${PKGSUFFIX} ${PN}-pic ${PN}-dev ${PN}-staticdev ${PN}-doc libcidn${PKGSUFFIX} libmemusage${PKGSUFFIX} libsegfault${PKGSUFFIX} ${PN}-pcprofile libsotruss${PKGSUFFIX}"
 
 # The ld.so in this eglibc supports the GNU_HASH
 RPROVIDES_${PN} = "glibc${PKGSUFFIX} rtld(GNU_HASH)"
 RPROVIDES_${PN}-utils = "glibc${PKGSUFFIX}-utils"
+RPROVIDES_${PN}-mtrace = "glibc${PKGSUFFIX}-mtrace libc-mtrace"
 RPROVIDES_${PN}-pic = "glibc${PKGSUFFIX}-pic"
 RPROVIDES_${PN}-dev = "glibc${PKGSUFFIX}-dev"
 RPROVIDES_${PN}-staticdev = "glibc${PKGSUFFIX}-staticdev"
@@ -48,11 +49,13 @@ FILES_${PN}-dev_append += "${bindir}/rpcgen ${libdir}/*_nonshared.a \
 	${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
 FILES_${PN}-staticdev_append += "${libdir}/*.a ${base_libdir}/*.a"
 FILES_nscd${PKGSUFFIX} = "${sbindir}/nscd*"
+FILES_${PN}-mtrace = "${bindir}/mtrace"
 FILES_${PN}-utils = "${bindir}/* ${sbindir}/*"
 FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/audit/.debug"
 FILES_catchsegv${PKGSUFFIX} = "${bindir}/catchsegv"
 RDEPENDS_catchsegv${PKGSUFFIX} = "libsegfault"
 RDEPENDS_${PN}-utils += "bash"
+RDEPENDS_${PN}-mtrace += "perl"
 FILES_${PN}-pcprofile = "${base_libdir}/libpcprofile.so"
 FILES_eglibc-thread-db${PKGSUFFIX} = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so"
 RPROVIDES_${PN}-dev += "libc-dev"
@@ -68,6 +71,8 @@ SUMMARY_ldd = "print shared library dependencies"
 DESCRIPTION_ldd = "/usr/bin/ldd prints shared library dependencies for each program or shared library specified on the command line."
 SUMMARY_${PN}-utils = "Miscellaneous utilities provided by eglibc"
 DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..."
+SUMMARY_${PN}-mtrace = "mtrace utility provided by eglibc"
+DESCRIPTION_${PN}-mtrace = "mtrace utility provided by eglibc"
 DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
 
 inherit libc-common multilib_header
diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
index d8a41dc..73cd0aa 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 = "15508"
 
 DEPENDS += "gperf-native"
-PR = "r26"
+PR = "r27"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_13"
diff --git a/meta/recipes-core/tasks/task-core-tools-debug.bb b/meta/recipes-core/tasks/task-core-tools-debug.bb
index 3c92f3f..1dddbb8 100644
--- a/meta/recipes-core/tasks/task-core-tools-debug.bb
+++ b/meta/recipes-core/tasks/task-core-tools-debug.bb
@@ -17,10 +17,14 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 ALLOW_EMPTY = "1"
 
+MTRACE = ""
+MTRACE_libc-glibc = "libc-mtrace"
+
 RDEPENDS_${PN} = "\
     gdb \
     gdbserver \
     tcf-agent \
     rsync \
     strace \
+    ${MTRACE} \
     "
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 14/28] ncurses: Avoid occasional builling failure when having parallel processable task
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (12 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 13/28] eglibc: package mtrace separately Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 15/28] libtool: fixed parallel build related race Saul Wold
                   ` (14 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

ncurses failure non-gplv3 build (race issue) like the following \
error information:

| tic: error while loading shared libraries: /srv/home/pokybuild \
/yocto-autobuilder/yocto-slave/nightly-non-gpl3/build/build/tmp/\
work/x86_64-linux/ncurses-native-5.9-r8.1/ncurses-5.9/narrowc/lib\
/libtinfo.so.5: file too short
| ? tic could not build /srv/home/pokybuild/yocto-autobuilder/\
yocto-slave/nightly-non-gpl3/build/build/tmp/work/x86_64-linux/\
ncurses-native-5.9-r8.1/image/srv/home/pokybuild/yocto-autobuilder\
/yocto-slave/nightly-non-gpl3/build/build/tmp/sysroots/x86_64-linux\
/usr/share/terminfo
| make[1]: *** [install.data] Error 1

This is a race issue which is caused by
install.libs and install.data:

1) install.data needs run tic
2) tic needs libtinfo.so
3) install.libs would regenerate libtinfo.so
4) but install.data doesn't depend on install.libs, and they can run
   parallelly

So there would be errors in a very critical condition: tic is begining
to run at the same time when install.libs is generating libtinfo.so, and
this libtinfo.so is not integrity, then there would be the  above error.

Let task install.libs run before install.data for fixing this bug.

[YOCTO #2298]

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-core/ncurses/ncurses.inc |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index ae99e2c..b031119 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc
 SECTION = "libs"
 DEPENDS = "ncurses-native"
 DEPENDS_virtclass-native = ""
-INC_PR = "r8"
+INC_PR = "r9"
 
 inherit autotools binconfig multilib_header
 
@@ -107,10 +107,15 @@ do_test() {
         diff curses-narrowc.h curses-widec.h
 }
 
+# Split original _install_opts to two parts.
+# One is the options to install contents, the other is the parameters \
+# when running command "make install"
 _install_opts = "\
+  install.libs install.includes install.man \
+"
+_install_cfgs = "\
   DESTDIR='${D}' \
   PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
-  install.libs install.includes install.man \
 "
 
 python do_install () {
@@ -122,11 +127,19 @@ shell_do_install() {
         # Order of installation is important; widec installs a 'curses.h'
         # header with more definitions and must be installed last hence.
         # Compatibility of these headers will be checked in 'do_test()'.
-        oe_runmake -C narrowc ${_install_opts} \
-                install.data install.progs
+        oe_runmake -C narrowc ${_install_cfgs} ${_install_opts} \
+                install.progs
+
+        # The install.data should run after install.libs, otherwise
+        # there would be a race issue in a very critical conditon, since
+        # tic will be run by install.data, and tic needs libtinfo.so
+        # which would be regenerated by install.libs.
+        oe_runmake -C narrowc ${_install_cfgs} \
+                install.data
+
 
         ! ${ENABLE_WIDEC} || \
-            oe_runmake -C widec ${_install_opts}
+            oe_runmake -C widec ${_install_cfgs} ${_install_opts}
 
         cd narrowc
 
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 15/28] libtool: fixed parallel build related race
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (13 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 14/28] ncurses: Avoid occasional builling failure when having parallel processable task Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 16/28] ppp: avoid host contamination Saul Wold
                   ` (13 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>

While building libtool, the libtool script itself will be regenerated
because OE modifies a dependency[1]. With -jX, this operation (-->
removal, creation of non-x file, 'chmod a+x') can happen at a time when
the script is going to be executed.  This can cause errors like:

| arm-linux-gnueabi-libtool: compile:  ccache arm-linux-gnueabi-gcc ...
| ...
| /bin/sh ./config.status libtool
| ...
| arm-linux-gnueabi-libtool: compile:  ccache arm-linux-gnueabi-gcc ...
| /bin/sh: ./arm-linux-gnueabi-libtool: Permission denied
| make[2]: *** [libltdl/libltdl_libltdl_la-lt__alloc.lo] Error 126

I am not sure whether the custom do_compile_prepend() is still needed.
For now only the issue above will be fixed by executing ./config.status
yet again.

[1] see 648290d5bf4d6ff50d3643bb7ad902dfc23aa702

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 meta/recipes-devtools/libtool/libtool-2.4.2.inc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/libtool/libtool-2.4.2.inc b/meta/recipes-devtools/libtool/libtool-2.4.2.inc
index 084062a..c1ef7c4 100644
--- a/meta/recipes-devtools/libtool/libtool-2.4.2.inc
+++ b/meta/recipes-devtools/libtool/libtool-2.4.2.inc
@@ -8,7 +8,7 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
     file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
 
-INC_PR = "r2"
+INC_PR = "r3"
 
 SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
            file://trailingslash.patch \
@@ -27,6 +27,7 @@ do_compile_prepend () {
 	# Sometimes this file doesn't get rebuilt, force the issue
 	rm -f ${S}/libltdl/config/ltmain.sh
 	make libltdl/config/ltmain.sh
+	./config.status
 }
 
 inherit autotools
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 16/28] ppp: avoid host contamination
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (14 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 15/28] libtool: fixed parallel build related race Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 17/28] libnss-mdns: fix postinst scripts Saul Wold
                   ` (12 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Andreas Oberritter <obi@opendreambox.org>

* Import patch from OE-Classic commit f7c547ede1bfc94c24f6315a23ff48a4c5b9ffaf.
* Fixes linking with libpcap (ppp filter).

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 .../makefile-remove-hard-usr-reference.patch       |   16 ++++++++++++++++
 meta/recipes-connectivity/ppp/ppp_2.4.5.bb         |    2 +-
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
index 8cc354a..d59717e 100644
--- a/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
@@ -1,6 +1,9 @@
 The patch comes from OpenEmbedded.
 Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
 
+Updated from OE-Classic to include the pcap hunk.
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+
 Upstream-Status: Inappropriate [configuration]
 
 diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
@@ -19,3 +22,16 @@ diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
  
  ifdef NEEDDES
  ifndef USE_CRYPT
+@@ -169,10 +169,10 @@
+ endif
+ 
+ ifdef FILTER
+-ifneq ($(wildcard /usr/include/pcap-bpf.h),)
++#ifneq ($(wildcard /usr/include/pcap-bpf.h),)
+ LIBS    += -lpcap
+ CFLAGS  += -DPPP_FILTER
+-endif
++#endif
+ endif
+ 
+ ifdef HAVE_INET6
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.5.bb b/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
index ed815d3..587871a 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77
                     file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
                     file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
                     file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
-PR = "r4"
+PR = "r5"
 
 SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
            file://makefile.patch \
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 17/28] libnss-mdns: fix postinst scripts
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (15 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 16/28] ppp: avoid host contamination Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 18/28] wpa-supplicant: fix packaging error since last commit Saul Wold
                   ` (11 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Andreas Oberritter <obi@opendreambox.org>

* On upgrade, postinst ocassionally returned 1, so use a
  conditional instead of &&.
* Use sed patterns in order to make it work more generally.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 .../libnss-mdns/libnss-mdns_0.10.bb                |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
index 8770714..a1f2f9a 100644
--- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
 DEPENDS = "avahi"
 RDEPENDS_${PN} = "avahi-daemon"
-PR = "r4"
+PR = "r5"
 
 SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
 
@@ -23,15 +23,14 @@ DEBIANNAME_${PN} = "libnss-mdns"
 
 EXTRA_OECONF = "--libdir=${base_libdir} --disable-lynx --enable-avahi"
 
-# TODO: pattern based configuration update
 pkg_postinst_${PN} () {
-	cat $D/etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
-		sed -i 's/hosts:\s*files dns/& mdns4/' $D/etc/nsswitch.conf
-	}
+if ! grep -q '^hosts:.*\<mdns4\>' $D/etc/nsswitch.conf; then
+	sed -e 's/^hosts:.*/& mdns4/' -i $D/etc/nsswitch.conf
+fi
 }
 
 pkg_prerm_${PN} () {
-	cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns4$" > /dev/null && {
-		sed -i 's/\(hosts:\s*files dns\) mdns4*/\1/' /etc/nsswitch.conf
-	}
+if grep -q '^hosts:.*\<mdns4\>' /etc/nsswitch.conf; then
+	sed -e '/^hosts:/s/\s\<mdns4\>//' -i /etc/nsswitch.conf
+fi
 }
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 18/28] wpa-supplicant: fix packaging error since last commit
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (16 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 17/28] libnss-mdns: fix postinst scripts Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 19/28] netbase: merge init script updates from upstream Saul Wold
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Andreas Oberritter <obi@opendreambox.org>

* wpa-passphrase has its own package, but commit
  4a4c568e25a08e9f222d723f9819582c9f895c58 broke it.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 .../wpa-supplicant/wpa-supplicant-0.7.inc          |    2 +-
 .../wpa-supplicant/wpa-supplicant_0.7.3.bb         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc
index aabb3df..b489893 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc
@@ -19,7 +19,7 @@ SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \
 S = "${WORKDIR}/wpa_supplicant-${PV}/wpa_supplicant"
 
 PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli "
-FILES_wpa-supplicant-passphrase = "${sbindir}/wpa_passphrase"
+FILES_wpa-supplicant-passphrase = "${bindir}/wpa_passphrase"
 FILES_wpa-supplicant-cli = "${sbindir}/wpa_cli"
 FILES_${PN} += "${datadir}/dbus-1/system-services/*"
 
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_0.7.3.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_0.7.3.bb
index dc2eb6c..1e0086a 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_0.7.3.bb
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_0.7.3.bb
@@ -1,6 +1,6 @@
 require wpa-supplicant-0.7.inc
 
-PR = "r9"
+PR = "r10"
 
 SRC_URI[md5sum] = "f516f191384a9a546e3f5145c08addda"
 SRC_URI[sha256sum] = "d0cd50caa85346ccc376dcda5ed3c258eef19a93b3cade39d25760118ad59443"
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 19/28] netbase: merge init script updates from upstream
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (17 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 18/28] wpa-supplicant: fix packaging error since last commit Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 20/28] distutils.bbclass: don't delete .pyo files Saul Wold
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Andreas Oberritter <obi@opendreambox.org>

* Read /proc/mounts only once.
* Support many more network filesystem types.
* Remaining differences to netbase 4.47:
  - Uses the mountvirtfs keyword instead of mountkernfs
  - Doesn't use lsb functions
  - Doesn't print a warning if /etc/network/options exists
  - Doesn't use --exclude parameter for ifup, because
    busybox doesn't support it.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/recipes-core/netbase/netbase-4.47/init |  101 ++++++++++++++++++---------
 meta/recipes-core/netbase/netbase_4.47.bb   |    2 +-
 2 files changed, 70 insertions(+), 33 deletions(-)

diff --git a/meta/recipes-core/netbase/netbase-4.47/init b/meta/recipes-core/netbase/netbase-4.47/init
index 8a67e1c..bace9df 100644
--- a/meta/recipes-core/netbase/netbase-4.47/init
+++ b/meta/recipes-core/netbase/netbase-4.47/init
@@ -1,52 +1,89 @@
-#!/bin/sh
-#
+#!/bin/sh -e
 ### BEGIN INIT INFO
 # Provides:          networking
-# Required-Start:    $local_fs mountvirtfs
+# Required-Start:    mountvirtfs $local_fs
 # Required-Stop:     $local_fs
+# Should-Start:      ifupdown
+# Should-Stop:       ifupdown
 # Default-Start:     S
 # Default-Stop:      0 6
-# Short-Description: Raise network interfaces and configure them
+# Short-Description: Raise network interfaces.
 ### END INIT INFO
 
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
 
-if ! [ -x /sbin/ifup ]; then
-    exit 0
-fi
+[ -x /sbin/ifup ] || exit 0
+
+check_network_file_systems() {
+    [ -e /proc/mounts ] || return 0
+
+    if [ -e /etc/iscsi/iscsi.initramfs ]; then
+	echo "not deconfiguring network interfaces: iSCSI root is mounted."
+	exit 0
+    fi
+
+    exec 9<&0 < /proc/mounts
+    while read DEV MTPT FSTYPE REST; do
+	case $DEV in
+	/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
+	    echo "not deconfiguring network interfaces: network devices still mounted."
+	    exit 0
+	    ;;
+	esac
+	case $FSTYPE in
+	nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
+	    echo "not deconfiguring network interfaces: network file systems still mounted."
+	    exit 0
+	    ;;
+	esac
+    done
+    exec 0<&9 9<&-
+}
+
+check_network_swap() {
+    [ -e /proc/swaps ] || return 0
+
+    exec 9<&0 < /proc/swaps
+    while read DEV MTPT FSTYPE REST; do
+	case $DEV in
+	/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
+	    echo "not deconfiguring network interfaces: network swap still mounted."
+	    exit 0
+	    ;;
+	esac
+    done
+    exec 0<&9 9<&-
+}
 
 case "$1" in
-    start)
-        echo -n "Configuring network interfaces... "
-        ifup -a
+start)
+	echo -n "Configuring network interfaces... "
+	ifup -a
 	echo "done."
 	;;
-    stop)
-        if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts | 
-          grep -q "^/ nfs$"; then
-            echo "NOT deconfiguring network interfaces: / is an NFS mount"
-        elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |  
-          grep -q "^/ smbfs$"; then
-            echo "NOT deconfiguring network interfaces: / is an SMB mount"
-	elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts | 
-          grep -qE '^(nfs|smbfs|ncp|coda)$'; then
-            echo "NOT deconfiguring network interfaces: network shares still mounted."
-        else
-            echo -n "Deconfiguring network interfaces... "
-            ifdown -a
-	    echo "done."
-        fi
+
+stop)
+	check_network_file_systems
+	check_network_swap
+
+	echo -n "Deconfiguring network interfaces... "
+	ifdown -a
+	echo "done."
 	;;
-    force-reload|restart)
-        echo -n "Reconfiguring network interfaces... "
-        ifdown -a
-        ifup -a
+
+force-reload|restart)
+	echo "Running $0 $1 is deprecated because it may not enable again some interfaces"
+	echo "Reconfiguring network interfaces... "
+	ifdown -a || true
+	ifup -a
 	echo "done."
 	;;
-    *)
-	echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"
+
+*)
+	echo "Usage: /etc/init.d/networking {start|stop}"
 	exit 1
 	;;
 esac
 
 exit 0
+
diff --git a/meta/recipes-core/netbase/netbase_4.47.bb b/meta/recipes-core/netbase/netbase_4.47.bb
index 1c85997..634560a 100644
--- a/meta/recipes-core/netbase/netbase_4.47.bb
+++ b/meta/recipes-core/netbase/netbase_4.47.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "http://packages.debian.org/netbase"
 SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
-PR = "r2"
+PR = "r3"
 
 inherit update-rc.d
 
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 20/28] distutils.bbclass: don't delete .pyo files
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (18 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 19/28] netbase: merge init script updates from upstream Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 21/28] python: bump PR of packages after update of distutils.bbclass Saul Wold
                   ` (8 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Andreas Oberritter <obi@opendreambox.org>

* Deleting .pyo files causes them to get compiled on the target.
* First boot gets *really* slow for python based projects.
* No space gets saved on the target.
* The package manager doesn't know about the files and
  therefore fails to uninstall them, occupying space and causing
  uninstalled python scripts to remain executable.
* It's inconsistent, because python itself and autotools based
  projects already ship .pyo files.
* Probably .pyo files were deleted because .pyc files were
  available earlier, but this has changed and OE-Core's python
  now only generates optimized .pyo files. Deletion of .pyo was
  introduced in 2008, python/04-default-is-optimized.patch
  was introduced in 2009.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/classes/distutils.bbclass |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 18ae805..bcddf8d 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -65,10 +65,6 @@ distutils_do_install() {
         if test -e ${D}${datadir}/share; then
             mv -f ${D}${datadir}/share/* ${D}${datadir}/
         fi
-
-        # These are generated files, on really slow systems the storage/speed trade off
-        # might be worth it, but in general it isn't 
-        find ${D}${libdir}/${PYTHON_DIR}/site-packages -iname '*.pyo' -exec rm {} \;
 }
 
 EXPORT_FUNCTIONS do_compile do_install
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 21/28] python: bump PR of packages after update of distutils.bbclass
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (19 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 20/28] distutils.bbclass: don't delete .pyo files Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 22/28] Revert "sanity.bbclass: check user can read and write to SSTATE_DIR" Saul Wold
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Andreas Oberritter <obi@opendreambox.org>

* Bump every recipe inheriting distutils or setuptools and
  not overriding do_install without calling distutils_do_install.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 .../python/python-argparse_1.2.1.bb                |    2 +-
 .../python/python-imaging_1.1.7.bb                 |    2 +-
 .../python/python-pycurl_7.19.0.bb                 |    2 +-
 meta/recipes-devtools/python/python-pyrex_0.9.9.bb |    2 +-
 meta/recipes-devtools/python/python-scons_2.1.0.bb |    2 +-
 .../python/python-setuptools_0.6c11.bb             |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/python/python-argparse_1.2.1.bb b/meta/recipes-devtools/python/python-argparse_1.2.1.bb
index 789cee1..7c15575 100644
--- a/meta/recipes-devtools/python/python-argparse_1.2.1.bb
+++ b/meta/recipes-devtools/python/python-argparse_1.2.1.bb
@@ -3,7 +3,7 @@ SECTION = "devel/python"
 LICENSE = "PSF"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=09d08bb5b7047e2688ea3faad6408aa8"
 SRCNAME = "argparse"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://argparse.googlecode.com/files/${SRCNAME}-${PV}.tar.gz"
 SRC_URI[md5sum] = "2fbef8cb61e506c706957ab6e135840c"
diff --git a/meta/recipes-devtools/python/python-imaging_1.1.7.bb b/meta/recipes-devtools/python/python-imaging_1.1.7.bb
index 6d9743e..a36c344 100644
--- a/meta/recipes-devtools/python/python-imaging_1.1.7.bb
+++ b/meta/recipes-devtools/python/python-imaging_1.1.7.bb
@@ -4,7 +4,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://README;beginline=92;endline=120;md5=c4371af4579f1e489cf881c1443dd4ec"
 DEPENDS = "freetype jpeg tiff"
 SRCNAME = "Imaging"
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \
            file://0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch"
diff --git a/meta/recipes-devtools/python/python-pycurl_7.19.0.bb b/meta/recipes-devtools/python/python-pycurl_7.19.0.bb
index 8b849d7..122e1bd 100644
--- a/meta/recipes-devtools/python/python-pycurl_7.19.0.bb
+++ b/meta/recipes-devtools/python/python-pycurl_7.19.0.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://README;endline=13;md5=fbfe545b1869617123a08c0983ef17b
 DEPENDS = "curl python"
 RDEPENDS_${PN} = "python-core curl"
 SRCNAME = "pycurl"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "\
   http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \
diff --git a/meta/recipes-devtools/python/python-pyrex_0.9.9.bb b/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
index 568fb0d..0ae35b0 100644
--- a/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
+++ b/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
@@ -5,7 +5,7 @@ SECTION = "devel/python"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=771d472f53f933033f57eeee7808e5bd"
 SRCNAME = "Pyrex"
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "\
   http://www.cosc.canterbury.ac.nz/greg.ewing/python/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
diff --git a/meta/recipes-devtools/python/python-scons_2.1.0.bb b/meta/recipes-devtools/python/python-scons_2.1.0.bb
index f0b5b1f..8c5aa07 100644
--- a/meta/recipes-devtools/python/python-scons_2.1.0.bb
+++ b/meta/recipes-devtools/python/python-scons_2.1.0.bb
@@ -4,7 +4,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ab8b65435c2e520ed18e67459f1f9bb9"
 SRCNAME = "scons"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
 
diff --git a/meta/recipes-devtools/python/python-setuptools_0.6c11.bb b/meta/recipes-devtools/python/python-setuptools_0.6c11.bb
index 5dd5f31..a769714 100644
--- a/meta/recipes-devtools/python/python-setuptools_0.6c11.bb
+++ b/meta/recipes-devtools/python/python-setuptools_0.6c11.bb
@@ -5,7 +5,7 @@ LICENSE = "PSF"
 LIC_FILES_CHKSUM = "file://setup.py;beginline=23;endline=23;md5=8a314270dd7a8dbca741775415f1716e"
 
 SRCNAME = "setuptools"
-PR = "ml3"
+PR = "ml4"
 DEPENDS += "python"
 DEPENDS_virtclass-native += "python-native"
 
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 22/28] Revert "sanity.bbclass: check user can read and write to SSTATE_DIR"
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (20 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 21/28] python: bump PR of packages after update of distutils.bbclass Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 23/28] sanity.bbclass: copy the data store and finalise before running checks Saul Wold
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

This has caused problems for several users, including the Yocto Project
autobuilder. Since the message was added in order to be more user friendly
revert the change.

This reverts commit 0c0c4efbf92bcf0f8942f17c18525a4b4ed1798c.
---
 meta/classes/sanity.bbclass |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ff3c413..05545f4 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -96,16 +96,10 @@ def check_conf_exists(fn, data):
 def check_sanity_sstate_dir_change(sstate_dir, data):
     # Sanity checks to be done when the value of SSTATE_DIR changes
 
+    # Check that SSTATE_DIR isn't on a filesystem with limited filename length (eg. eCryptFS)
     testmsg = ""
     if sstate_dir != "":
-        # Check that the user can read and write to SSTATE_DIR
-        sstatemsg = check_can_read_write_directory(sstate_dir) or None
-        if sstatemsg:
-            sstatemsg = sstatemsg + ". You could try using it as an SSTATE_MIRRORS instead of SSTATE_CACHE.\n"
-            testmsg = testmsg + sstatemsg
-        # Check that SSTATE_DIR isn't on a filesystem with limited filename length (eg. eCryptFS)
-        testmsg = testmsg + check_create_long_filename(sstate_dir, "SSTATE_DIR")
-
+        testmsg = check_create_long_filename(sstate_dir, "SSTATE_DIR")
     return testmsg
 
 def check_sanity_tmpdir_change(tmpdir, data):
@@ -156,12 +150,7 @@ def check_create_long_filename(filepath, pathname):
         if errno == 36: # ENAMETOOLONG
             return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname
         else:
-            return "Failed to create a file in %s: %s\n" % (pathname, strerror)
-    return ""
-
-def check_can_read_write_directory(directory):
-    if not os.access(directory, os.R_OK|os.W_OK):
-       return "Insufficient permissions for %s" % directory
+            return "Failed to create a file in %s: %s" % (pathname, strerror)
     return ""
 
 def check_connectivity(d):
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 23/28] sanity.bbclass: copy the data store and finalise before running checks
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (21 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 22/28] Revert "sanity.bbclass: check user can read and write to SSTATE_DIR" Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 24/28] sanity.bbclass: data.getVar(VAR, obj, exp) -> obj.getVar(VAR, exp) Saul Wold
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

At the ConfigParsed event the datastore has yet to be finalised and thus
appends and overrides have not been set.
To ensure the sanity check is being run against the configuration values
the user has set call finalize() on a copy of the datastore and pass that
for all sanity checks.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/classes/sanity.bbclass |  129 +++++++++++++++++++++++--------------------
 1 files changed, 69 insertions(+), 60 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 05545f4..5361f1f 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -182,8 +182,8 @@ def check_connectivity(d):
 
     return retval
 
-def check_supported_distro(e):
-    tested_distros = e.data.getVar('SANITY_TESTED_DISTROS', True)
+def check_supported_distro(sanity_data):
+    tested_distros = sanity_data.getVar('SANITY_TESTED_DISTROS', True)
     if not tested_distros:
         return
 
@@ -230,26 +230,26 @@ def check_supported_distro(e):
         bb.warn('Host distribution could not be determined; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.')
 
 # Checks we should only make if MACHINE is set correctly
-def check_sanity_validmachine(e):
+def check_sanity_validmachine(sanity_data):
     from bb import data
 
     messages = ""
 
     # Check TUNE_ARCH is set
-    if data.getVar('TUNE_ARCH', e.data, True) == 'INVALID':
+    if data.getVar('TUNE_ARCH', sanity_data, True) == 'INVALID':
         messages = messages + 'TUNE_ARCH is unset. Please ensure your MACHINE configuration includes a valid tune configuration file which will set this correctly.\n'
 
     # Check TARGET_ARCH is set correctly
-    if data.getVar('TARGE_ARCH', e.data, False) == '${TUNE_ARCH}':
+    if data.getVar('TARGE_ARCH', sanity_data, False) == '${TUNE_ARCH}':
         messages = messages + 'TARGET_ARCH is being overwritten, likely by your MACHINE configuration files.\nPlease use a valid tune configuration file which should set this correctly automatically\nand avoid setting this in the machine configuration. See the OE-Core mailing list for more information.\n'
     
     # Check TARGET_OS is set
-    if data.getVar('TARGET_OS', e.data, True) == 'INVALID':
+    if data.getVar('TARGET_OS', sanity_data, True) == 'INVALID':
         messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n'
 
     # Check that we don't have duplicate entries in PACKAGE_ARCHS & that TUNE_PKGARCH is in PACKAGE_ARCHS
-    pkgarchs = data.getVar('PACKAGE_ARCHS', e.data, True)
-    tunepkg = data.getVar('TUNE_PKGARCH', e.data, True)
+    pkgarchs = data.getVar('PACKAGE_ARCHS', sanity_data, True)
+    tunepkg = data.getVar('TUNE_PKGARCH', sanity_data, True)
     tunefound = False
     seen = {}
     dups = []
@@ -271,7 +271,7 @@ def check_sanity_validmachine(e):
     return messages
 
 
-def check_sanity(e):
+def check_sanity(sanity_data):
     from bb import note, error, data, __version__
 
     try:
@@ -281,7 +281,7 @@ def check_sanity(e):
     import commands
 
     # Check the bitbake version meets minimum requirements
-    minversion = data.getVar('BB_MIN_VERSION', e.data , True)
+    minversion = data.getVar('BB_MIN_VERSION', sanity_data , True)
     if not minversion:
         # Hack: BB_MIN_VERSION hasn't been parsed yet so return 
         # and wait for the next call
@@ -303,42 +303,42 @@ def check_sanity(e):
         messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__)
 
     # Check that the MACHINE is valid, if it is set
-    if data.getVar('MACHINE', e.data, True):
-        if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data):
+    if data.getVar('MACHINE', sanity_data, True):
+        if not check_conf_exists("conf/machine/${MACHINE}.conf", sanity_data):
             messages = messages + 'Please set a valid MACHINE in your local.conf or environment\n'
         else:
-            messages = messages + check_sanity_validmachine(e)
+            messages = messages + check_sanity_validmachine(sanity_data)
     else:
         messages = messages + 'Please set a MACHINE in your local.conf or environment\n'
 
     # Check we are using a valid lacal.conf
-    current_conf  = data.getVar('CONF_VERSION', e.data, True)
-    conf_version =  data.getVar('LOCALCONF_VERSION', e.data, True)
+    current_conf  = data.getVar('CONF_VERSION', sanity_data, True)
+    conf_version =  data.getVar('LOCALCONF_VERSION', sanity_data, True)
 
     if current_conf != conf_version:
         messages = messages + "Your version of local.conf was generated from an older version of local.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/local.conf conf/local.conf.sample\" is a good way to visualise the changes.\n"
 
     # Check bblayers.conf is valid
-    current_lconf = data.getVar('LCONF_VERSION', e.data, True)
-    lconf_version = data.getVar('LAYER_CONF_VERSION', e.data, True)
+    current_lconf = data.getVar('LCONF_VERSION', sanity_data, True)
+    lconf_version = data.getVar('LAYER_CONF_VERSION', sanity_data, True)
     if current_lconf != lconf_version:
         messages = messages + "Your version of bblayers.conf was generated from an older version of bblayers.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/bblayers.conf conf/bblayers.conf.sample\" is a good way to visualise the changes.\n"
 
     # If we have a site.conf, check it's valid
-    if check_conf_exists("conf/site.conf", e.data):
-        current_sconf = data.getVar('SCONF_VERSION', e.data, True)
-        sconf_version = data.getVar('SITE_CONF_VERSION', e.data, True)
+    if check_conf_exists("conf/site.conf", sanity_data):
+        current_sconf = data.getVar('SCONF_VERSION', sanity_data, True)
+        sconf_version = data.getVar('SITE_CONF_VERSION', sanity_data, True)
         if current_sconf != sconf_version:
             messages = messages + "Your version of site.conf was generated from an older version of site.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/site.conf conf/site.conf.sample\" is a good way to visualise the changes.\n"
 
-    assume_provided = data.getVar('ASSUME_PROVIDED', e.data , True).split()
+    assume_provided = data.getVar('ASSUME_PROVIDED', sanity_data , True).split()
     # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
     if "diffstat-native" not in assume_provided:
         messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n'
 
     # Check that DL_DIR is set, exists and is writable. In theory, we should never even hit the check if DL_DIR isn't 
     # set, since so much relies on it being set.
-    dldir = data.getVar('DL_DIR', e.data, True)
+    dldir = data.getVar('DL_DIR', sanity_data, True)
     if not dldir:
         messages = messages + "DL_DIR is not set. Your environment is misconfigured, check that DL_DIR is set, and if the directory exists, that it is writable. \n"
     if os.path.exists(dldir) and not os.access(dldir, os.W_OK):
@@ -346,33 +346,33 @@ def check_sanity(e):
     
     # Check that the DISTRO is valid, if set
     # need to take into account DISTRO renaming DISTRO
-    distro = data.getVar('DISTRO', e.data, True)
+    distro = data.getVar('DISTRO', sanity_data, True)
     if distro:
-        if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
-            messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )
+        if not ( check_conf_exists("conf/distro/${DISTRO}.conf", sanity_data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", sanity_data) ):
+            messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", sanity_data, True )
 
     missing = ""
 
-    if not check_app_exists("${MAKE}", e.data):
+    if not check_app_exists("${MAKE}", sanity_data):
         missing = missing + "GNU make,"
 
-    if not check_app_exists('${BUILD_PREFIX}gcc', e.data):
-        missing = missing + "C Compiler (%sgcc)," % data.getVar("BUILD_PREFIX", e.data, True)
+    if not check_app_exists('${BUILD_PREFIX}gcc', sanity_data):
+        missing = missing + "C Compiler (%sgcc)," % data.getVar("BUILD_PREFIX", sanity_data, True)
 
-    if not check_app_exists('${BUILD_PREFIX}g++', e.data):
-        missing = missing + "C++ Compiler (%sg++)," % data.getVar("BUILD_PREFIX", e.data, True)
+    if not check_app_exists('${BUILD_PREFIX}g++', sanity_data):
+        missing = missing + "C++ Compiler (%sg++)," % data.getVar("BUILD_PREFIX", sanity_data, True)
 
-    required_utilities = e.data.getVar('SANITY_REQUIRED_UTILITIES', True)
+    required_utilities = sanity_data.getVar('SANITY_REQUIRED_UTILITIES', True)
 
     if "qemu-native" in assume_provided:
-        if not check_app_exists("qemu-arm", e.data):
+        if not check_app_exists("qemu-arm", sanity_data):
             messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
 
-    paths = data.getVar('PATH', e.data, True).split(":")
+    paths = data.getVar('PATH', sanity_data, True).split(":")
     if "." in paths or "" in paths:
         messages = messages + "PATH contains '.' or '', which will break the build, please remove this."
 
-    if data.getVar('TARGET_ARCH', e.data, True) == "arm":
+    if data.getVar('TARGET_ARCH', sanity_data, True) == "arm":
         # This path is no longer user-readable in modern (very recent) Linux
         try:
             if os.path.exists("/proc/sys/vm/mmap_min_addr"):
@@ -386,7 +386,7 @@ def check_sanity(e):
             pass
 
     for util in required_utilities.split():
-        if not check_app_exists( util, e.data ):
+        if not check_app_exists( util, sanity_data ):
             missing = missing + "%s," % util
 
     if missing != "":
@@ -397,13 +397,13 @@ def check_sanity(e):
     if pseudo_msg != "":
         messages = messages + pseudo_msg + '\n'
 
-    check_supported_distro(e)
-    toolchain_msg = check_toolchain(e.data)
+    check_supported_distro(sanity_data)
+    toolchain_msg = check_toolchain(sanity_data)
     if toolchain_msg != "":
         messages = messages + toolchain_msg + '\n'
 
     # Check if DISPLAY is set if IMAGETEST is set
-    if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu':
+    if not data.getVar( 'DISPLAY', sanity_data, True ) and data.getVar( 'IMAGETEST', sanity_data, True ) == 'qemu':
         messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
 
     omask = os.umask(022)
@@ -411,11 +411,11 @@ def check_sanity(e):
         messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
     os.umask(omask)
 
-    oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
+    oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', sanity_data, True )
     if not oes_bb_conf:
         messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n'
 
-    nolibs = data.getVar('NO32LIBS', e.data, True)
+    nolibs = data.getVar('NO32LIBS', sanity_data, True)
     if not nolibs:
         lib32path = '/lib'
         if os.path.exists('/lib64') and ( os.path.islink('/lib64') or os.path.islink('/lib') ):
@@ -424,8 +424,8 @@ def check_sanity(e):
         if os.path.exists('%s/libc.so.6' % lib32path) and not os.path.exists('/usr/include/gnu/stubs-32.h'):
             messages = messages + "You have a 32-bit libc, but no 32-bit headers.  You must install the 32-bit libc headers.\n"
 
-    tmpdir = data.getVar('TMPDIR', e.data, True)
-    sstate_dir = data.getVar('SSTATE_DIR', e.data, True)
+    tmpdir = data.getVar('TMPDIR', sanity_data, True)
+    sstate_dir = data.getVar('SSTATE_DIR', sanity_data, True)
 
     # Check saved sanity info
     last_sanity_version = 0
@@ -442,16 +442,16 @@ def check_sanity(e):
             if line.startswith('SSTATE_DIR'):
                 last_sstate_dir = line.split()[1]
     
-    sanity_version = int(data.getVar('SANITY_VERSION', e.data, True) or 1)
+    sanity_version = int(data.getVar('SANITY_VERSION', sanity_data, True) or 1)
     if last_sanity_version < sanity_version: 
-        messages = messages + check_sanity_version_change(e.data)
-        messages = messages + check_sanity_tmpdir_change(tmpdir, e.data)
-        messages = messages + check_sanity_sstate_dir_change(sstate_dir, e.data)
+        messages = messages + check_sanity_version_change(sanity_data)
+        messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
+        messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data)
     else: 
         if last_tmpdir != tmpdir:
-            messages = messages + check_sanity_tmpdir_change(tmpdir, e.data)
+            messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
         if last_sstate_dir != sstate_dir:
-            messages = messages + check_sanity_sstate_dir_change(sstate_dir, e.data)
+            messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data)
 
     if os.path.exists("conf") and not messages:
         f = file(sanityverfile, 'w')
@@ -476,8 +476,8 @@ def check_sanity(e):
     #
     # Check the 'ABI' of TMPDIR
     #
-    current_abi = data.getVar('OELAYOUT_ABI', e.data, True)
-    abifile = data.getVar('SANITY_ABIFILE', e.data, True)
+    current_abi = data.getVar('OELAYOUT_ABI', sanity_data, True)
+    abifile = data.getVar('SANITY_ABIFILE', sanity_data, True)
     if os.path.exists(abifile):
         f = file(abifile, "r")
         abi = f.read().strip()
@@ -486,16 +486,16 @@ def check_sanity(e):
             f.write(current_abi)
         elif abi == "2" and current_abi == "3":
             bb.note("Converting staging from layout version 2 to layout version 3")
-            os.system(e.data.expand("mv ${TMPDIR}/staging ${TMPDIR}/sysroots"))
-            os.system(e.data.expand("ln -s sysroots ${TMPDIR}/staging"))
-            os.system(e.data.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done"))
+            os.system(sanity_data.expand("mv ${TMPDIR}/staging ${TMPDIR}/sysroots"))
+            os.system(sanity_data.expand("ln -s sysroots ${TMPDIR}/staging"))
+            os.system(sanity_data.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done"))
             f = file(abifile, "w")
             f.write(current_abi)
         elif abi == "3" and current_abi == "4":
             bb.note("Converting staging layout from version 3 to layout version 4")
-            if os.path.exists(e.data.expand("${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}")):
-                os.system(e.data.expand("mv ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS} ${STAGING_BINDIR_CROSS}"))
-                os.system(e.data.expand("ln -s ${STAGING_BINDIR_CROSS} ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}"))
+            if os.path.exists(sanity_data.expand("${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}")):
+                os.system(sanity_data.expand("mv ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS} ${STAGING_BINDIR_CROSS}"))
+                os.system(sanity_data.expand("ln -s ${STAGING_BINDIR_CROSS} ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}"))
 
             f = file(abifile, "w")
             f.write(current_abi)
@@ -503,7 +503,7 @@ def check_sanity(e):
             messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n"
         elif abi == "5" and current_abi == "6":
             bb.note("Converting staging layout from version 5 to layout version 6")
-            os.system(e.data.expand("mv ${TMPDIR}/pstagelogs ${SSTATE_MANIFESTS}"))
+            os.system(sanity_data.expand("mv ${TMPDIR}/pstagelogs ${SSTATE_MANIFESTS}"))
             f = file(abifile, "w")
             f.write(current_abi)
         elif abi == "7" and current_abi == "8":
@@ -516,7 +516,7 @@ def check_sanity(e):
         f.write(current_abi)
     f.close()
 
-    oeroot = data.getVar('COREBASE', e.data)
+    oeroot = data.getVar('COREBASE', sanity_data)
     if oeroot.find ('+') != -1:
         messages = messages + "Error, you have an invalid character (+) in your COREBASE directory path. Please move the installation to a directory which doesn't include a +."
     elif oeroot.find (' ') != -1:
@@ -525,12 +525,21 @@ def check_sanity(e):
     if messages != "":
         raise_sanity_error(messages)
 
+# Create a copy of the datastore and finalise it to ensure appends and 
+# overrides are set - the datastore has yet to be finalised at ConfigParsed
+def copy_data(e):
+    sanity_data = bb.data.createCopy(e.data)
+    sanity_data.finalize()
+    return sanity_data
+
 addhandler check_sanity_eventhandler
 python check_sanity_eventhandler() {
     if bb.event.getName(e) == "ConfigParsed" and e.data.getVar("BB_WORKERCONTEXT", True) != "1" and e.data.getVar("DISABLE_SANITY_CHECKS", True) != "1":
-        check_sanity(e)
+        sanity_data = copy_data(e)
+        check_sanity(sanity_data)
     elif bb.event.getName(e) == "SanityCheck":
-        check_sanity(e)
+        sanity_data = copy_data(e)
+        check_sanity(sanity_data)
         bb.event.fire(bb.event.SanityCheckPassed(), e.data)
 
     return
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 24/28] sanity.bbclass: data.getVar(VAR, obj, exp) -> obj.getVar(VAR, exp)
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (22 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 23/28] sanity.bbclass: copy the data store and finalise before running checks Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 25/28] sanity.bbclass: add newline to check_create_long_filename failure message Saul Wold
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

Replace calls to data.getVar(VARIABLE, data_object, expand) to
direct calls to the getVar method the the data_object.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/classes/sanity.bbclass |   60 +++++++++++++++++++++---------------------
 1 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 5361f1f..5cf9ea13 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -236,20 +236,20 @@ def check_sanity_validmachine(sanity_data):
     messages = ""
 
     # Check TUNE_ARCH is set
-    if data.getVar('TUNE_ARCH', sanity_data, True) == 'INVALID':
+    if sanity_data.getVar('TUNE_ARCH', True) == 'INVALID':
         messages = messages + 'TUNE_ARCH is unset. Please ensure your MACHINE configuration includes a valid tune configuration file which will set this correctly.\n'
 
     # Check TARGET_ARCH is set correctly
-    if data.getVar('TARGE_ARCH', sanity_data, False) == '${TUNE_ARCH}':
+    if sanity_data.getVar('TARGE_ARCH', False) == '${TUNE_ARCH}':
         messages = messages + 'TARGET_ARCH is being overwritten, likely by your MACHINE configuration files.\nPlease use a valid tune configuration file which should set this correctly automatically\nand avoid setting this in the machine configuration. See the OE-Core mailing list for more information.\n'
     
     # Check TARGET_OS is set
-    if data.getVar('TARGET_OS', sanity_data, True) == 'INVALID':
+    if sanity_data.getVar('TARGET_OS', True) == 'INVALID':
         messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n'
 
     # Check that we don't have duplicate entries in PACKAGE_ARCHS & that TUNE_PKGARCH is in PACKAGE_ARCHS
-    pkgarchs = data.getVar('PACKAGE_ARCHS', sanity_data, True)
-    tunepkg = data.getVar('TUNE_PKGARCH', sanity_data, True)
+    pkgarchs = sanity_data.getVar('PACKAGE_ARCHS', True)
+    tunepkg = sanity_data.getVar('TUNE_PKGARCH', True)
     tunefound = False
     seen = {}
     dups = []
@@ -281,7 +281,7 @@ def check_sanity(sanity_data):
     import commands
 
     # Check the bitbake version meets minimum requirements
-    minversion = data.getVar('BB_MIN_VERSION', sanity_data , True)
+    minversion = sanity_data.getVar('BB_MIN_VERSION', True)
     if not minversion:
         # Hack: BB_MIN_VERSION hasn't been parsed yet so return 
         # and wait for the next call
@@ -303,7 +303,7 @@ def check_sanity(sanity_data):
         messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__)
 
     # Check that the MACHINE is valid, if it is set
-    if data.getVar('MACHINE', sanity_data, True):
+    if sanity_data.getVar('MACHINE', True):
         if not check_conf_exists("conf/machine/${MACHINE}.conf", sanity_data):
             messages = messages + 'Please set a valid MACHINE in your local.conf or environment\n'
         else:
@@ -312,33 +312,33 @@ def check_sanity(sanity_data):
         messages = messages + 'Please set a MACHINE in your local.conf or environment\n'
 
     # Check we are using a valid lacal.conf
-    current_conf  = data.getVar('CONF_VERSION', sanity_data, True)
-    conf_version =  data.getVar('LOCALCONF_VERSION', sanity_data, True)
+    current_conf  = sanity_data.getVar('CONF_VERSION', True)
+    conf_version =  sanity_data.getVar('LOCALCONF_VERSION', True)
 
     if current_conf != conf_version:
         messages = messages + "Your version of local.conf was generated from an older version of local.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/local.conf conf/local.conf.sample\" is a good way to visualise the changes.\n"
 
     # Check bblayers.conf is valid
-    current_lconf = data.getVar('LCONF_VERSION', sanity_data, True)
-    lconf_version = data.getVar('LAYER_CONF_VERSION', sanity_data, True)
+    current_lconf = sanity_data.getVar('LCONF_VERSION', True)
+    lconf_version = sanity_data.getVar('LAYER_CONF_VERSION', True)
     if current_lconf != lconf_version:
         messages = messages + "Your version of bblayers.conf was generated from an older version of bblayers.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/bblayers.conf conf/bblayers.conf.sample\" is a good way to visualise the changes.\n"
 
     # If we have a site.conf, check it's valid
     if check_conf_exists("conf/site.conf", sanity_data):
-        current_sconf = data.getVar('SCONF_VERSION', sanity_data, True)
-        sconf_version = data.getVar('SITE_CONF_VERSION', sanity_data, True)
+        current_sconf = sanity_data.getVar('SCONF_VERSION', True)
+        sconf_version = sanity_data.getVar('SITE_CONF_VERSION', True)
         if current_sconf != sconf_version:
             messages = messages + "Your version of site.conf was generated from an older version of site.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/site.conf conf/site.conf.sample\" is a good way to visualise the changes.\n"
 
-    assume_provided = data.getVar('ASSUME_PROVIDED', sanity_data , True).split()
+    assume_provided = sanity_data.getVar('ASSUME_PROVIDED', True).split()
     # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
     if "diffstat-native" not in assume_provided:
         messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n'
 
     # Check that DL_DIR is set, exists and is writable. In theory, we should never even hit the check if DL_DIR isn't 
     # set, since so much relies on it being set.
-    dldir = data.getVar('DL_DIR', sanity_data, True)
+    dldir = sanity_data.getVar('DL_DIR', True)
     if not dldir:
         messages = messages + "DL_DIR is not set. Your environment is misconfigured, check that DL_DIR is set, and if the directory exists, that it is writable. \n"
     if os.path.exists(dldir) and not os.access(dldir, os.W_OK):
@@ -346,10 +346,10 @@ def check_sanity(sanity_data):
     
     # Check that the DISTRO is valid, if set
     # need to take into account DISTRO renaming DISTRO
-    distro = data.getVar('DISTRO', sanity_data, True)
+    distro = sanity_data.getVar('DISTRO', True)
     if distro:
         if not ( check_conf_exists("conf/distro/${DISTRO}.conf", sanity_data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", sanity_data) ):
-            messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", sanity_data, True )
+            messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % sanity_data.getVar("DISTRO", True )
 
     missing = ""
 
@@ -357,10 +357,10 @@ def check_sanity(sanity_data):
         missing = missing + "GNU make,"
 
     if not check_app_exists('${BUILD_PREFIX}gcc', sanity_data):
-        missing = missing + "C Compiler (%sgcc)," % data.getVar("BUILD_PREFIX", sanity_data, True)
+        missing = missing + "C Compiler (%sgcc)," % sanity_data.getVar("BUILD_PREFIX", True)
 
     if not check_app_exists('${BUILD_PREFIX}g++', sanity_data):
-        missing = missing + "C++ Compiler (%sg++)," % data.getVar("BUILD_PREFIX", sanity_data, True)
+        missing = missing + "C++ Compiler (%sg++)," % sanity_data.getVar("BUILD_PREFIX", True)
 
     required_utilities = sanity_data.getVar('SANITY_REQUIRED_UTILITIES', True)
 
@@ -368,11 +368,11 @@ def check_sanity(sanity_data):
         if not check_app_exists("qemu-arm", sanity_data):
             messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
 
-    paths = data.getVar('PATH', sanity_data, True).split(":")
+    paths = sanity_data.getVar('PATH', True).split(":")
     if "." in paths or "" in paths:
         messages = messages + "PATH contains '.' or '', which will break the build, please remove this."
 
-    if data.getVar('TARGET_ARCH', sanity_data, True) == "arm":
+    if sanity_data.getVar('TARGET_ARCH', True) == "arm":
         # This path is no longer user-readable in modern (very recent) Linux
         try:
             if os.path.exists("/proc/sys/vm/mmap_min_addr"):
@@ -403,7 +403,7 @@ def check_sanity(sanity_data):
         messages = messages + toolchain_msg + '\n'
 
     # Check if DISPLAY is set if IMAGETEST is set
-    if not data.getVar( 'DISPLAY', sanity_data, True ) and data.getVar( 'IMAGETEST', sanity_data, True ) == 'qemu':
+    if not sanity_data.getVar( 'DISPLAY', True ) and sanity_data.getVar( 'IMAGETEST', True ) == 'qemu':
         messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
 
     omask = os.umask(022)
@@ -411,11 +411,11 @@ def check_sanity(sanity_data):
         messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
     os.umask(omask)
 
-    oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', sanity_data, True )
+    oes_bb_conf = sanity_data.getVar( 'OES_BITBAKE_CONF', True)
     if not oes_bb_conf:
         messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n'
 
-    nolibs = data.getVar('NO32LIBS', sanity_data, True)
+    nolibs = sanity_data.getVar('NO32LIBS', True)
     if not nolibs:
         lib32path = '/lib'
         if os.path.exists('/lib64') and ( os.path.islink('/lib64') or os.path.islink('/lib') ):
@@ -424,8 +424,8 @@ def check_sanity(sanity_data):
         if os.path.exists('%s/libc.so.6' % lib32path) and not os.path.exists('/usr/include/gnu/stubs-32.h'):
             messages = messages + "You have a 32-bit libc, but no 32-bit headers.  You must install the 32-bit libc headers.\n"
 
-    tmpdir = data.getVar('TMPDIR', sanity_data, True)
-    sstate_dir = data.getVar('SSTATE_DIR', sanity_data, True)
+    tmpdir = sanity_data.getVar('TMPDIR', True)
+    sstate_dir = sanity_data.getVar('SSTATE_DIR', True)
 
     # Check saved sanity info
     last_sanity_version = 0
@@ -442,7 +442,7 @@ def check_sanity(sanity_data):
             if line.startswith('SSTATE_DIR'):
                 last_sstate_dir = line.split()[1]
     
-    sanity_version = int(data.getVar('SANITY_VERSION', sanity_data, True) or 1)
+    sanity_version = int(sanity_data.getVar('SANITY_VERSION', True) or 1)
     if last_sanity_version < sanity_version: 
         messages = messages + check_sanity_version_change(sanity_data)
         messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
@@ -476,8 +476,8 @@ def check_sanity(sanity_data):
     #
     # Check the 'ABI' of TMPDIR
     #
-    current_abi = data.getVar('OELAYOUT_ABI', sanity_data, True)
-    abifile = data.getVar('SANITY_ABIFILE', sanity_data, True)
+    current_abi = sanity_data.getVar('OELAYOUT_ABI', True)
+    abifile = sanity_data.getVar('SANITY_ABIFILE', True)
     if os.path.exists(abifile):
         f = file(abifile, "r")
         abi = f.read().strip()
@@ -516,7 +516,7 @@ def check_sanity(sanity_data):
         f.write(current_abi)
     f.close()
 
-    oeroot = data.getVar('COREBASE', sanity_data)
+    oeroot = sanity_data.getVar('COREBASE')
     if oeroot.find ('+') != -1:
         messages = messages + "Error, you have an invalid character (+) in your COREBASE directory path. Please move the installation to a directory which doesn't include a +."
     elif oeroot.find (' ') != -1:
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 25/28] sanity.bbclass: add newline to check_create_long_filename failure message
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (23 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 24/28] sanity.bbclass: data.getVar(VAR, obj, exp) -> obj.getVar(VAR, exp) Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 26/28] sanity.bbclass: add extra information when SSTATE_CACHE unusable Saul Wold
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

Each failure in the sanity message should be reported on a new line.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/classes/sanity.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 5cf9ea13..39da14b 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -150,7 +150,7 @@ def check_create_long_filename(filepath, pathname):
         if errno == 36: # ENAMETOOLONG
             return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname
         else:
-            return "Failed to create a file in %s: %s" % (pathname, strerror)
+            return "Failed to create a file in %s: %s.\n" % (pathname, strerror)
     return ""
 
 def check_connectivity(d):
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 26/28] sanity.bbclass: add extra information when SSTATE_CACHE unusable
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (24 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 25/28] sanity.bbclass: add newline to check_create_long_filename failure message Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 27/28] sanity.bbclass: catch an extra exception in check_create_long_filename Saul Wold
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

If the user does not have write permissions to SSTATE_CACHE, detected by
the check_create_long_filename() test failing with a "Permission denied"
value in strerror, then suggest they might want to use the location as
an entry in SSTATE_MIRRORS.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/classes/sanity.bbclass |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 39da14b..25ddfea 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -100,6 +100,13 @@ def check_sanity_sstate_dir_change(sstate_dir, data):
     testmsg = ""
     if sstate_dir != "":
         testmsg = check_create_long_filename(sstate_dir, "SSTATE_DIR")
+        # If we don't have permissions to SSTATE_DIR, suggest the user set it as an SSTATE_MIRRORS
+        try:
+            err = testmsg.split(': ')[1].strip()
+            if err == "Permission denied.":
+                testmsg = testmsg + "You could try using %s in SSTATE_MIRRORS rather than as an SSTATE_CACHE.\n" % (sstate_dir)
+        except IndexError:
+            pass
     return testmsg
 
 def check_sanity_tmpdir_change(tmpdir, data):
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 27/28] sanity.bbclass: catch an extra exception in check_create_long_filename
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (25 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 26/28] sanity.bbclass: add extra information when SSTATE_CACHE unusable Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  4:42 ` [Consolidated Pull 28/28] sanity.bbclass: check sanity at BuildStarted rather than ConfigParsed Saul Wold
  2012-05-24  7:41 ` [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Richard Purdie
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

The call to bb.mkdirhier() in check_create_long_filename() can fail with an
OSError, explicitly catch this and report something useful to the user.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/classes/sanity.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 25ddfea..ff25834 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -158,6 +158,8 @@ def check_create_long_filename(filepath, pathname):
             return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname
         else:
             return "Failed to create a file in %s: %s.\n" % (pathname, strerror)
+    except OSError as (errno, strerror):
+        return "Failed to create %s directory in which to run long name sanity check: %s.\n" % (pathname, strerror)
     return ""
 
 def check_connectivity(d):
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Consolidated Pull 28/28] sanity.bbclass: check sanity at BuildStarted rather than ConfigParsed
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (26 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 27/28] sanity.bbclass: catch an extra exception in check_create_long_filename Saul Wold
@ 2012-05-24  4:42 ` Saul Wold
  2012-05-24  7:41 ` [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Richard Purdie
  28 siblings, 0 replies; 30+ messages in thread
From: Saul Wold @ 2012-05-24  4:42 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

This enables a user to use bitbake -e even when the sanity checks are
failing.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/classes/sanity.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ff25834..a2b45bc 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -543,7 +543,7 @@ def copy_data(e):
 
 addhandler check_sanity_eventhandler
 python check_sanity_eventhandler() {
-    if bb.event.getName(e) == "ConfigParsed" and e.data.getVar("BB_WORKERCONTEXT", True) != "1" and e.data.getVar("DISABLE_SANITY_CHECKS", True) != "1":
+    if bb.event.getName(e) == "BuildStarted" and e.data.getVar("BB_WORKERCONTEXT", True) != "1" and e.data.getVar("DISABLE_SANITY_CHECKS", True) != "1":
         sanity_data = copy_data(e)
         check_sanity(sanity_data)
     elif bb.event.getName(e) == "SanityCheck":
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes
  2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
                   ` (27 preceding siblings ...)
  2012-05-24  4:42 ` [Consolidated Pull 28/28] sanity.bbclass: check sanity at BuildStarted rather than ConfigParsed Saul Wold
@ 2012-05-24  7:41 ` Richard Purdie
  28 siblings, 0 replies; 30+ messages in thread
From: Richard Purdie @ 2012-05-24  7:41 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 2012-05-23 at 21:42 -0700, Saul Wold wrote:
> Richard,
> 
> I have been building and running images from the following changes
> (not the mips64 or sh4 yet).
> 
> A number of the changes below (from Robert, Nitin and Xiaofeng) are candiates
> for 1.2.1.
> 
> The package_deb.bbclass change needs more review, I believe that Joshua also
> proposed a fix, but caused other breakage, this seems to resolve the problem, 
> but I am not sure about it.
> 
> Paul's change to add checksum does add some warnings, which I assume he or
> someone will fix shortly, they seem to be from older recipes.
> 
> Thanks
> 	Sau!
> 
> The following changes since commit e6333825c3482a559a0c0499e17f8f48d3042ddf:
> 
>   tune-mips64.inc: Add new tune file for mips64 big-endian (2012-05-20 20:24:37 -0700)
> 
> are available in the git repository at:
>   git://git.openembedded.org/openembedded-core-contrib sgw/fix
>   http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/fix
> 
> Andreas Oberritter (6):
>   ppp: avoid host contamination
>   libnss-mdns: fix postinst scripts
>   wpa-supplicant: fix packaging error since last commit
>   netbase: merge init script updates from upstream
>   distutils.bbclass: don't delete .pyo files
>   python: bump PR of packages after update of distutils.bbclass
> 
> Christopher Larson (3):
>   tcmode-external-csl: preferred external-csl-toolchain's gdbserver
>   Rename 'external-csl' to 'external-sourcery'
>   external-sourcery-toolchain: ignore GNU_HASH issues with its packages
> 
> Enrico Scholz (1):
>   libtool: fixed parallel build related race
> 
> Joshua Lock (7):
>   Revert "sanity.bbclass: check user can read and write to SSTATE_DIR"
>   sanity.bbclass: copy the data store and finalise before running
>     checks
>   sanity.bbclass: data.getVar(VAR, obj, exp) -> obj.getVar(VAR, exp)
>   sanity.bbclass: add newline to check_create_long_filename failure
>     message
>   sanity.bbclass: add extra information when SSTATE_CACHE unusable
>   sanity.bbclass: catch an extra exception in
>     check_create_long_filename
>   sanity.bbclass: check sanity at BuildStarted rather than ConfigParsed
> 
> Khem Raj (5):
>   qemumips64.conf: Add machine configuration for mips64(eb)
>   qemush4.conf: Add machine configuration for qemush4

I've already replied to these, they're holding for now until the kernel
and qemu pieces are sorted out and we have an idea of what we're going
to test in OE-Core.

>   gcc-4.7: Add knowledge about arm hf dynamic loader
>   eglibc: Add ARM hf dynamic linker support
>   gcc: Grok for callconvention-hard to enable hard float
> 
> Marko Lindqvist (1):
>   package_deb.bbclass: don't handle advanced dependency marker as
>     version number


This change still makes me nervous, I think we need to find something
better. I need to reply with an idea I have on this one...

> Nitin A Kamble (1):
>   eglibc: package mtrace separately
> 
> Paul Eggleton (1):
>   classes/base: add checksum file list at parse time
> 
> Robert Yang (2):
>   package_rpm.bbclass: Fix incremental rpm image generation
>   rpm 5.4.0: respect to the arch when choose the alternatives
> 
> Xiaofeng Yan (1):
>   ncurses: Avoid occasional builling failure when having parallel
>     processable task

Other than the ones I've commented on above, I've merged these. I did so
reluctantly in some cases as I think we're just working around issues
rather than fixing them properly but I'm out of bandwidth to dive into
them and help improve the fixes :(

Cheers,

Richard




^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2012-05-24  7:51 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-24  4:42 [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 01/28] qemumips64.conf: Add machine configuration for mips64(eb) Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 02/28] qemush4.conf: Add machine configuration for qemush4 Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 03/28] gcc-4.7: Add knowledge about arm hf dynamic loader Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 04/28] eglibc: Add ARM hf dynamic linker support Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 05/28] gcc: Grok for callconvention-hard to enable hard float Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 06/28] tcmode-external-csl: preferred external-csl-toolchain's gdbserver Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 07/28] Rename 'external-csl' to 'external-sourcery' Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 08/28] external-sourcery-toolchain: ignore GNU_HASH issues with its packages Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 09/28] classes/base: add checksum file list at parse time Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 10/28] package_deb.bbclass: don't handle advanced dependency marker as version number Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 11/28] package_rpm.bbclass: Fix incremental rpm image generation Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 12/28] rpm 5.4.0: respect to the arch when choose the alternatives Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 13/28] eglibc: package mtrace separately Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 14/28] ncurses: Avoid occasional builling failure when having parallel processable task Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 15/28] libtool: fixed parallel build related race Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 16/28] ppp: avoid host contamination Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 17/28] libnss-mdns: fix postinst scripts Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 18/28] wpa-supplicant: fix packaging error since last commit Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 19/28] netbase: merge init script updates from upstream Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 20/28] distutils.bbclass: don't delete .pyo files Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 21/28] python: bump PR of packages after update of distutils.bbclass Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 22/28] Revert "sanity.bbclass: check user can read and write to SSTATE_DIR" Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 23/28] sanity.bbclass: copy the data store and finalise before running checks Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 24/28] sanity.bbclass: data.getVar(VAR, obj, exp) -> obj.getVar(VAR, exp) Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 25/28] sanity.bbclass: add newline to check_create_long_filename failure message Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 26/28] sanity.bbclass: add extra information when SSTATE_CACHE unusable Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 27/28] sanity.bbclass: catch an extra exception in check_create_long_filename Saul Wold
2012-05-24  4:42 ` [Consolidated Pull 28/28] sanity.bbclass: check sanity at BuildStarted rather than ConfigParsed Saul Wold
2012-05-24  7:41 ` [Consolidated Pull 00/28] Fixes from various corners with [1.2.1] fixes Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.