Fix zypper integration
PATCH 1/3 Fix sat-solver & RPM5 integration issue
In reply to Mark HatleFrom Michael Schroeder, fix the configuration of how RPM5 handles obsoletes within the sat-solver.
--- .../sat-solver/sat-solver_obsolete.patch | 20 ++++++++++++++++++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 ++- 2 files changed, 22 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-extended/sat-solver/sat-solver/sat-solver_obsolete.patch
meta/recipes-extended/sat-solver/sat-solver/sat-solver_obsolete.patch new file +20 -0
@@ -0,0 +1,20 @@ +Fix obsolete settings with RPM5. + +The following patch is from Michael Schroeder <[email protected]> + +Signed-off-by: Mark Hatle <[email protected]> + +diff -ur git.orig/src/pool.c git/src/pool.c +--- git.orig/src/pool.c 2011-03-25 15:49:34.885834194 -0500 ++++ git/src/pool.c 2011-03-28 10:55:13.138786524 -0500 +@@ -70,6 +70,10 @@ + pool->disttype = DISTTYPE_DEB; + # endif + #endif ++#ifdef RPM5 ++ pool->obsoleteusesprovides = 1; ++ pool->implicitobsoleteusesprovides = 1; ++#endif + return pool; + } +
meta/recipes-extended/sat-solver/sat-solver_git.bb +2 -1
@@ -7,10 +7,11 @@ LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8" DEPENDS = "libcheck rpm zlib expat db" PV = "0.0-git${SRCPV}" -PR = "r6" +PR = "r7" SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \ file://sat-solver_rpm5.patch \ + file://sat-solver_obsolete.patch \ file://cmake.patch \ file://db5.patch \ file://builtin-arch.patch;apply=no \
Signature · 1 line
1.7.3.4
cover Fix zypper integration
Fix the zypper integration on Bernard (Poky). This is also be necessary in master/OE-core as well! (I have not verified that the C++ workaround is needed on OE-Core, but the same change for MIPS -is- needed due to namespace collision.)
Fixes [YOCTO #827] Zypper not working on ARM. (Note, one of the issues resolved actually affects all host types..)
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: mhatle/bernard/zypper
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/bernard/zypper
Thanks,
Mark Hatle <[email protected]>
---
Mark Hatle (3):
Fix sat-solver & RPM5 integration issue
Fix integration of zypper and sat-solver Workaround for Global C++ Constructor problem on ARM
.../libzypp/libzypp/archconf.patch | 15 - .../arm-workaround-global-constructor.patch | 68 +++ .../libzypp/libzypp/builtin-arch.patch | 122 ----- .../libzypp/libzypp/libzypp-pokyarch.patch | 498 ++++++++++++++++++++ .../libzypp/libzypp/no-builtin-arch.patch | 128 ----- meta/recipes-extended/libzypp/libzypp_git.bb | 120 ++++- .../sat-solver/sat-solver/builtin-arch.patch | 28 -- .../sat-solver/sat-solver/no-builtin-arch.patch | 29 -- .../sat-solver/sat-solver_obsolete.patch | 20 + .../sat-solver/sat-solver/sat-solver_poky.patch | 106 +++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 43 +- 11 files changed, 820 insertions(+), 357 deletions(-) delete mode 100644 meta/recipes-extended/libzypp/libzypp/archconf.patch create mode 100644 meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch delete mode 100644 meta/recipes-extended/libzypp/libzypp/builtin-arch.patch create mode 100644 meta/recipes-extended/libzypp/libzypp/libzypp-pokyarch.patch delete mode 100644 meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch delete mode 100644 meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch delete mode 100644 meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch create mode 100644 meta/recipes-extended/sat-solver/sat-solver/sat-solver_obsolete.patch create mode 100644 meta/recipes-extended/sat-solver/sat-solver/sat-solver_poky.patch
Signature · 1 line
1.7.3.4
PATCH 2/3 Fix integration of zypper and sat-solver
Adjust the integration of zypper and sat-solver to ensure that all of the defined architectures for a given machine are defined identically to Poky.
--- .../libzypp/libzypp/archconf.patch | 15 - .../libzypp/libzypp/builtin-arch.patch | 122 ----- .../libzypp/libzypp/libzypp-pokyarch.patch | 498 ++++++++++++++++++++ .../libzypp/libzypp/no-builtin-arch.patch | 128 ----- meta/recipes-extended/libzypp/libzypp_git.bb | 97 +++- .../sat-solver/sat-solver/builtin-arch.patch | 28 -- .../sat-solver/sat-solver/no-builtin-arch.patch | 29 -- .../sat-solver/sat-solver/sat-solver_poky.patch | 106 +++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 42 +- 9 files changed, 706 insertions(+), 359 deletions(-) delete mode 100644 meta/recipes-extended/libzypp/libzypp/archconf.patch delete mode 100644 meta/recipes-extended/libzypp/libzypp/builtin-arch.patch create mode 100644 meta/recipes-extended/libzypp/libzypp/libzypp-pokyarch.patch delete mode 100644 meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch delete mode 100644 meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch delete mode 100644 meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch create mode 100644 meta/recipes-extended/sat-solver/sat-solver/sat-solver_poky.patch
meta/recipes-extended/libzypp/libzypp/archconf.patch deleted +0 -15
@@ -1,15 +0,0 @@ -diff --git a/zypp.conf b/zypp.conf -index 1e84a3f..7a26548 100644 ---- a/zypp.conf -+++ b/zypp.conf -@@ -17,7 +17,10 @@ - ## ** Changing this needs a full refresh (incl. download) - ## ** of all repository data. - ## -+## ** CAUTION: Don't change this value on yocto ! -+## - # arch = s390 -+arch = @MACHINE_ARCH@ - - - ##
meta/recipes-extended/libzypp/libzypp/builtin-arch.patch deleted +0 -122
122 lines not on this page · raw message
meta/recipes-extended/libzypp/libzypp/libzypp-pokyarch.patch new file +498 -0
498 lines not on this page · raw message
meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch deleted +0 -128
128 lines not on this page · raw message
meta/recipes-extended/libzypp/libzypp_git.bb +76 -21
115 lines not on this page · raw message
meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch deleted +0 -28
@@ -1,28 +0,0 @@ -This patch adds the ${MACHINE_ARCH} and ${PACKAGE_ARCH} to -sat-solver available archs, see do_archpatch in .bb for more -details, this is the version for ${BASE_PACKAGE_ARCH} already -recognized in sat-sovler. - -Signed-off-by: Qing He <[email protected]> - -diff --git a/src/poolarch.c b/src/poolarch.c -index 34a14a3..660959b 100644 ---- a/src/poolarch.c -+++ b/src/poolarch.c -@@ -21,6 +21,7 @@ - #include "util.h" - - const char *archpolicies[] = { -+ "@MACHINE_ARCH@", "@MACHINE_ARCH@:@PKG_ARCH_TAIL@", - "x86_64", "x86_64:i686:i586:i486:i386", - "i686", "i686:i586:i486:i386", - "i586", "i586:i486:i386", -@@ -72,7 +74,7 @@ pool_setarch(Pool *pool, const char *arch) - return; - } - #ifndef DEBIAN_SEMANTICS -- id = ARCH_NOARCH; -+ id = ARCH_ALL; - #else - id = ARCH_ALL; - #endif
meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch deleted +0 -29
@@ -1,29 +0,0 @@ -This patch adds the ${MACHINE_ARCH} and ${PACKAGE_ARCH} to -sat-solver available archs, see do_archpatch in .bb for more -details, this is the version for ${BASE_PACKAGE_ARCH} not -recognized in sat-sovler. - -Signed-off-by: Qing He <[email protected]> - -diff --git a/src/poolarch.c b/src/poolarch.c -index 34a14a3..36367ba 100644 ---- a/src/poolarch.c -+++ b/src/poolarch.c -@@ -21,6 +21,8 @@ - #include "util.h" - - const char *archpolicies[] = { -+ "@MACHINE_ARCH@", "@MACHINE_ARCH@:@PKG_ARCH@", -+ "@PKG_ARCH@", "@PKG_ARCH@", - "x86_64", "x86_64:i686:i586:i486:i386", - "i686", "i686:i586:i486:i386", - "i586", "i586:i486:i386", -@@ -72,7 +74,7 @@ pool_setarch(Pool *pool, const char *arch) - return; - } - #ifndef DEBIAN_SEMANTICS -- id = ARCH_NOARCH; -+ id = ARCH_ALL; - #else - id = ARCH_ALL; - #endif
meta/recipes-extended/sat-solver/sat-solver/sat-solver_poky.patch new file +106 -0
106 lines not on this page · raw message
meta/recipes-extended/sat-solver/sat-solver_git.bb +26 -16
61 lines not on this page · raw message
Signature · 1 line
1.7.3.4
PATCH 3/3 Workaround for Global C++ Constructor problem on ARM
In reply to Mark Hatle[YOCTO #938]
Workaround for a problem with the order of the global C++ constructors on ARM. The workaround is simply to avoid defining the ID numbers outside of the usage of the ID's.
This also has the effect of fixing a problem on MIPS, where "_mips" is a defined symbol and unavailable on the system for a variable name.
--- .../arm-workaround-global-constructor.patch | 68 ++++++++++++++++++++ meta/recipes-extended/libzypp/libzypp_git.bb | 47 +++++++++++--- 2 files changed, 105 insertions(+), 10 deletions(-) create mode 100644 meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch
meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch new file +68 -0
@@ -0,0 +1,68 @@ +Workaround a problem with the C++ global constructors on ARM. + +As documented in the Yocto Bugzilla bug 938, the global constructors +that define DEF_BUILTIN [const IdString _foo ( "foo" );] are not running +before the usage of _foo during the initialization of the compatibility +table. + +The patch, along with a similar change to the recipe generation of the +poky-arch.h file, remove the DEF_BUILTIN globals and replace them with +immediate strings wherever they are used. + +Signed-off-by: Mark Hatle <[email protected]> + +diff -ur git.orig/zypp/Arch.cc git/zypp/Arch.cc +--- git.orig/zypp/Arch.cc 2011-03-29 14:15:32.695079271 -0500 ++++ git/zypp/Arch.cc 2011-03-29 14:17:22.680910025 -0500 +@@ -152,13 +152,10 @@ + // NOTE: Thake care CompatBits::IntT is able to provide one + // bit for each architecture. + // +-#define DEF_BUILTIN(A) const IdString _##A( #A ); +- DEF_BUILTIN( all ); +- DEF_BUILTIN( any ); +- DEF_BUILTIN( noarch ); + +-#include "poky-arch.h" +-#undef DEF_BUILTIN ++/* Global constructors are not working properly on ARM, avoid the ++ * known bad case and merge constructors in with the usages ++ */ + + /////////////////////////////////////////////////////////////////// + // +@@ -227,9 +224,9 @@ + // _noarch must have _idBit 0. + // Other builtins have 1-bit set + // and are initialized done on the fly. +- _compatSet.insert( Arch::CompatEntry( _all, 0 ) ); +- _compatSet.insert( Arch::CompatEntry( _any, 0 ) ); +- _compatSet.insert( Arch::CompatEntry( _noarch, 0 ) ); ++ _compatSet.insert( Arch::CompatEntry( IdString ( "all" ), 0 ) ); ++ _compatSet.insert( Arch::CompatEntry( IdString ( "any" ), 0 ) ); ++ _compatSet.insert( Arch::CompatEntry( IdString ( "noarch" ), 0 ) ); + /////////////////////////////////////////////////////////////////// + // Define the CompatibleWith relation: + // +@@ -305,9 +302,9 @@ + /////////////////////////////////////////////////////////////////// + + const Arch Arch_empty ( IdString::Empty ); +- const Arch Arch_all( _all ); +- const Arch Arch_any( _any ); +- const Arch Arch_noarch( _noarch ); ++ const Arch Arch_all( IdString ( "all" ) ); ++ const Arch Arch_any( IdString ( "any" ) ); ++ const Arch Arch_noarch( IdString ( "noarch" ) ); + + #define POKY_PROTO 1 + #include "poky-arch.h" +@@ -316,7 +316,7 @@ + // METHOD TYPE : Ctor + // + Arch::Arch() +- : _entry( &ArchCompatSet::instance().assertDef( _noarch ) ) ++ : _entry( &ArchCompatSet::instance().assertDef( IdString ( "noarch" ) ) ) + {} + + Arch::Arch( IdString::IdType id_r )
meta/recipes-extended/libzypp/libzypp_git.bb +37 -10
91 lines not on this page · raw message
Signature · 1 line
1.7.3.4
Richard Purdie
AppliedQuoted 17 lines · Mark Hatle
Fix the zypper integration on Bernard (Poky). This is also be necessary in master/OE-core as well! (I have not verified that the C++ workaround is needed on OE-Core, but the same change for MIPS -is- needed due to namespace collision.)
Fixes [YOCTO #827] Zypper not working on ARM. (Note, one of the issues resolved actually affects all host types..)
Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: mhatle/bernard/zypper
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/bernard/zypperThanks,
Mark Hatle <[email protected]>
---
Quoted 4 lines
Mark Hatle (3):
Fix sat-solver & RPM5 integration issue
Fix integration of zypper and sat-solver Workaround for Global C++ Constructor problem on ARM
Merged to master, thanks.
Richard