diff options
Diffstat (limited to 'meta/recipes-extended/libzypp/libzypp/builtin-arch.patch')
-rw-r--r-- | meta/recipes-extended/libzypp/libzypp/builtin-arch.patch | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/meta/recipes-extended/libzypp/libzypp/builtin-arch.patch b/meta/recipes-extended/libzypp/libzypp/builtin-arch.patch deleted file mode 100644 index 53dcfac652..0000000000 --- a/meta/recipes-extended/libzypp/libzypp/builtin-arch.patch +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | This patch adds the ${MACHINE_ARCH} and ${PACKAGE_ARCH} to | ||
2 | libzypp available archs, see do_archpatch in .bb for more | ||
3 | details, this is the version for ${BASE_PACKAGE_ARCH} already | ||
4 | recognized in libzypp. | ||
5 | |||
6 | Also "all" is added as a synonym for noarch. | ||
7 | |||
8 | Signed-off-by: Qing He <qing.he@intel.com> | ||
9 | |||
10 | diff --git a/zypp/Arch.cc b/zypp/Arch.cc | ||
11 | index 7b357bb..d9102cc 100644 | ||
12 | --- a/zypp/Arch.cc | ||
13 | +++ b/zypp/Arch.cc | ||
14 | @@ -122,7 +122,13 @@ namespace zypp | ||
15 | |||
16 | /** \relates Arch::CompatEntry */ | ||
17 | inline bool operator==( const Arch::CompatEntry & lhs, const Arch::CompatEntry & rhs ) | ||
18 | - { return lhs._idStr == rhs._idStr; } | ||
19 | + { | ||
20 | + if ( (lhs._idStr == "all" && rhs._idStr == "noarch") || | ||
21 | + (lhs._idStr == "noarch" && rhs._idStr == "all") ) | ||
22 | + return true; | ||
23 | + else | ||
24 | + return lhs._idStr == rhs._idStr; | ||
25 | + } | ||
26 | /** \relates Arch::CompatEntry */ | ||
27 | inline bool operator!=( const Arch::CompatEntry & lhs, const Arch::CompatEntry & rhs ) | ||
28 | { return ! ( lhs == rhs ); } | ||
29 | @@ -153,7 +159,7 @@ namespace zypp | ||
30 | // bit for each architecture. | ||
31 | // | ||
32 | #define DEF_BUILTIN(A) const IdString _##A( #A ); | ||
33 | - DEF_BUILTIN( noarch ); | ||
34 | + const IdString _noarch( "all" ); | ||
35 | |||
36 | DEF_BUILTIN( i386 ); | ||
37 | DEF_BUILTIN( i486 ); | ||
38 | @@ -202,6 +208,8 @@ namespace zypp | ||
39 | |||
40 | DEF_BUILTIN( sh4 ); | ||
41 | DEF_BUILTIN( sh4a ); | ||
42 | + | ||
43 | + const IdString _machine( "@MACHINE_ARCH@" ); | ||
44 | #undef DEF_BUILTIN | ||
45 | |||
46 | /////////////////////////////////////////////////////////////////// | ||
47 | @@ -326,12 +334,14 @@ namespace zypp | ||
48 | // | ||
49 | defCompatibleWith( _sh4, _noarch ); | ||
50 | defCompatibleWith( _sh4a, _noarch,_sh4 ); | ||
51 | + | ||
52 | + defCompatibleWith( _machine, @PKG_ARCH_TAIL@,_@PKG_ARCH@ ); | ||
53 | // | ||
54 | /////////////////////////////////////////////////////////////////// | ||
55 | // dumpOn( USR ) << endl; | ||
56 | } | ||
57 | |||
58 | - private: | ||
59 | + public: | ||
60 | /** Return the next avialable _idBit. | ||
61 | * Ctor injects _noarch into the _compatSet, 1 is for | ||
62 | * nonbuiltin archs, so we can use <tt>size</tt> for | ||
63 | @@ -440,6 +450,8 @@ namespace zypp | ||
64 | const Arch Arch_sh4( _sh4 ); | ||
65 | const Arch Arch_sh4a( _sh4a ); | ||
66 | |||
67 | + const Arch Arch_machine( _machine ); | ||
68 | + | ||
69 | /////////////////////////////////////////////////////////////////// | ||
70 | // | ||
71 | // METHOD NAME : Arch::Arch | ||
72 | diff --git a/zypp/Arch.h b/zypp/Arch.h | ||
73 | index 6b18a6e..092211c 100644 | ||
74 | --- a/zypp/Arch.h | ||
75 | +++ b/zypp/Arch.h | ||
76 | @@ -249,6 +249,8 @@ namespace zypp | ||
77 | extern const Arch Arch_sh4; | ||
78 | /** \relates Arch */ | ||
79 | extern const Arch Arch_sh4a; | ||
80 | + | ||
81 | + extern const Arch Arch_machine; | ||
82 | //@} | ||
83 | |||
84 | /////////////////////////////////////////////////////////////////// | ||
85 | diff --git a/zypp/parser/yum/schema/common-inc.rnc b/zypp/parser/yum/schema/common-inc.rnc | ||
86 | index f12ac3b..24ce06e 100644 | ||
87 | --- a/zypp/parser/yum/schema/common-inc.rnc | ||
88 | +++ b/zypp/parser/yum/schema/common-inc.rnc | ||
89 | @@ -26,6 +26,7 @@ private.evr = | ||
90 | private.localizedtext = attribute lang { "en" | "de" }, text | ||
91 | |||
92 | private.archenum = "noarch" | ||
93 | + | "all" | ||
94 | | "armv4l" | ||
95 | | "armv5el" | ||
96 | | "armv5tel" | ||
97 | @@ -46,4 +47,5 @@ private.archenum = "noarch" | ||
98 | | "sh4" | ||
99 | | "x86_64" | ||
100 | | "src" | ||
101 | + | "@MACHINE_ARCH@" | ||
102 | |||
103 | diff --git a/zypp/parser/yum/schema/common-inc.rng b/zypp/parser/yum/schema/common-inc.rng | ||
104 | index 60e5742..8a9ce2e 100644 | ||
105 | --- a/zypp/parser/yum/schema/common-inc.rng | ||
106 | +++ b/zypp/parser/yum/schema/common-inc.rng | ||
107 | @@ -89,6 +89,7 @@ | ||
108 | <define name="private.archenum"> | ||
109 | <choice> | ||
110 | <value>noarch</value> | ||
111 | + <value>all</value> | ||
112 | <value>armv4l</value> | ||
113 | <value>armv5el</value> | ||
114 | <value>armv5tel</value> | ||
115 | @@ -109,6 +110,7 @@ | ||
116 | <value>sh4</value> | ||
117 | <value>x86_64</value> | ||
118 | <value>src</value> | ||
119 | + <value>@MACHINE_ARCH@</value> | ||
120 | </choice> | ||
121 | </define> | ||
122 | </grammar> | ||