summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch')
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch127
1 files changed, 0 insertions, 127 deletions
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
deleted file mode 100644
index 11bf5b0182..0000000000
--- a/meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch
+++ /dev/null
@@ -1,127 +0,0 @@
1Upstream-Status: Inappropriate [distribution]
2
3Fix "arch" integration with Poky.
4
5Add a missing "any" architecture type and update the semantics to use it.
6
7Disable the built-in archpolicies structure, and replace it with one
8we generate in the recipe.
9
10Also add poky semantics option in CMake.
11
12Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
13Signed-off-by: Qing He <qing.he@intel.com>
14
15diff --git a/CMakeLists.txt b/CMakeLists.txt
16index 443281e..4456a87 100644
17--- a/CMakeLists.txt
18+++ b/CMakeLists.txt
19@@ -45,6 +45,11 @@ MESSAGE(STATUS "Building for Debian")
20 ADD_DEFINITIONS( -DDEBIAN -DDEBIAN_SEMANTICS)
21 ENDIF ( DEBIAN )
22
23+IF ( OE_CORE )
24+MESSAGE(STATUS "Building for OE core")
25+ADD_DEFINITIONS( -DOE_CORE -DOE_CORE_SEMANTICS)
26+ENDIF ( OE_CORE )
27+
28 IF ( MULTI_SEMANTICS )
29 MESSAGE(STATUS "Enabling multi dist support")
30 ADD_DEFINITIONS( -DMULTI_SEMANTICS)
31diff --git a/src/knownid.h b/src/knownid.h
32index 7757ae0..4b8bee7 100644
33--- a/src/knownid.h
34+++ b/src/knownid.h
35@@ -57,6 +57,7 @@ KNOWNID(SYSTEM_SYSTEM, "system:system"),
36 KNOWNID(ARCH_SRC, "src"),
37 KNOWNID(ARCH_NOSRC, "nosrc"),
38 KNOWNID(ARCH_NOARCH, "noarch"),
39+KNOWNID(ARCH_ANY, "any"),
40 KNOWNID(ARCH_ALL, "all"),
41
42 KNOWNID(REPOSITORY_SOLVABLES, "repository:solvables"),
43diff --git a/src/policy.c b/src/policy.c
44index 55c8677..3356ff8 100644
45--- a/src/policy.c
46+++ b/src/policy.c
47@@ -486,6 +486,13 @@ policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2)
48 }
49
50 /* we allow changes to/from noarch */
51+#ifdef OE_CORE_SEMANTICS
52+ if (a1 == a2 ||
53+ a1 == ARCH_NOARCH || a2 == ARCH_NOARCH ||
54+ a1 == ARCH_ANY || a2 == ARCH_ANY ||
55+ a1 == ARCH_ALL || a2 == ARCH_ALL)
56+ return 0;
57+#else
58 #ifndef DEBIAN_SEMANTICS
59 if (a1 == a2 || a1 == ARCH_NOARCH || a2 == ARCH_NOARCH)
60 return 0;
61@@ -493,6 +500,7 @@ policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2)
62 if (a1 == a2 || a1 == ARCH_ALL || a2 == ARCH_ALL)
63 return 0;
64 #endif
65+#endif
66 if (!pool->id2arch)
67 return 0;
68 a1 = a1 <= pool->lastarch ? pool->id2arch[a1] : 0;
69diff --git a/src/poolarch.c b/src/poolarch.c
70index 34a14a3..2d7cd70 100644
71--- a/src/poolarch.c
72+++ b/src/poolarch.c
73@@ -20,38 +20,8 @@
74 #include "poolarch.h"
75 #include "util.h"
76
77-const char *archpolicies[] = {
78- "x86_64", "x86_64:i686:i586:i486:i386",
79- "i686", "i686:i586:i486:i386",
80- "i586", "i586:i486:i386",
81- "i486", "i486:i386",
82- "i386", "i386",
83- "s390x", "s390x:s390",
84- "s390", "s390",
85- "ia64", "ia64:i686:i586:i486:i386",
86- "ppc64", "ppc64:ppc",
87- "ppc", "ppc",
88- "armv7nhl", "armv7nhl:armv7hl",
89- "armv7hl", "armv7hl",
90- "armv7l", "armv7l:armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
91- "armv6l", "armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
92- "armv5tejl", "armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
93- "armv5tel", "armv5tel:armv5l:armv4tl:armv4l:armv3l",
94- "armv5l", "armv5l:armv4tl:armv4l:armv3l",
95- "armv4tl", "armv4tl:armv4l:armv3l",
96- "armv4l", "armv4l:armv3l",
97- "armv3l", "armv3l",
98- "sh3", "sh3",
99- "sh4", "sh4",
100- "sh4a", "sh4a:sh4",
101- "sparc64v", "sparc64v:sparc64:sparcv9v:sparcv9:sparcv8:sparc",
102- "sparc64", "sparc64:sparcv9:sparcv8:sparc",
103- "sparcv9v", "sparcv9v:sparcv9:sparcv8:sparc",
104- "sparcv9", "sparcv9:sparcv8:sparc",
105- "sparcv8", "sparcv8:sparc",
106- "sparc", "sparc",
107- 0
108-};
109+/* Provide the const char *archpolicies structure */
110+#include "core-arch.h"
111
112 void
113 pool_setarch(Pool *pool, const char *arch)
114@@ -71,10 +41,10 @@ pool_setarch(Pool *pool, const char *arch)
115 pool->lastarch = 0;
116 return;
117 }
118-#ifndef DEBIAN_SEMANTICS
119- id = ARCH_NOARCH;
120-#else
121+#if defined(DEBIAN_SEMANTICS) || defined(OE_CORE_SEMANTICS)
122 id = ARCH_ALL;
123+#else
124+ id = ARCH_NOARCH;
125 #endif
126 lastarch = id + 255;
127 id2arch = sat_calloc(lastarch + 1, sizeof(Id));