From b79b40e101ebc4000ed031084117afbf94d8a609 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Thu, 4 Aug 2011 11:33:23 -0500 Subject: libzypp: Increase the size of the arch compat table Fix [YOCTO #1313] Increase the size of the arch compat table to 30 entries. Also cleanup a few things related to Poky -> OE name changing. Signed-off-by: Mark Hatle Fixed up arm patch Signed-off-by: Saul Wold --- .../arm-workaround-global-constructor.patch | 23 +- .../libzypp/libzypp/libzypp-compatargs.patch | 54 +++ .../libzypp/libzypp/libzypp-oearch.patch | 500 +++++++++++++++++++++ .../libzypp/libzypp/libzypp-pokyarch.patch | 500 --------------------- meta/recipes-extended/libzypp/libzypp_git.bb | 69 +-- 5 files changed, 601 insertions(+), 545 deletions(-) create mode 100644 meta/recipes-extended/libzypp/libzypp/libzypp-compatargs.patch create mode 100644 meta/recipes-extended/libzypp/libzypp/libzypp-oearch.patch delete mode 100644 meta/recipes-extended/libzypp/libzypp/libzypp-pokyarch.patch diff --git a/meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch b/meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch index 86458d7e75..bfdb29b593 100644 --- a/meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch +++ b/meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch @@ -8,14 +8,15 @@ 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 +oe-arch.h file, remove the DEF_BUILTIN globals and replace them with immediate strings wherever they are used. Signed-off-by: Mark Hatle -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 +Index: git/zypp/Arch.cc +=================================================================== +--- git.orig/zypp/Arch.cc 2011-08-04 21:03:31.000000000 -0700 ++++ git/zypp/Arch.cc 2011-08-04 21:04:16.635480895 -0700 @@ -152,13 +152,10 @@ // NOTE: Thake care CompatBits::IntT is able to provide one // bit for each architecture. @@ -24,13 +25,13 @@ diff -ur git.orig/zypp/Arch.cc git/zypp/Arch.cc - 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 + */ +-#include "oe-arch.h" +-#undef DEF_BUILTIN + /////////////////////////////////////////////////////////////////// // @@ -227,9 +224,9 @@ @@ -46,7 +47,7 @@ diff -ur git.orig/zypp/Arch.cc git/zypp/Arch.cc /////////////////////////////////////////////////////////////////// // Define the CompatibleWith relation: // -@@ -305,9 +302,9 @@ +@@ -331,9 +328,9 @@ /////////////////////////////////////////////////////////////////// const Arch Arch_empty ( IdString::Empty ); @@ -57,9 +58,9 @@ diff -ur git.orig/zypp/Arch.cc git/zypp/Arch.cc + const Arch Arch_any( IdString ( "any" ) ); + const Arch Arch_noarch( IdString ( "noarch" ) ); - #define POKY_PROTO 1 - #include "poky-arch.h" -@@ -316,7 +316,7 @@ + #define OE_PROTO 1 + #include "oe-arch.h" +@@ -345,7 +342,7 @@ // METHOD TYPE : Ctor // Arch::Arch() diff --git a/meta/recipes-extended/libzypp/libzypp/libzypp-compatargs.patch b/meta/recipes-extended/libzypp/libzypp/libzypp-compatargs.patch new file mode 100644 index 0000000000..9cd7a36422 --- /dev/null +++ b/meta/recipes-extended/libzypp/libzypp/libzypp-compatargs.patch @@ -0,0 +1,54 @@ +zypp/Arch.cc: Add room for additional architecture compatibilities + +Upstream-status: Pending + +Increase the size of the compatibility table from 9 to 30. There are already +existing checks within libzypp to ensure that we don't overflow the 64-bit +architecture field, so nothing further was required. + +Signed-off-by: Mark Hatle + +diff -ur git.orig/zypp/Arch.cc git/zypp/Arch.cc +--- git.orig/zypp/Arch.cc 2011-08-02 16:40:37.696662889 -0500 ++++ git/zypp/Arch.cc 2011-08-04 11:24:18.051745246 -0500 +@@ -280,13 +280,39 @@ + IdString arch6_r = IdString(), + IdString arch7_r = IdString(), + IdString arch8_r = IdString(), +- IdString arch9_r = IdString() ) ++ IdString arch9_r = IdString(), ++ IdString arch10_r = IdString(), ++ IdString arch11_r = IdString(), ++ IdString arch12_r = IdString(), ++ IdString arch13_r = IdString(), ++ IdString arch14_r = IdString(), ++ IdString arch15_r = IdString(), ++ IdString arch16_r = IdString(), ++ IdString arch17_r = IdString(), ++ IdString arch18_r = IdString(), ++ IdString arch19_r = IdString(), ++ IdString arch20_r = IdString(), ++ IdString arch21_r = IdString(), ++ IdString arch22_r = IdString(), ++ IdString arch23_r = IdString(), ++ IdString arch24_r = IdString(), ++ IdString arch25_r = IdString(), ++ IdString arch26_r = IdString(), ++ IdString arch27_r = IdString(), ++ IdString arch28_r = IdString(), ++ IdString arch29_r = IdString(), ++ IdString arch30_r = IdString() ) + { + const CompatEntry & target( assertCompatSetEntry( targetArch_r ) ); + target.addCompatBit( assertCompatSetEntry( arch0_r )._idBit ); + #define _SETARG(N) if ( arch##N##_r.empty() ) return; target.addCompatBit( assertCompatSetEntry( arch##N##_r )._idBit ) + _SETARG(1); _SETARG(2); _SETARG(3); _SETARG(4); + _SETARG(5); _SETARG(6); _SETARG(7); _SETARG(8); _SETARG(9); ++ _SETARG(10); _SETARG(11); _SETARG(12); _SETARG(13); _SETARG(14); ++ _SETARG(15); _SETARG(16); _SETARG(17); _SETARG(18); _SETARG(19); ++ _SETARG(20); _SETARG(21); _SETARG(22); _SETARG(23); _SETARG(24); ++ _SETARG(25); _SETARG(26); _SETARG(27); _SETARG(28); _SETARG(29); ++ _SETARG(30); + #undef _SETARG + } + diff --git a/meta/recipes-extended/libzypp/libzypp/libzypp-oearch.patch b/meta/recipes-extended/libzypp/libzypp/libzypp-oearch.patch new file mode 100644 index 0000000000..9a0e42b709 --- /dev/null +++ b/meta/recipes-extended/libzypp/libzypp/libzypp-oearch.patch @@ -0,0 +1,500 @@ +Upstream-Status: Inappropriate [distribution] + +Disable all of the internal architectures + +We disable all of the internal architectures and replace them with ones +generated by the libzypp recipe as specified in the oe-arch.h. + +Signed-off-by: Mark Hatle + +diff -ur git.orig/tests/lib/TestSetup.h git/tests/lib/TestSetup.h +--- git.orig/tests/lib/TestSetup.h 2011-03-28 14:24:36.534800770 -0500 ++++ git/tests/lib/TestSetup.h 2011-03-28 14:25:04.969912234 -0500 +@@ -66,7 +66,7 @@ + * // enabls loging fot the scope of this block: + * // base::LogControl::TmpLineWriter shutUp( new log::FileLineWriter( "/tmp/YLOG" ) ); + * +- * TestSetup test( Arch_x86_64 ); ++ * TestSetup test( Arch_machine ); + * // test.loadTarget(); // initialize and load target + * test.loadRepo( TESTS_SRC_DIR"/data/openSUSE-11.1" ); + * +@@ -313,7 +313,7 @@ + * a TestSetup system or a real system. The provided repostitories are + * loaded into the pool (without refresh). + */ +- static void LoadSystemAt( const Pathname & sysRoot, const Arch & _testSetupArch_r = Arch_x86_64 ) ++ static void LoadSystemAt( const Pathname & sysRoot, const Arch & _testSetupArch_r = Arch_machine ) + { + if ( ! PathInfo( sysRoot ).isDir() ) + ZYPP_THROW( Exception("sysRoot argument needs to be a directory") ); +diff -ur git.orig/tools/DumpSelectable.cc git/tools/DumpSelectable.cc +--- git.orig/tools/DumpSelectable.cc 2011-03-28 14:24:36.547876951 -0500 ++++ git/tools/DumpSelectable.cc 2011-03-28 14:25:04.969912234 -0500 +@@ -78,7 +78,7 @@ + else if ( TestSetup::isTestSetup( sysRoot ) ) + { + message << str::form( "*** Load TestSetup from '%s'", sysRoot.c_str() ) << endl; +- TestSetup test( sysRoot, Arch_x86_64 ); ++ TestSetup test( sysRoot, Arch_machine ); + test.loadRepos(); + } + else +diff -ur git.orig/tools/NameReqPrv.cc git/tools/NameReqPrv.cc +--- git.orig/tools/NameReqPrv.cc 2011-03-28 14:24:36.547876951 -0500 ++++ git/tools/NameReqPrv.cc 2011-03-28 14:25:04.970849384 -0500 +@@ -112,7 +112,7 @@ + else if ( TestSetup::isTestSetup( sysRoot ) ) + { + message << str::form( "*** Load TestSetup from '%s'", sysRoot.c_str() ) << endl; +- TestSetup test( sysRoot, Arch_x86_64 ); ++ TestSetup test( sysRoot, Arch_machine ); + test.loadRepos(); + dumpRange( message, satpool.reposBegin(), satpool.reposEnd() ) << endl; + } +diff -ur git.orig/tools/ToolScanRepos.cc git/tools/ToolScanRepos.cc +--- git.orig/tools/ToolScanRepos.cc 2011-03-28 14:24:36.547876951 -0500 ++++ git/tools/ToolScanRepos.cc 2011-03-28 14:25:04.970849384 -0500 +@@ -46,7 +46,7 @@ + /////////////////////////////////////////////////////////////////// + Pathname mtmp( "/tmp" ); + Pathname mroot( mtmp/appname ); +- Arch march( Arch_x86_64 ); ++ Arch march( Arch_machine ); + bool oClearRoot = true; + + std::vector urls; +@@ -83,7 +83,7 @@ + if ( *(argv[0]) ) // empty + march = Arch( argv[0] ); + else +- march = Arch_x86_64; ++ march = Arch_machine; + } + else + { +@@ -131,4 +131,4 @@ + + INT << "===[END]============================================" << endl << endl; + return ret; +-} +\ No newline at end of file ++} +diff -ur git.orig/tools/zypp-list.cc git/tools/zypp-list.cc +--- git.orig/tools/zypp-list.cc 2011-03-28 14:24:36.547876951 -0500 ++++ git/tools/zypp-list.cc 2011-03-28 14:25:04.971901224 -0500 +@@ -56,7 +56,7 @@ + else if ( TestSetup::isTestSetup( sysRoot ) ) + { + message << str::form( "*** Load TestSetup from '%s'", sysRoot.c_str() ) << endl; +- TestSetup test( sysRoot, Arch_x86_64 ); ++ TestSetup test( sysRoot, Arch_machine ); + test.loadRepos(); + dumpRange( message, satpool.reposBegin(), satpool.reposEnd() ) << endl; + } +diff -ur git.orig/zypp/Arch.cc git/zypp/Arch.cc +--- git.orig/zypp/Arch.cc 2011-03-28 14:24:36.548877414 -0500 ++++ git/zypp/Arch.cc 2011-03-28 14:31:13.943786442 -0500 +@@ -153,53 +153,11 @@ + // bit for each architecture. + // + #define DEF_BUILTIN(A) const IdString _##A( #A ); ++ DEF_BUILTIN( all ); ++ DEF_BUILTIN( any ); + DEF_BUILTIN( noarch ); + +- DEF_BUILTIN( i386 ); +- DEF_BUILTIN( i486 ); +- DEF_BUILTIN( i586 ); +- DEF_BUILTIN( i686 ); +- DEF_BUILTIN( athlon ); +- DEF_BUILTIN( x86_64 ); +- +- DEF_BUILTIN( pentium3 ); +- DEF_BUILTIN( pentium4 ); +- +- DEF_BUILTIN( s390 ); +- DEF_BUILTIN( s390x ); +- +- DEF_BUILTIN( ppc ); +- DEF_BUILTIN( ppc64 ); +- +- DEF_BUILTIN( ia64 ); +- +- DEF_BUILTIN( alphaev67 ); +- DEF_BUILTIN( alphaev6 ); +- DEF_BUILTIN( alphapca56 ); +- DEF_BUILTIN( alphaev56 ); +- DEF_BUILTIN( alphaev5 ); +- DEF_BUILTIN( alpha ); +- +- DEF_BUILTIN( sparc64v ); +- DEF_BUILTIN( sparcv9v ); +- DEF_BUILTIN( sparc64 ); +- DEF_BUILTIN( sparcv9 ); +- DEF_BUILTIN( sparcv8 ); +- DEF_BUILTIN( sparc ); +- +- DEF_BUILTIN( armv7l ); +- DEF_BUILTIN( armv6l ); +- DEF_BUILTIN( armv5tejl ); +- DEF_BUILTIN( armv5tel ); +- DEF_BUILTIN( armv5l ); +- DEF_BUILTIN( armv4tl ); +- DEF_BUILTIN( armv4l ); +- DEF_BUILTIN( armv3l ); +- +- DEF_BUILTIN( sh3 ); +- +- DEF_BUILTIN( sh4 ); +- DEF_BUILTIN( sh4a ); ++#include "oe-arch.h" + #undef DEF_BUILTIN + + /////////////////////////////////////////////////////////////////// +@@ -269,6 +227,8 @@ + // _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 ) ); + /////////////////////////////////////////////////////////////////// + // Define the CompatibleWith relation: +@@ -276,52 +236,9 @@ + // NOTE: Order of definition is significant! (Arch::compare) + // - define compatible (less) architectures first! + // +- defCompatibleWith( _i386, _noarch ); +- defCompatibleWith( _i486, _noarch,_i386 ); +- defCompatibleWith( _i586, _noarch,_i386,_i486 ); +- defCompatibleWith( _i686, _noarch,_i386,_i486,_i586 ); +- defCompatibleWith( _athlon, _noarch,_i386,_i486,_i586,_i686 ); +- defCompatibleWith( _x86_64, _noarch,_i386,_i486,_i586,_i686,_athlon ); +- +- defCompatibleWith( _pentium3, _noarch,_i386,_i486,_i586,_i686 ); +- defCompatibleWith( _pentium4, _noarch,_i386,_i486,_i586,_i686,_pentium3 ); +- +- defCompatibleWith( _ia64, _noarch,_i386,_i486,_i586,_i686 ); +- // +- defCompatibleWith( _s390, _noarch ); +- defCompatibleWith( _s390x, _noarch,_s390 ); +- // +- defCompatibleWith( _ppc, _noarch ); +- defCompatibleWith( _ppc64, _noarch,_ppc ); +- // +- defCompatibleWith( _alpha, _noarch ); +- defCompatibleWith( _alphaev5, _noarch,_alpha ); +- defCompatibleWith( _alphaev56, _noarch,_alpha,_alphaev5 ); +- defCompatibleWith( _alphapca56, _noarch,_alpha,_alphaev5,_alphaev56 ); +- defCompatibleWith( _alphaev6, _noarch,_alpha,_alphaev5,_alphaev56,_alphapca56 ); +- defCompatibleWith( _alphaev67, _noarch,_alpha,_alphaev5,_alphaev56,_alphapca56,_alphaev6 ); +- // +- defCompatibleWith( _sparc, _noarch ); +- defCompatibleWith( _sparcv8, _noarch,_sparc ); +- defCompatibleWith( _sparcv9, _noarch,_sparc,_sparcv8 ); +- defCompatibleWith( _sparcv9v, _noarch,_sparc,_sparcv8,_sparcv9 ); +- // +- defCompatibleWith( _sparc64, _noarch,_sparc,_sparcv8,_sparcv9 ); +- defCompatibleWith( _sparc64v, _noarch,_sparc,_sparcv8,_sparcv9,_sparcv9v,_sparc64 ); +- // +- defCompatibleWith( _armv3l, _noarch ); +- defCompatibleWith( _armv4l, _noarch,_armv3l ); +- defCompatibleWith( _armv4tl, _noarch,_armv3l,_armv4l ); +- defCompatibleWith( _armv5l, _noarch,_armv3l,_armv4l,_armv4tl ); +- defCompatibleWith( _armv5tel, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l ); +- defCompatibleWith( _armv5tejl, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel ); +- defCompatibleWith( _armv6l, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel,_armv5tejl ); +- defCompatibleWith( _armv7l, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel,_armv5tejl,_armv6l ); +- // +- defCompatibleWith( _sh3, _noarch ); +- // +- defCompatibleWith( _sh4, _noarch ); +- defCompatibleWith( _sh4a, _noarch,_sh4 ); ++#define OE_DEF_COMPAT 1 ++#include "oe-arch.h" ++#undef OE_DEF_COMPAT + // + /////////////////////////////////////////////////////////////////// + // dumpOn( USR ) << endl; +@@ -388,53 +305,13 @@ + /////////////////////////////////////////////////////////////////// + + const Arch Arch_empty ( IdString::Empty ); ++ const Arch Arch_all( _all ); ++ const Arch Arch_any( _any ); + const Arch Arch_noarch( _noarch ); + +- const Arch Arch_i386( _i386 ); +- const Arch Arch_i486( _i486 ); +- const Arch Arch_i586( _i586 ); +- const Arch Arch_i686( _i686 ); +- const Arch Arch_athlon( _athlon ); +- const Arch Arch_x86_64( _x86_64 ); +- +- const Arch Arch_pentium3( _pentium3 ); +- const Arch Arch_pentium4( _pentium4 ); +- +- const Arch Arch_s390( _s390 ); +- const Arch Arch_s390x( _s390x ); +- +- const Arch Arch_ppc( _ppc ); +- const Arch Arch_ppc64( _ppc64 ); +- +- const Arch Arch_ia64( _ia64 ); +- +- const Arch Arch_alphaev67( _alphaev67 ); +- const Arch Arch_alphaev6( _alphaev6 ); +- const Arch Arch_alphapca56( _alphapca56 ); +- const Arch Arch_alphaev56( _alphaev56 ); +- const Arch Arch_alphaev5( _alphaev5 ); +- const Arch Arch_alpha( _alpha ); +- +- const Arch Arch_sparc64v( _sparc64v ); +- const Arch Arch_sparc64( _sparc64 ); +- const Arch Arch_sparcv9v( _sparcv9v ); +- const Arch Arch_sparcv9( _sparcv9 ); +- const Arch Arch_sparcv8( _sparcv8 ); +- const Arch Arch_sparc( _sparc ); +- +- const Arch Arch_armv7l( _armv7l ); +- const Arch Arch_armv6l( _armv6l ); +- const Arch Arch_armv5tejl( _armv5tejl ); +- const Arch Arch_armv5tel( _armv5tel ); +- const Arch Arch_armv5l( _armv5l ); +- const Arch Arch_armv4tl( _armv4tl ); +- const Arch Arch_armv4l( _armv4l ); +- const Arch Arch_armv3l( _armv3l ); +- +- const Arch Arch_sh3( _sh3 ); +- +- const Arch Arch_sh4( _sh4 ); +- const Arch Arch_sh4a( _sh4a ); ++#define OE_PROTO 1 ++#include "oe-arch.h" ++#undef OE_PROTO + + /////////////////////////////////////////////////////////////////// + // +@@ -504,26 +381,10 @@ + // + Arch Arch::baseArch( ) const + { +- // check the multilib archs: +- if (Arch_x86_64.compatibleWith(*this)) +- { +- return Arch_x86_64; +- } +- if (Arch_sparc64v.compatibleWith(*this)) +- { +- return Arch_sparc64v; +- } +- if (Arch_sparc64.compatibleWith(*this)) +- { +- return Arch_sparc64; +- } +- if (Arch_ppc64.compatibleWith(*this)) +- { +- return Arch_ppc64; +- } +- if (Arch_s390x.compatibleWith(*this)) ++ // Check the multilib arch: ++ if (Arch_machine.compatibleWith(*this)) + { +- return Arch_s390x; ++ return Arch_machine; + } + // Here: no multilib; return arch before noarch + CompatSet cset( compatSet( *this ) ); +diff -ur git.orig/zypp/Arch.h git/zypp/Arch.h +--- git.orig/zypp/Arch.h 2011-03-28 14:24:36.548877414 -0500 ++++ git/zypp/Arch.h 2011-03-28 14:25:04.972801208 -0500 +@@ -162,89 +162,13 @@ + extern const Arch Arch_empty; + + /** \relates Arch */ ++ extern const Arch Arch_all; ++ extern const Arch Arch_any; + extern const Arch Arch_noarch; + +- /** \relates Arch */ +- extern const Arch Arch_pentium4; +- /** \relates Arch */ +- extern const Arch Arch_pentium3; +- +- /** \relates Arch */ +- extern const Arch Arch_x86_64; +- /** \relates Arch */ +- extern const Arch Arch_athlon; +- /** \relates Arch */ +- extern const Arch Arch_i686; +- /** \relates Arch */ +- extern const Arch Arch_i586; +- /** \relates Arch */ +- extern const Arch Arch_i486; +- /** \relates Arch */ +- extern const Arch Arch_i386; +- +- /** \relates Arch */ +- extern const Arch Arch_s390x; +- /** \relates Arch */ +- extern const Arch Arch_s390; +- +- /** \relates Arch */ +- extern const Arch Arch_ppc64; +- /** \relates Arch */ +- extern const Arch Arch_ppc; +- +- /** \relates Arch */ +- extern const Arch Arch_ia64; +- +- /** \relates Arch */ +- extern const Arch Arch_alphaev67; +- /** \relates Arch */ +- extern const Arch Arch_alphaev6; +- /** \relates Arch */ +- extern const Arch Arch_alphapca56; +- /** \relates Arch */ +- extern const Arch Arch_alphaev56; +- /** \relates Arch */ +- extern const Arch Arch_alphaev5; +- /** \relates Arch */ +- extern const Arch Arch_alpha; +- +- /** \relates Arch */ +- extern const Arch Arch_sparc64v; +- /** \relates Arch */ +- extern const Arch Arch_sparc64; +- /** \relates Arch */ +- extern const Arch Arch_sparcv9v; +- /** \relates Arch */ +- extern const Arch Arch_sparcv9; +- /** \relates Arch */ +- extern const Arch Arch_sparcv8; +- /** \relates Arch */ +- extern const Arch Arch_sparc; +- +- /** \relates Arch */ +- extern const Arch Arch_armv7l; +- /** \relates Arch */ +- extern const Arch Arch_armv6l; +- /** \relates Arch */ +- extern const Arch Arch_armv5tejl; +- /** \relates Arch */ +- extern const Arch Arch_armv5tel; +- /** \relates Arch */ +- extern const Arch Arch_armv5l; +- /** \relates Arch */ +- extern const Arch Arch_armv4tl; +- /** \relates Arch */ +- extern const Arch Arch_armv4l; +- /** \relates Arch */ +- extern const Arch Arch_armv3l; +- +- /** \relates Arch */ +- extern const Arch Arch_sh3; +- +- /** \relates Arch */ +- extern const Arch Arch_sh4; +- /** \relates Arch */ +- extern const Arch Arch_sh4a; ++#define OE_EXTERN_PROTO 1 ++#include "oe-arch.h" ++#undef OE_EXTERN_PROTO + //@} + + /////////////////////////////////////////////////////////////////// +diff -ur git.orig/zypp/CMakeLists.txt git/zypp/CMakeLists.txt +--- git.orig/zypp/CMakeLists.txt ++++ git/zypp/CMakeLists.txt +@@ -90,6 +90,7 @@ SET( zypp_EARLY_SRCS + + SET( zypp_HEADERS + Arch.h ++ oe-arch.h + AutoDispose.h + Bit.h + ByteCount.h +diff -ur git.orig/zypp/ZConfig.cc git/zypp/ZConfig.cc +--- git.orig/zypp/ZConfig.cc 2011-03-28 14:24:37.178989632 -0500 ++++ git/zypp/ZConfig.cc 2011-03-28 14:25:04.973971936 -0500 +@@ -48,77 +48,9 @@ + */ + Arch _autodetectSystemArchitecture() + { +- struct ::utsname buf; +- if ( ::uname( &buf ) < 0 ) +- { +- ERR << "Can't determine system architecture" << endl; +- return Arch_noarch; +- } +- +- Arch architecture( buf.machine ); +- MIL << "Uname architecture is '" << buf.machine << "'" << endl; ++ /* Define the default architecture, ignore uname! */ ++ Arch architecture( Arch_machine ); + +- if ( architecture == Arch_i686 ) +- { +- // some CPUs report i686 but dont implement cx8 and cmov +- // check for both flags in /proc/cpuinfo and downgrade +- // to i586 if either is missing (cf bug #18885) +- std::ifstream cpuinfo( "/proc/cpuinfo" ); +- if ( cpuinfo ) +- { +- for( iostr::EachLine in( cpuinfo ); in; in.next() ) +- { +- if ( str::hasPrefix( *in, "flags" ) ) +- { +- if ( in->find( "cx8" ) == std::string::npos +- || in->find( "cmov" ) == std::string::npos ) +- { +- architecture = Arch_i586; +- WAR << "CPU lacks 'cx8' or 'cmov': architecture downgraded to '" << architecture << "'" << endl; +- } +- break; +- } +- } +- } +- else +- { +- ERR << "Cant open " << PathInfo("/proc/cpuinfo") << endl; +- } +- } +- else if ( architecture == Arch_sparc || architecture == Arch_sparc64 ) +- { +- // Check for sun4[vum] to get the real arch. (bug #566291) +- std::ifstream cpuinfo( "/proc/cpuinfo" ); +- if ( cpuinfo ) +- { +- for( iostr::EachLine in( cpuinfo ); in; in.next() ) +- { +- if ( str::hasPrefix( *in, "type" ) ) +- { +- if ( in->find( "sun4v" ) != std::string::npos ) +- { +- architecture = ( architecture == Arch_sparc64 ? Arch_sparc64v : Arch_sparcv9v ); +- WAR << "CPU has 'sun4v': architecture upgraded to '" << architecture << "'" << endl; +- } +- else if ( in->find( "sun4u" ) != std::string::npos ) +- { +- architecture = ( architecture == Arch_sparc64 ? Arch_sparc64 : Arch_sparcv9 ); +- WAR << "CPU has 'sun4u': architecture upgraded to '" << architecture << "'" << endl; +- } +- else if ( in->find( "sun4m" ) != std::string::npos ) +- { +- architecture = Arch_sparcv8; +- WAR << "CPU has 'sun4m': architecture upgraded to '" << architecture << "'" << endl; +- } +- break; +- } +- } +- } +- else +- { +- ERR << "Cant open " << PathInfo("/proc/cpuinfo") << endl; +- } +- } + return architecture; + } + diff --git a/meta/recipes-extended/libzypp/libzypp/libzypp-pokyarch.patch b/meta/recipes-extended/libzypp/libzypp/libzypp-pokyarch.patch deleted file mode 100644 index 1eab1e8302..0000000000 --- a/meta/recipes-extended/libzypp/libzypp/libzypp-pokyarch.patch +++ /dev/null @@ -1,500 +0,0 @@ -Upstream-Status: Inappropriate [distribution] - -Disable all of the internal architectures - -We disable all of the internal architectures and replace them with ones -generated by the libzypp recipe as specified in the poky-arch.h. - -Signed-off-by: Mark Hatle - -diff -ur git.orig/tests/lib/TestSetup.h git/tests/lib/TestSetup.h ---- git.orig/tests/lib/TestSetup.h 2011-03-28 14:24:36.534800770 -0500 -+++ git/tests/lib/TestSetup.h 2011-03-28 14:25:04.969912234 -0500 -@@ -66,7 +66,7 @@ - * // enabls loging fot the scope of this block: - * // base::LogControl::TmpLineWriter shutUp( new log::FileLineWriter( "/tmp/YLOG" ) ); - * -- * TestSetup test( Arch_x86_64 ); -+ * TestSetup test( Arch_machine ); - * // test.loadTarget(); // initialize and load target - * test.loadRepo( TESTS_SRC_DIR"/data/openSUSE-11.1" ); - * -@@ -313,7 +313,7 @@ - * a TestSetup system or a real system. The provided repostitories are - * loaded into the pool (without refresh). - */ -- static void LoadSystemAt( const Pathname & sysRoot, const Arch & _testSetupArch_r = Arch_x86_64 ) -+ static void LoadSystemAt( const Pathname & sysRoot, const Arch & _testSetupArch_r = Arch_machine ) - { - if ( ! PathInfo( sysRoot ).isDir() ) - ZYPP_THROW( Exception("sysRoot argument needs to be a directory") ); -diff -ur git.orig/tools/DumpSelectable.cc git/tools/DumpSelectable.cc ---- git.orig/tools/DumpSelectable.cc 2011-03-28 14:24:36.547876951 -0500 -+++ git/tools/DumpSelectable.cc 2011-03-28 14:25:04.969912234 -0500 -@@ -78,7 +78,7 @@ - else if ( TestSetup::isTestSetup( sysRoot ) ) - { - message << str::form( "*** Load TestSetup from '%s'", sysRoot.c_str() ) << endl; -- TestSetup test( sysRoot, Arch_x86_64 ); -+ TestSetup test( sysRoot, Arch_machine ); - test.loadRepos(); - } - else -diff -ur git.orig/tools/NameReqPrv.cc git/tools/NameReqPrv.cc ---- git.orig/tools/NameReqPrv.cc 2011-03-28 14:24:36.547876951 -0500 -+++ git/tools/NameReqPrv.cc 2011-03-28 14:25:04.970849384 -0500 -@@ -112,7 +112,7 @@ - else if ( TestSetup::isTestSetup( sysRoot ) ) - { - message << str::form( "*** Load TestSetup from '%s'", sysRoot.c_str() ) << endl; -- TestSetup test( sysRoot, Arch_x86_64 ); -+ TestSetup test( sysRoot, Arch_machine ); - test.loadRepos(); - dumpRange( message, satpool.reposBegin(), satpool.reposEnd() ) << endl; - } -diff -ur git.orig/tools/ToolScanRepos.cc git/tools/ToolScanRepos.cc ---- git.orig/tools/ToolScanRepos.cc 2011-03-28 14:24:36.547876951 -0500 -+++ git/tools/ToolScanRepos.cc 2011-03-28 14:25:04.970849384 -0500 -@@ -46,7 +46,7 @@ - /////////////////////////////////////////////////////////////////// - Pathname mtmp( "/tmp" ); - Pathname mroot( mtmp/appname ); -- Arch march( Arch_x86_64 ); -+ Arch march( Arch_machine ); - bool oClearRoot = true; - - std::vector urls; -@@ -83,7 +83,7 @@ - if ( *(argv[0]) ) // empty - march = Arch( argv[0] ); - else -- march = Arch_x86_64; -+ march = Arch_machine; - } - else - { -@@ -131,4 +131,4 @@ - - INT << "===[END]============================================" << endl << endl; - return ret; --} -\ No newline at end of file -+} -diff -ur git.orig/tools/zypp-list.cc git/tools/zypp-list.cc ---- git.orig/tools/zypp-list.cc 2011-03-28 14:24:36.547876951 -0500 -+++ git/tools/zypp-list.cc 2011-03-28 14:25:04.971901224 -0500 -@@ -56,7 +56,7 @@ - else if ( TestSetup::isTestSetup( sysRoot ) ) - { - message << str::form( "*** Load TestSetup from '%s'", sysRoot.c_str() ) << endl; -- TestSetup test( sysRoot, Arch_x86_64 ); -+ TestSetup test( sysRoot, Arch_machine ); - test.loadRepos(); - dumpRange( message, satpool.reposBegin(), satpool.reposEnd() ) << endl; - } -diff -ur git.orig/zypp/Arch.cc git/zypp/Arch.cc ---- git.orig/zypp/Arch.cc 2011-03-28 14:24:36.548877414 -0500 -+++ git/zypp/Arch.cc 2011-03-28 14:31:13.943786442 -0500 -@@ -153,53 +153,11 @@ - // bit for each architecture. - // - #define DEF_BUILTIN(A) const IdString _##A( #A ); -+ DEF_BUILTIN( all ); -+ DEF_BUILTIN( any ); - DEF_BUILTIN( noarch ); - -- DEF_BUILTIN( i386 ); -- DEF_BUILTIN( i486 ); -- DEF_BUILTIN( i586 ); -- DEF_BUILTIN( i686 ); -- DEF_BUILTIN( athlon ); -- DEF_BUILTIN( x86_64 ); -- -- DEF_BUILTIN( pentium3 ); -- DEF_BUILTIN( pentium4 ); -- -- DEF_BUILTIN( s390 ); -- DEF_BUILTIN( s390x ); -- -- DEF_BUILTIN( ppc ); -- DEF_BUILTIN( ppc64 ); -- -- DEF_BUILTIN( ia64 ); -- -- DEF_BUILTIN( alphaev67 ); -- DEF_BUILTIN( alphaev6 ); -- DEF_BUILTIN( alphapca56 ); -- DEF_BUILTIN( alphaev56 ); -- DEF_BUILTIN( alphaev5 ); -- DEF_BUILTIN( alpha ); -- -- DEF_BUILTIN( sparc64v ); -- DEF_BUILTIN( sparcv9v ); -- DEF_BUILTIN( sparc64 ); -- DEF_BUILTIN( sparcv9 ); -- DEF_BUILTIN( sparcv8 ); -- DEF_BUILTIN( sparc ); -- -- DEF_BUILTIN( armv7l ); -- DEF_BUILTIN( armv6l ); -- DEF_BUILTIN( armv5tejl ); -- DEF_BUILTIN( armv5tel ); -- DEF_BUILTIN( armv5l ); -- DEF_BUILTIN( armv4tl ); -- DEF_BUILTIN( armv4l ); -- DEF_BUILTIN( armv3l ); -- -- DEF_BUILTIN( sh3 ); -- -- DEF_BUILTIN( sh4 ); -- DEF_BUILTIN( sh4a ); -+#include "poky-arch.h" - #undef DEF_BUILTIN - - /////////////////////////////////////////////////////////////////// -@@ -269,6 +227,8 @@ - // _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 ) ); - /////////////////////////////////////////////////////////////////// - // Define the CompatibleWith relation: -@@ -276,52 +236,9 @@ - // NOTE: Order of definition is significant! (Arch::compare) - // - define compatible (less) architectures first! - // -- defCompatibleWith( _i386, _noarch ); -- defCompatibleWith( _i486, _noarch,_i386 ); -- defCompatibleWith( _i586, _noarch,_i386,_i486 ); -- defCompatibleWith( _i686, _noarch,_i386,_i486,_i586 ); -- defCompatibleWith( _athlon, _noarch,_i386,_i486,_i586,_i686 ); -- defCompatibleWith( _x86_64, _noarch,_i386,_i486,_i586,_i686,_athlon ); -- -- defCompatibleWith( _pentium3, _noarch,_i386,_i486,_i586,_i686 ); -- defCompatibleWith( _pentium4, _noarch,_i386,_i486,_i586,_i686,_pentium3 ); -- -- defCompatibleWith( _ia64, _noarch,_i386,_i486,_i586,_i686 ); -- // -- defCompatibleWith( _s390, _noarch ); -- defCompatibleWith( _s390x, _noarch,_s390 ); -- // -- defCompatibleWith( _ppc, _noarch ); -- defCompatibleWith( _ppc64, _noarch,_ppc ); -- // -- defCompatibleWith( _alpha, _noarch ); -- defCompatibleWith( _alphaev5, _noarch,_alpha ); -- defCompatibleWith( _alphaev56, _noarch,_alpha,_alphaev5 ); -- defCompatibleWith( _alphapca56, _noarch,_alpha,_alphaev5,_alphaev56 ); -- defCompatibleWith( _alphaev6, _noarch,_alpha,_alphaev5,_alphaev56,_alphapca56 ); -- defCompatibleWith( _alphaev67, _noarch,_alpha,_alphaev5,_alphaev56,_alphapca56,_alphaev6 ); -- // -- defCompatibleWith( _sparc, _noarch ); -- defCompatibleWith( _sparcv8, _noarch,_sparc ); -- defCompatibleWith( _sparcv9, _noarch,_sparc,_sparcv8 ); -- defCompatibleWith( _sparcv9v, _noarch,_sparc,_sparcv8,_sparcv9 ); -- // -- defCompatibleWith( _sparc64, _noarch,_sparc,_sparcv8,_sparcv9 ); -- defCompatibleWith( _sparc64v, _noarch,_sparc,_sparcv8,_sparcv9,_sparcv9v,_sparc64 ); -- // -- defCompatibleWith( _armv3l, _noarch ); -- defCompatibleWith( _armv4l, _noarch,_armv3l ); -- defCompatibleWith( _armv4tl, _noarch,_armv3l,_armv4l ); -- defCompatibleWith( _armv5l, _noarch,_armv3l,_armv4l,_armv4tl ); -- defCompatibleWith( _armv5tel, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l ); -- defCompatibleWith( _armv5tejl, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel ); -- defCompatibleWith( _armv6l, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel,_armv5tejl ); -- defCompatibleWith( _armv7l, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel,_armv5tejl,_armv6l ); -- // -- defCompatibleWith( _sh3, _noarch ); -- // -- defCompatibleWith( _sh4, _noarch ); -- defCompatibleWith( _sh4a, _noarch,_sh4 ); -+#define POKY_DEF_COMPAT 1 -+#include "poky-arch.h" -+#undef POKY_DEF_COMPAT - // - /////////////////////////////////////////////////////////////////// - // dumpOn( USR ) << endl; -@@ -388,53 +305,13 @@ - /////////////////////////////////////////////////////////////////// - - const Arch Arch_empty ( IdString::Empty ); -+ const Arch Arch_all( _all ); -+ const Arch Arch_any( _any ); - const Arch Arch_noarch( _noarch ); - -- const Arch Arch_i386( _i386 ); -- const Arch Arch_i486( _i486 ); -- const Arch Arch_i586( _i586 ); -- const Arch Arch_i686( _i686 ); -- const Arch Arch_athlon( _athlon ); -- const Arch Arch_x86_64( _x86_64 ); -- -- const Arch Arch_pentium3( _pentium3 ); -- const Arch Arch_pentium4( _pentium4 ); -- -- const Arch Arch_s390( _s390 ); -- const Arch Arch_s390x( _s390x ); -- -- const Arch Arch_ppc( _ppc ); -- const Arch Arch_ppc64( _ppc64 ); -- -- const Arch Arch_ia64( _ia64 ); -- -- const Arch Arch_alphaev67( _alphaev67 ); -- const Arch Arch_alphaev6( _alphaev6 ); -- const Arch Arch_alphapca56( _alphapca56 ); -- const Arch Arch_alphaev56( _alphaev56 ); -- const Arch Arch_alphaev5( _alphaev5 ); -- const Arch Arch_alpha( _alpha ); -- -- const Arch Arch_sparc64v( _sparc64v ); -- const Arch Arch_sparc64( _sparc64 ); -- const Arch Arch_sparcv9v( _sparcv9v ); -- const Arch Arch_sparcv9( _sparcv9 ); -- const Arch Arch_sparcv8( _sparcv8 ); -- const Arch Arch_sparc( _sparc ); -- -- const Arch Arch_armv7l( _armv7l ); -- const Arch Arch_armv6l( _armv6l ); -- const Arch Arch_armv5tejl( _armv5tejl ); -- const Arch Arch_armv5tel( _armv5tel ); -- const Arch Arch_armv5l( _armv5l ); -- const Arch Arch_armv4tl( _armv4tl ); -- const Arch Arch_armv4l( _armv4l ); -- const Arch Arch_armv3l( _armv3l ); -- -- const Arch Arch_sh3( _sh3 ); -- -- const Arch Arch_sh4( _sh4 ); -- const Arch Arch_sh4a( _sh4a ); -+#define POKY_PROTO 1 -+#include "poky-arch.h" -+#undef POKY_PROTO - - /////////////////////////////////////////////////////////////////// - // -@@ -504,26 +381,10 @@ - // - Arch Arch::baseArch( ) const - { -- // check the multilib archs: -- if (Arch_x86_64.compatibleWith(*this)) -- { -- return Arch_x86_64; -- } -- if (Arch_sparc64v.compatibleWith(*this)) -- { -- return Arch_sparc64v; -- } -- if (Arch_sparc64.compatibleWith(*this)) -- { -- return Arch_sparc64; -- } -- if (Arch_ppc64.compatibleWith(*this)) -- { -- return Arch_ppc64; -- } -- if (Arch_s390x.compatibleWith(*this)) -+ // Check the multilib arch: -+ if (Arch_machine.compatibleWith(*this)) - { -- return Arch_s390x; -+ return Arch_machine; - } - // Here: no multilib; return arch before noarch - CompatSet cset( compatSet( *this ) ); -diff -ur git.orig/zypp/Arch.h git/zypp/Arch.h ---- git.orig/zypp/Arch.h 2011-03-28 14:24:36.548877414 -0500 -+++ git/zypp/Arch.h 2011-03-28 14:25:04.972801208 -0500 -@@ -162,89 +162,13 @@ - extern const Arch Arch_empty; - - /** \relates Arch */ -+ extern const Arch Arch_all; -+ extern const Arch Arch_any; - extern const Arch Arch_noarch; - -- /** \relates Arch */ -- extern const Arch Arch_pentium4; -- /** \relates Arch */ -- extern const Arch Arch_pentium3; -- -- /** \relates Arch */ -- extern const Arch Arch_x86_64; -- /** \relates Arch */ -- extern const Arch Arch_athlon; -- /** \relates Arch */ -- extern const Arch Arch_i686; -- /** \relates Arch */ -- extern const Arch Arch_i586; -- /** \relates Arch */ -- extern const Arch Arch_i486; -- /** \relates Arch */ -- extern const Arch Arch_i386; -- -- /** \relates Arch */ -- extern const Arch Arch_s390x; -- /** \relates Arch */ -- extern const Arch Arch_s390; -- -- /** \relates Arch */ -- extern const Arch Arch_ppc64; -- /** \relates Arch */ -- extern const Arch Arch_ppc; -- -- /** \relates Arch */ -- extern const Arch Arch_ia64; -- -- /** \relates Arch */ -- extern const Arch Arch_alphaev67; -- /** \relates Arch */ -- extern const Arch Arch_alphaev6; -- /** \relates Arch */ -- extern const Arch Arch_alphapca56; -- /** \relates Arch */ -- extern const Arch Arch_alphaev56; -- /** \relates Arch */ -- extern const Arch Arch_alphaev5; -- /** \relates Arch */ -- extern const Arch Arch_alpha; -- -- /** \relates Arch */ -- extern const Arch Arch_sparc64v; -- /** \relates Arch */ -- extern const Arch Arch_sparc64; -- /** \relates Arch */ -- extern const Arch Arch_sparcv9v; -- /** \relates Arch */ -- extern const Arch Arch_sparcv9; -- /** \relates Arch */ -- extern const Arch Arch_sparcv8; -- /** \relates Arch */ -- extern const Arch Arch_sparc; -- -- /** \relates Arch */ -- extern const Arch Arch_armv7l; -- /** \relates Arch */ -- extern const Arch Arch_armv6l; -- /** \relates Arch */ -- extern const Arch Arch_armv5tejl; -- /** \relates Arch */ -- extern const Arch Arch_armv5tel; -- /** \relates Arch */ -- extern const Arch Arch_armv5l; -- /** \relates Arch */ -- extern const Arch Arch_armv4tl; -- /** \relates Arch */ -- extern const Arch Arch_armv4l; -- /** \relates Arch */ -- extern const Arch Arch_armv3l; -- -- /** \relates Arch */ -- extern const Arch Arch_sh3; -- -- /** \relates Arch */ -- extern const Arch Arch_sh4; -- /** \relates Arch */ -- extern const Arch Arch_sh4a; -+#define POKY_EXTERN_PROTO 1 -+#include "poky-arch.h" -+#undef POKY_EXTERN_PROTO - //@} - - /////////////////////////////////////////////////////////////////// -diff -ur git.orig/zypp/CMakeLists.txt git/zypp/CMakeLists.txt ---- git.orig/zypp/CMakeLists.txt -+++ git/zypp/CMakeLists.txt -@@ -90,6 +90,7 @@ SET( zypp_EARLY_SRCS - - SET( zypp_HEADERS - Arch.h -+ poky-arch.h - AutoDispose.h - Bit.h - ByteCount.h -diff -ur git.orig/zypp/ZConfig.cc git/zypp/ZConfig.cc ---- git.orig/zypp/ZConfig.cc 2011-03-28 14:24:37.178989632 -0500 -+++ git/zypp/ZConfig.cc 2011-03-28 14:25:04.973971936 -0500 -@@ -48,77 +48,9 @@ - */ - Arch _autodetectSystemArchitecture() - { -- struct ::utsname buf; -- if ( ::uname( &buf ) < 0 ) -- { -- ERR << "Can't determine system architecture" << endl; -- return Arch_noarch; -- } -- -- Arch architecture( buf.machine ); -- MIL << "Uname architecture is '" << buf.machine << "'" << endl; -+ /* Define the default architecture, ignore uname! */ -+ Arch architecture( Arch_machine ); - -- if ( architecture == Arch_i686 ) -- { -- // some CPUs report i686 but dont implement cx8 and cmov -- // check for both flags in /proc/cpuinfo and downgrade -- // to i586 if either is missing (cf bug #18885) -- std::ifstream cpuinfo( "/proc/cpuinfo" ); -- if ( cpuinfo ) -- { -- for( iostr::EachLine in( cpuinfo ); in; in.next() ) -- { -- if ( str::hasPrefix( *in, "flags" ) ) -- { -- if ( in->find( "cx8" ) == std::string::npos -- || in->find( "cmov" ) == std::string::npos ) -- { -- architecture = Arch_i586; -- WAR << "CPU lacks 'cx8' or 'cmov': architecture downgraded to '" << architecture << "'" << endl; -- } -- break; -- } -- } -- } -- else -- { -- ERR << "Cant open " << PathInfo("/proc/cpuinfo") << endl; -- } -- } -- else if ( architecture == Arch_sparc || architecture == Arch_sparc64 ) -- { -- // Check for sun4[vum] to get the real arch. (bug #566291) -- std::ifstream cpuinfo( "/proc/cpuinfo" ); -- if ( cpuinfo ) -- { -- for( iostr::EachLine in( cpuinfo ); in; in.next() ) -- { -- if ( str::hasPrefix( *in, "type" ) ) -- { -- if ( in->find( "sun4v" ) != std::string::npos ) -- { -- architecture = ( architecture == Arch_sparc64 ? Arch_sparc64v : Arch_sparcv9v ); -- WAR << "CPU has 'sun4v': architecture upgraded to '" << architecture << "'" << endl; -- } -- else if ( in->find( "sun4u" ) != std::string::npos ) -- { -- architecture = ( architecture == Arch_sparc64 ? Arch_sparc64 : Arch_sparcv9 ); -- WAR << "CPU has 'sun4u': architecture upgraded to '" << architecture << "'" << endl; -- } -- else if ( in->find( "sun4m" ) != std::string::npos ) -- { -- architecture = Arch_sparcv8; -- WAR << "CPU has 'sun4m': architecture upgraded to '" << architecture << "'" << endl; -- } -- break; -- } -- } -- } -- else -- { -- ERR << "Cant open " << PathInfo("/proc/cpuinfo") << endl; -- } -- } - return architecture; - } - diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb index bb36a9069e..1fc6809a35 100644 --- a/meta/recipes-extended/libzypp/libzypp_git.bb +++ b/meta/recipes-extended/libzypp/libzypp_git.bb @@ -14,16 +14,17 @@ RDEPENDS_${PN} = "sat-solver" S = "${WORKDIR}/git" SRCREV = "15b6c52260bbc52b3d8e585e271b67e10cc7c433" PV = "0.0-git${SRCPV}" -PR = "r12" +PR = "r13" SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \ file://no-doc.patch \ file://rpm5.patch \ file://rpm5-no-rpmdbinit.patch \ file://config-release.patch \ - file://libzypp-pokyarch.patch \ + file://libzypp-oearch.patch \ + file://libzypp-compatargs.patch \ file://fix_for_compile_wth_gcc-4.6.0.patch \ - file://hardcode-lib-fix.patch \ + file://hardcode-lib-fix.patch \ " SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch" @@ -49,57 +50,57 @@ AVOID_CONSTRUCTOR_mips = "true" do_archgen () { # We need to dynamically generate our arch file based on the machine # configuration - echo "/* Automatically generated by the libzypp recipes */" > zypp/poky-arch.h - echo "/* Avoid Constructor: ${AVOID_CONSTRUCTOR} */" >> zypp/poky-arch.h - echo "" >> zypp/poky-arch.h - echo "#ifndef POKY_ARCH_H" >> zypp/poky-arch.h - echo "#define POKY_ARCH_H 1" >> zypp/poky-arch.h - echo "#define Arch_machine Arch_${MACHINE_ARCH}" | tr - _ >> zypp/poky-arch.h - echo "#endif /* POKY_ARCH_H */" >> zypp/poky-arch.h - echo "" >> zypp/poky-arch.h + echo "/* Automatically generated by the libzypp recipes */" > zypp/oe-arch.h + echo "/* Avoid Constructor: ${AVOID_CONSTRUCTOR} */" >> zypp/oe-arch.h + echo "" >> zypp/oe-arch.h + echo "#ifndef OE_ARCH_H" >> zypp/oe-arch.h + echo "#define OE_ARCH_H 1" >> zypp/oe-arch.h + echo "#define Arch_machine Arch_${MACHINE_ARCH}" | tr - _ >> zypp/oe-arch.h + echo "#endif /* OE_ARCH_H */" >> zypp/oe-arch.h + echo "" >> zypp/oe-arch.h if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then - echo "#ifdef DEF_BUILTIN" >> zypp/poky-arch.h - echo "/* Specify builtin types */" >> zypp/poky-arch.h + echo "#ifdef DEF_BUILTIN" >> zypp/oe-arch.h + echo "/* Specify builtin types */" >> zypp/oe-arch.h for each_arch in ${PACKAGE_ARCHS} ; do case "$each_arch" in all | any | noarch) continue;; esac - echo " DEF_BUILTIN( ${each_arch} );" | tr - _ >> zypp/poky-arch.h + echo " DEF_BUILTIN( ${each_arch} );" | tr - _ >> zypp/oe-arch.h done - echo "#endif /* DEF_BUILTIN */" >> zypp/poky-arch.h - echo "" >> zypp/poky-arch.h + echo "#endif /* DEF_BUILTIN */" >> zypp/oe-arch.h + echo "" >> zypp/oe-arch.h fi - echo "#ifdef POKY_EXTERN_PROTO" >> zypp/poky-arch.h - echo "/* Specify extern prototypes */" >> zypp/poky-arch.h + echo "#ifdef OE_EXTERN_PROTO" >> zypp/oe-arch.h + echo "/* Specify extern prototypes */" >> zypp/oe-arch.h for each_arch in ${PACKAGE_ARCHS} ; do case "$each_arch" in all | any | noarch) continue;; esac - echo " extern const Arch Arch_${each_arch};" | tr - _ >> zypp/poky-arch.h + echo " extern const Arch Arch_${each_arch};" | tr - _ >> zypp/oe-arch.h done - echo "#endif /* POKY_EXTERN_PROTO */" >> zypp/poky-arch.h - echo "" >> zypp/poky-arch.h - echo "#ifdef POKY_PROTO" >> zypp/poky-arch.h - echo "/* Specify prototypes */" >> zypp/poky-arch.h + echo "#endif /* OE_EXTERN_PROTO */" >> zypp/oe-arch.h + echo "" >> zypp/oe-arch.h + echo "#ifdef OE_PROTO" >> zypp/oe-arch.h + echo "/* Specify prototypes */" >> zypp/oe-arch.h for each_arch in ${PACKAGE_ARCHS} ; do case "$each_arch" in all | any | noarch) continue;; esac if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then - echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/poky-arch.h - echo "(_${each_arch});" >> zypp/poky-arch.h + echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h + echo "(_${each_arch});" >> zypp/oe-arch.h else - echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/poky-arch.h - echo "( IdString ( \"${each_arch}\" ) );" >> zypp/poky-arch.h + echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h + echo "( IdString ( \"${each_arch}\" ) );" >> zypp/oe-arch.h fi done - echo "#endif /* POKY_PROTO */" >> zypp/poky-arch.h - echo "" >> zypp/poky-arch.h - echo "#ifdef POKY_DEF_COMPAT" >> zypp/poky-arch.h - echo "/* Specify compatibility information */" >> zypp/poky-arch.h + echo "#endif /* OE_PROTO */" >> zypp/oe-arch.h + echo "" >> zypp/oe-arch.h + echo "#ifdef OE_DEF_COMPAT" >> zypp/oe-arch.h + echo "/* Specify compatibility information */" >> zypp/oe-arch.h INSTALL_PLATFORM_ARCHS="" for each_arch in ${PACKAGE_ARCHS} ; do INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS" @@ -134,10 +135,10 @@ do_archgen () { COMPAT_WITH="${CARCH},${COMPAT} $COMPAT_WITH" done for each_compat in ${COMPAT_WITH} ; do - echo " defCompatibleWith( ${each_compat} );" >> zypp/poky-arch.h + echo " defCompatibleWith( ${each_compat} );" >> zypp/oe-arch.h done - echo "#endif /* DEF_COMPAT */" >> zypp/poky-arch.h - echo "" >> zypp/poky-arch.h + echo "#endif /* DEF_COMPAT */" >> zypp/oe-arch.h + echo "" >> zypp/oe-arch.h } addtask archgen before do_configure after do_patch -- cgit v1.2.3-54-g00ecf