diff options
Diffstat (limited to 'meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch')
-rw-r--r-- | meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch b/meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch deleted file mode 100644 index 22dd89c45f..0000000000 --- a/meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch +++ /dev/null | |||
@@ -1,128 +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} not | ||
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..d4cbca6 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,9 @@ namespace zypp | ||
39 | |||
40 | DEF_BUILTIN( sh4 ); | ||
41 | DEF_BUILTIN( sh4a ); | ||
42 | + | ||
43 | + const IdString _package( "@PKG_ARCH@" ); | ||
44 | + const IdString _machine( "@MACHINE_ARCH@" ); | ||
45 | #undef DEF_BUILTIN | ||
46 | |||
47 | /////////////////////////////////////////////////////////////////// | ||
48 | @@ -326,12 +335,15 @@ namespace zypp | ||
49 | // | ||
50 | defCompatibleWith( _sh4, _noarch ); | ||
51 | defCompatibleWith( _sh4a, _noarch,_sh4 ); | ||
52 | + | ||
53 | + defCompatibleWith( _package, _noarch ); | ||
54 | + defCompatibleWith( _machine, _noarch,_package ); | ||
55 | // | ||
56 | /////////////////////////////////////////////////////////////////// | ||
57 | // dumpOn( USR ) << endl; | ||
58 | } | ||
59 | |||
60 | - private: | ||
61 | + public: | ||
62 | /** Return the next avialable _idBit. | ||
63 | * Ctor injects _noarch into the _compatSet, 1 is for | ||
64 | * nonbuiltin archs, so we can use <tt>size</tt> for | ||
65 | @@ -440,6 +452,9 @@ namespace zypp | ||
66 | const Arch Arch_sh4( _sh4 ); | ||
67 | const Arch Arch_sh4a( _sh4a ); | ||
68 | |||
69 | + const Arch Arch_package( _package ); | ||
70 | + const Arch Arch_machine( _machine ); | ||
71 | + | ||
72 | /////////////////////////////////////////////////////////////////// | ||
73 | // | ||
74 | // METHOD NAME : Arch::Arch | ||
75 | diff --git a/zypp/Arch.h b/zypp/Arch.h | ||
76 | index 6b18a6e..f91a562 100644 | ||
77 | --- a/zypp/Arch.h | ||
78 | +++ b/zypp/Arch.h | ||
79 | @@ -249,6 +249,9 @@ namespace zypp | ||
80 | extern const Arch Arch_sh4; | ||
81 | /** \relates Arch */ | ||
82 | extern const Arch Arch_sh4a; | ||
83 | + | ||
84 | + extern const Arch Arch_package; | ||
85 | + extern const Arch Arch_machine; | ||
86 | //@} | ||
87 | |||
88 | /////////////////////////////////////////////////////////////////// | ||
89 | diff --git a/zypp/parser/yum/schema/common-inc.rnc b/zypp/parser/yum/schema/common-inc.rnc | ||
90 | index f12ac3b..04677c3 100644 | ||
91 | --- a/zypp/parser/yum/schema/common-inc.rnc | ||
92 | +++ b/zypp/parser/yum/schema/common-inc.rnc | ||
93 | @@ -26,6 +26,7 @@ private.evr = | ||
94 | private.localizedtext = attribute lang { "en" | "de" }, text | ||
95 | |||
96 | private.archenum = "noarch" | ||
97 | + | "all" | ||
98 | | "armv4l" | ||
99 | | "armv5el" | ||
100 | | "armv5tel" | ||
101 | @@ -46,4 +47,6 @@ private.archenum = "noarch" | ||
102 | | "sh4" | ||
103 | | "x86_64" | ||
104 | | "src" | ||
105 | + | "@PKG_ARCH@" | ||
106 | + | "@MACHINE_ARCH@" | ||
107 | |||
108 | diff --git a/zypp/parser/yum/schema/common-inc.rng b/zypp/parser/yum/schema/common-inc.rng | ||
109 | index 60e5742..27694aa 100644 | ||
110 | --- a/zypp/parser/yum/schema/common-inc.rng | ||
111 | +++ b/zypp/parser/yum/schema/common-inc.rng | ||
112 | @@ -89,6 +89,7 @@ | ||
113 | <define name="private.archenum"> | ||
114 | <choice> | ||
115 | <value>noarch</value> | ||
116 | + <value>all</value> | ||
117 | <value>armv4l</value> | ||
118 | <value>armv5el</value> | ||
119 | <value>armv5tel</value> | ||
120 | @@ -109,6 +110,8 @@ | ||
121 | <value>sh4</value> | ||
122 | <value>x86_64</value> | ||
123 | <value>src</value> | ||
124 | + <value>@PKG_ARCH@</value> | ||
125 | + <value>@MACHINE_ARCH@</value> | ||
126 | </choice> | ||
127 | </define> | ||
128 | </grammar> | ||