From 181d5f550d06aaf76ba20666664895355ba6ccea Mon Sep 17 00:00:00 2001 From: Qing He Date: Wed, 13 Apr 2011 16:59:22 +0800 Subject: sat-solver: fix arch=all packages add a new options to set noarch archs as all so platform independent packages can be recognized and installed. fixes [YOCTO #993] (From OE-Core rev: bd0798120559a8aca726db8e962bbbafb80c2a54) Signed-off-by: Qing He Signed-off-by: Richard Purdie --- .../sat-solver/sat-solver/sat-solver_core.patch | 127 +++++++++++++++++++++ .../sat-solver/sat-solver/sat-solver_poky.patch | 106 ----------------- 2 files changed, 127 insertions(+), 106 deletions(-) create mode 100644 meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch delete mode 100644 meta/recipes-extended/sat-solver/sat-solver/sat-solver_poky.patch (limited to 'meta/recipes-extended/sat-solver/sat-solver') diff --git a/meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch new file mode 100644 index 0000000000..11bf5b0182 --- /dev/null +++ b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch @@ -0,0 +1,127 @@ +Upstream-Status: Inappropriate [distribution] + +Fix "arch" integration with Poky. + +Add a missing "any" architecture type and update the semantics to use it. + +Disable the built-in archpolicies structure, and replace it with one +we generate in the recipe. + +Also add poky semantics option in CMake. + +Signed-off-by: Mark Hatle +Signed-off-by: Qing He + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 443281e..4456a87 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,6 +45,11 @@ MESSAGE(STATUS "Building for Debian") + ADD_DEFINITIONS( -DDEBIAN -DDEBIAN_SEMANTICS) + ENDIF ( DEBIAN ) + ++IF ( OE_CORE ) ++MESSAGE(STATUS "Building for OE core") ++ADD_DEFINITIONS( -DOE_CORE -DOE_CORE_SEMANTICS) ++ENDIF ( OE_CORE ) ++ + IF ( MULTI_SEMANTICS ) + MESSAGE(STATUS "Enabling multi dist support") + ADD_DEFINITIONS( -DMULTI_SEMANTICS) +diff --git a/src/knownid.h b/src/knownid.h +index 7757ae0..4b8bee7 100644 +--- a/src/knownid.h ++++ b/src/knownid.h +@@ -57,6 +57,7 @@ KNOWNID(SYSTEM_SYSTEM, "system:system"), + KNOWNID(ARCH_SRC, "src"), + KNOWNID(ARCH_NOSRC, "nosrc"), + KNOWNID(ARCH_NOARCH, "noarch"), ++KNOWNID(ARCH_ANY, "any"), + KNOWNID(ARCH_ALL, "all"), + + KNOWNID(REPOSITORY_SOLVABLES, "repository:solvables"), +diff --git a/src/policy.c b/src/policy.c +index 55c8677..3356ff8 100644 +--- a/src/policy.c ++++ b/src/policy.c +@@ -486,6 +486,13 @@ policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2) + } + + /* we allow changes to/from noarch */ ++#ifdef OE_CORE_SEMANTICS ++ if (a1 == a2 || ++ a1 == ARCH_NOARCH || a2 == ARCH_NOARCH || ++ a1 == ARCH_ANY || a2 == ARCH_ANY || ++ a1 == ARCH_ALL || a2 == ARCH_ALL) ++ return 0; ++#else + #ifndef DEBIAN_SEMANTICS + if (a1 == a2 || a1 == ARCH_NOARCH || a2 == ARCH_NOARCH) + return 0; +@@ -493,6 +500,7 @@ policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2) + if (a1 == a2 || a1 == ARCH_ALL || a2 == ARCH_ALL) + return 0; + #endif ++#endif + if (!pool->id2arch) + return 0; + a1 = a1 <= pool->lastarch ? pool->id2arch[a1] : 0; +diff --git a/src/poolarch.c b/src/poolarch.c +index 34a14a3..2d7cd70 100644 +--- a/src/poolarch.c ++++ b/src/poolarch.c +@@ -20,38 +20,8 @@ + #include "poolarch.h" + #include "util.h" + +-const char *archpolicies[] = { +- "x86_64", "x86_64:i686:i586:i486:i386", +- "i686", "i686:i586:i486:i386", +- "i586", "i586:i486:i386", +- "i486", "i486:i386", +- "i386", "i386", +- "s390x", "s390x:s390", +- "s390", "s390", +- "ia64", "ia64:i686:i586:i486:i386", +- "ppc64", "ppc64:ppc", +- "ppc", "ppc", +- "armv7nhl", "armv7nhl:armv7hl", +- "armv7hl", "armv7hl", +- "armv7l", "armv7l:armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l", +- "armv6l", "armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l", +- "armv5tejl", "armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l", +- "armv5tel", "armv5tel:armv5l:armv4tl:armv4l:armv3l", +- "armv5l", "armv5l:armv4tl:armv4l:armv3l", +- "armv4tl", "armv4tl:armv4l:armv3l", +- "armv4l", "armv4l:armv3l", +- "armv3l", "armv3l", +- "sh3", "sh3", +- "sh4", "sh4", +- "sh4a", "sh4a:sh4", +- "sparc64v", "sparc64v:sparc64:sparcv9v:sparcv9:sparcv8:sparc", +- "sparc64", "sparc64:sparcv9:sparcv8:sparc", +- "sparcv9v", "sparcv9v:sparcv9:sparcv8:sparc", +- "sparcv9", "sparcv9:sparcv8:sparc", +- "sparcv8", "sparcv8:sparc", +- "sparc", "sparc", +- 0 +-}; ++/* Provide the const char *archpolicies structure */ ++#include "core-arch.h" + + void + pool_setarch(Pool *pool, const char *arch) +@@ -71,10 +41,10 @@ pool_setarch(Pool *pool, const char *arch) + pool->lastarch = 0; + return; + } +-#ifndef DEBIAN_SEMANTICS +- id = ARCH_NOARCH; +-#else ++#if defined(DEBIAN_SEMANTICS) || defined(OE_CORE_SEMANTICS) + id = ARCH_ALL; ++#else ++ id = ARCH_NOARCH; + #endif + lastarch = id + 255; + id2arch = sat_calloc(lastarch + 1, sizeof(Id)); diff --git a/meta/recipes-extended/sat-solver/sat-solver/sat-solver_poky.patch b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_poky.patch deleted file mode 100644 index b762bac854..0000000000 --- a/meta/recipes-extended/sat-solver/sat-solver/sat-solver_poky.patch +++ /dev/null @@ -1,106 +0,0 @@ -Fix "arch" integration with Poky. - -Add a missing "any" architecture type and update the semantics to use it. - -Disable the built-in archpolicies structure, and replace it with one -we generate in the recipe. - -Signed-off-by: Mark Hatle - -diff --git a/src/knownid.h b/src/knownid.h -index 7757ae0..4b8bee7 100644 ---- a/src/knownid.h -+++ b/src/knownid.h -@@ -57,6 +57,7 @@ KNOWNID(SYSTEM_SYSTEM, "system:system"), - KNOWNID(ARCH_SRC, "src"), - KNOWNID(ARCH_NOSRC, "nosrc"), - KNOWNID(ARCH_NOARCH, "noarch"), -+KNOWNID(ARCH_ANY, "any"), - KNOWNID(ARCH_ALL, "all"), - - KNOWNID(REPOSITORY_SOLVABLES, "repository:solvables"), -diff --git a/src/policy.c b/src/policy.c -index 55c8677..3356ff8 100644 ---- a/src/policy.c -+++ b/src/policy.c -@@ -486,6 +486,13 @@ policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2) - } - - /* we allow changes to/from noarch */ -+#ifdef POKY_SEMANTICS -+ if (a1 == a2 || -+ a1 == ARCH_NOARCH || a2 == ARCH_NOARCH || -+ a1 == ARCH_ANY || a2 == ARCH_ANY || -+ a1 == ARCH_ALL || a2 == ARCH_ALL) -+ return 0; -+#else - #ifndef DEBIAN_SEMANTICS - if (a1 == a2 || a1 == ARCH_NOARCH || a2 == ARCH_NOARCH) - return 0; -@@ -493,6 +500,7 @@ policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2) - if (a1 == a2 || a1 == ARCH_ALL || a2 == ARCH_ALL) - return 0; - #endif -+#endif - if (!pool->id2arch) - return 0; - a1 = a1 <= pool->lastarch ? pool->id2arch[a1] : 0; -diff --git a/src/poolarch.c b/src/poolarch.c -index 34a14a3..2d7cd70 100644 ---- a/src/poolarch.c -+++ b/src/poolarch.c -@@ -20,38 +20,8 @@ - #include "poolarch.h" - #include "util.h" - --const char *archpolicies[] = { -- "x86_64", "x86_64:i686:i586:i486:i386", -- "i686", "i686:i586:i486:i386", -- "i586", "i586:i486:i386", -- "i486", "i486:i386", -- "i386", "i386", -- "s390x", "s390x:s390", -- "s390", "s390", -- "ia64", "ia64:i686:i586:i486:i386", -- "ppc64", "ppc64:ppc", -- "ppc", "ppc", -- "armv7nhl", "armv7nhl:armv7hl", -- "armv7hl", "armv7hl", -- "armv7l", "armv7l:armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l", -- "armv6l", "armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l", -- "armv5tejl", "armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l", -- "armv5tel", "armv5tel:armv5l:armv4tl:armv4l:armv3l", -- "armv5l", "armv5l:armv4tl:armv4l:armv3l", -- "armv4tl", "armv4tl:armv4l:armv3l", -- "armv4l", "armv4l:armv3l", -- "armv3l", "armv3l", -- "sh3", "sh3", -- "sh4", "sh4", -- "sh4a", "sh4a:sh4", -- "sparc64v", "sparc64v:sparc64:sparcv9v:sparcv9:sparcv8:sparc", -- "sparc64", "sparc64:sparcv9:sparcv8:sparc", -- "sparcv9v", "sparcv9v:sparcv9:sparcv8:sparc", -- "sparcv9", "sparcv9:sparcv8:sparc", -- "sparcv8", "sparcv8:sparc", -- "sparc", "sparc", -- 0 --}; -+/* Provide the const char *archpolicies structure */ -+#include "poky-arch.h" - - void - pool_setarch(Pool *pool, const char *arch) -@@ -71,10 +41,10 @@ pool_setarch(Pool *pool, const char *arch) - pool->lastarch = 0; - return; - } --#ifndef DEBIAN_SEMANTICS -- id = ARCH_NOARCH; --#else -+#if defined(DEBIAN_SEMANTICS) || defined(POKY_SEMANTICS) - id = ARCH_ALL; -+#else -+ id = ARCH_NOARCH; - #endif - lastarch = id + 255; - id2arch = sat_calloc(lastarch + 1, sizeof(Id)); -- cgit v1.2.3-54-g00ecf