* [PATCH 2/4] libzypp: add machine arch support
2011-03-14 11:54 [PATCH 0/4] zypper architecture tuning Qing He
@ 2011-03-14 11:54 ` Qing He
2011-03-14 11:54 ` [PATCH 1/4] sat-solver: " Qing He
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Qing He @ 2011-03-14 11:54 UTC (permalink / raw)
To: openembedded-core
From: Qing He <qing.he@intel.com>
Signed-off-by: Qing He <qing.he@intel.com>
---
.../libzypp/libzypp/archconf.patch | 15 +++
.../libzypp/libzypp/builtin-arch.patch | 122 +++++++++++++++++++
.../libzypp/libzypp/no-builtin-arch.patch | 128 ++++++++++++++++++++
meta/recipes-extended/libzypp/libzypp_git.bb | 28 ++++-
4 files changed, 292 insertions(+), 1 deletions(-)
create mode 100644 meta/recipes-extended/libzypp/libzypp/archconf.patch
create mode 100644 meta/recipes-extended/libzypp/libzypp/builtin-arch.patch
create mode 100644 meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch
diff --git a/meta/recipes-extended/libzypp/libzypp/archconf.patch b/meta/recipes-extended/libzypp/libzypp/archconf.patch
new file mode 100644
index 0000000..44ebe33
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/archconf.patch
@@ -0,0 +1,15 @@
+diff --git a/zypp.conf b/zypp.conf
+index 1e84a3f..7a26548 100644
+--- a/zypp.conf
++++ b/zypp.conf
+@@ -17,7 +17,10 @@
+ ## ** Changing this needs a full refresh (incl. download)
+ ## ** of all repository data.
+ ##
++## ** CAUTION: Don't change this value on yocto !
++##
+ # arch = s390
++arch = @MACHINE_ARCH@
+
+
+ ##
diff --git a/meta/recipes-extended/libzypp/libzypp/builtin-arch.patch b/meta/recipes-extended/libzypp/libzypp/builtin-arch.patch
new file mode 100644
index 0000000..53dcfac
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/builtin-arch.patch
@@ -0,0 +1,122 @@
+This patch adds the ${MACHINE_ARCH} and ${PACKAGE_ARCH} to
+libzypp available archs, see do_archpatch in .bb for more
+details, this is the version for ${BASE_PACKAGE_ARCH} already
+recognized in libzypp.
+
+Also "all" is added as a synonym for noarch.
+
+Signed-off-by: Qing He <qing.he@intel.com>
+
+diff --git a/zypp/Arch.cc b/zypp/Arch.cc
+index 7b357bb..d9102cc 100644
+--- a/zypp/Arch.cc
++++ b/zypp/Arch.cc
+@@ -122,7 +122,13 @@ namespace zypp
+
+ /** \relates Arch::CompatEntry */
+ inline bool operator==( const Arch::CompatEntry & lhs, const Arch::CompatEntry & rhs )
+- { return lhs._idStr == rhs._idStr; }
++ {
++ if ( (lhs._idStr == "all" && rhs._idStr == "noarch") ||
++ (lhs._idStr == "noarch" && rhs._idStr == "all") )
++ return true;
++ else
++ return lhs._idStr == rhs._idStr;
++ }
+ /** \relates Arch::CompatEntry */
+ inline bool operator!=( const Arch::CompatEntry & lhs, const Arch::CompatEntry & rhs )
+ { return ! ( lhs == rhs ); }
+@@ -153,7 +159,7 @@ namespace zypp
+ // bit for each architecture.
+ //
+ #define DEF_BUILTIN(A) const IdString _##A( #A );
+- DEF_BUILTIN( noarch );
++ const IdString _noarch( "all" );
+
+ DEF_BUILTIN( i386 );
+ DEF_BUILTIN( i486 );
+@@ -202,6 +208,8 @@ namespace zypp
+
+ DEF_BUILTIN( sh4 );
+ DEF_BUILTIN( sh4a );
++
++ const IdString _machine( "@MACHINE_ARCH@" );
+ #undef DEF_BUILTIN
+
+ ///////////////////////////////////////////////////////////////////
+@@ -326,12 +334,14 @@ namespace zypp
+ //
+ defCompatibleWith( _sh4, _noarch );
+ defCompatibleWith( _sh4a, _noarch,_sh4 );
++
++ defCompatibleWith( _machine, @PKG_ARCH_TAIL@,_@PKG_ARCH@ );
+ //
+ ///////////////////////////////////////////////////////////////////
+ // dumpOn( USR ) << endl;
+ }
+
+- private:
++ public:
+ /** Return the next avialable _idBit.
+ * Ctor injects _noarch into the _compatSet, 1 is for
+ * nonbuiltin archs, so we can use <tt>size</tt> for
+@@ -440,6 +450,8 @@ namespace zypp
+ const Arch Arch_sh4( _sh4 );
+ const Arch Arch_sh4a( _sh4a );
+
++ const Arch Arch_machine( _machine );
++
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : Arch::Arch
+diff --git a/zypp/Arch.h b/zypp/Arch.h
+index 6b18a6e..092211c 100644
+--- a/zypp/Arch.h
++++ b/zypp/Arch.h
+@@ -249,6 +249,8 @@ namespace zypp
+ extern const Arch Arch_sh4;
+ /** \relates Arch */
+ extern const Arch Arch_sh4a;
++
++ extern const Arch Arch_machine;
+ //@}
+
+ ///////////////////////////////////////////////////////////////////
+diff --git a/zypp/parser/yum/schema/common-inc.rnc b/zypp/parser/yum/schema/common-inc.rnc
+index f12ac3b..24ce06e 100644
+--- a/zypp/parser/yum/schema/common-inc.rnc
++++ b/zypp/parser/yum/schema/common-inc.rnc
+@@ -26,6 +26,7 @@ private.evr =
+ private.localizedtext = attribute lang { "en" | "de" }, text
+
+ private.archenum = "noarch"
++ | "all"
+ | "armv4l"
+ | "armv5el"
+ | "armv5tel"
+@@ -46,4 +47,5 @@ private.archenum = "noarch"
+ | "sh4"
+ | "x86_64"
+ | "src"
++ | "@MACHINE_ARCH@"
+
+diff --git a/zypp/parser/yum/schema/common-inc.rng b/zypp/parser/yum/schema/common-inc.rng
+index 60e5742..8a9ce2e 100644
+--- a/zypp/parser/yum/schema/common-inc.rng
++++ b/zypp/parser/yum/schema/common-inc.rng
+@@ -89,6 +89,7 @@
+ <define name="private.archenum">
+ <choice>
+ <value>noarch</value>
++ <value>all</value>
+ <value>armv4l</value>
+ <value>armv5el</value>
+ <value>armv5tel</value>
+@@ -109,6 +110,7 @@
+ <value>sh4</value>
+ <value>x86_64</value>
+ <value>src</value>
++ <value>@MACHINE_ARCH@</value>
+ </choice>
+ </define>
+ </grammar>
diff --git a/meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch b/meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch
new file mode 100644
index 0000000..22dd89c
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch
@@ -0,0 +1,128 @@
+This patch adds the ${MACHINE_ARCH} and ${PACKAGE_ARCH} to
+libzypp available archs, see do_archpatch in .bb for more
+details, this is the version for ${BASE_PACKAGE_ARCH} not
+recognized in libzypp.
+
+Also "all" is added as a synonym for noarch.
+
+Signed-off-by: Qing He <qing.he@intel.com>
+
+diff --git a/zypp/Arch.cc b/zypp/Arch.cc
+index 7b357bb..d4cbca6 100644
+--- a/zypp/Arch.cc
++++ b/zypp/Arch.cc
+@@ -122,7 +122,13 @@ namespace zypp
+
+ /** \relates Arch::CompatEntry */
+ inline bool operator==( const Arch::CompatEntry & lhs, const Arch::CompatEntry & rhs )
+- { return lhs._idStr == rhs._idStr; }
++ {
++ if ( (lhs._idStr == "all" && rhs._idStr == "noarch") ||
++ (lhs._idStr == "noarch" && rhs._idStr == "all") )
++ return true;
++ else
++ return lhs._idStr == rhs._idStr;
++ }
+ /** \relates Arch::CompatEntry */
+ inline bool operator!=( const Arch::CompatEntry & lhs, const Arch::CompatEntry & rhs )
+ { return ! ( lhs == rhs ); }
+@@ -153,7 +159,7 @@ namespace zypp
+ // bit for each architecture.
+ //
+ #define DEF_BUILTIN(A) const IdString _##A( #A );
+- DEF_BUILTIN( noarch );
++ const IdString _noarch( "all" );
+
+ DEF_BUILTIN( i386 );
+ DEF_BUILTIN( i486 );
+@@ -202,6 +208,9 @@ namespace zypp
+
+ DEF_BUILTIN( sh4 );
+ DEF_BUILTIN( sh4a );
++
++ const IdString _package( "@PKG_ARCH@" );
++ const IdString _machine( "@MACHINE_ARCH@" );
+ #undef DEF_BUILTIN
+
+ ///////////////////////////////////////////////////////////////////
+@@ -326,12 +335,15 @@ namespace zypp
+ //
+ defCompatibleWith( _sh4, _noarch );
+ defCompatibleWith( _sh4a, _noarch,_sh4 );
++
++ defCompatibleWith( _package, _noarch );
++ defCompatibleWith( _machine, _noarch,_package );
+ //
+ ///////////////////////////////////////////////////////////////////
+ // dumpOn( USR ) << endl;
+ }
+
+- private:
++ public:
+ /** Return the next avialable _idBit.
+ * Ctor injects _noarch into the _compatSet, 1 is for
+ * nonbuiltin archs, so we can use <tt>size</tt> for
+@@ -440,6 +452,9 @@ namespace zypp
+ const Arch Arch_sh4( _sh4 );
+ const Arch Arch_sh4a( _sh4a );
+
++ const Arch Arch_package( _package );
++ const Arch Arch_machine( _machine );
++
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : Arch::Arch
+diff --git a/zypp/Arch.h b/zypp/Arch.h
+index 6b18a6e..f91a562 100644
+--- a/zypp/Arch.h
++++ b/zypp/Arch.h
+@@ -249,6 +249,9 @@ namespace zypp
+ extern const Arch Arch_sh4;
+ /** \relates Arch */
+ extern const Arch Arch_sh4a;
++
++ extern const Arch Arch_package;
++ extern const Arch Arch_machine;
+ //@}
+
+ ///////////////////////////////////////////////////////////////////
+diff --git a/zypp/parser/yum/schema/common-inc.rnc b/zypp/parser/yum/schema/common-inc.rnc
+index f12ac3b..04677c3 100644
+--- a/zypp/parser/yum/schema/common-inc.rnc
++++ b/zypp/parser/yum/schema/common-inc.rnc
+@@ -26,6 +26,7 @@ private.evr =
+ private.localizedtext = attribute lang { "en" | "de" }, text
+
+ private.archenum = "noarch"
++ | "all"
+ | "armv4l"
+ | "armv5el"
+ | "armv5tel"
+@@ -46,4 +47,6 @@ private.archenum = "noarch"
+ | "sh4"
+ | "x86_64"
+ | "src"
++ | "@PKG_ARCH@"
++ | "@MACHINE_ARCH@"
+
+diff --git a/zypp/parser/yum/schema/common-inc.rng b/zypp/parser/yum/schema/common-inc.rng
+index 60e5742..27694aa 100644
+--- a/zypp/parser/yum/schema/common-inc.rng
++++ b/zypp/parser/yum/schema/common-inc.rng
+@@ -89,6 +89,7 @@
+ <define name="private.archenum">
+ <choice>
+ <value>noarch</value>
++ <value>all</value>
+ <value>armv4l</value>
+ <value>armv5el</value>
+ <value>armv5tel</value>
+@@ -109,6 +110,8 @@
+ <value>sh4</value>
+ <value>x86_64</value>
+ <value>src</value>
++ <value>@PKG_ARCH@</value>
++ <value>@MACHINE_ARCH@</value>
+ </choice>
+ </define>
+ </grammar>
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb
index b9110eb..825339d 100644
--- a/meta/recipes-extended/libzypp/libzypp_git.bb
+++ b/meta/recipes-extended/libzypp/libzypp_git.bb
@@ -13,12 +13,15 @@ RDEPENDS_${PN} = "sat-solver"
S = "${WORKDIR}/git"
PV = "0.0-git${SRCPV}"
-PR = "r6"
+PR = "r7"
SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \
file://no-doc.patch \
file://rpm5.patch \
file://rpm5-no-rpmdbinit.patch \
+ file://builtin-arch.patch;apply=no \
+ file://no-builtin-arch.patch;apply=no \
+ file://archconf.patch;apply=no \
"
SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
@@ -27,3 +30,26 @@ FILES_${PN} += "${libdir}/zypp ${datadir}/zypp ${datadir}/icons"
FILES_${PN}-dev += "${datadir}/cmake"
EXTRA_OECMAKE += "-DLIB=lib"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_archpatch () {
+ PKG_ARCH_TAIL=`sed -n ${S}/zypp/Arch.cc -e "s|^.*defCompatibleWith( _${BASE_PACKAGE_ARCH},[ \t]*\(.*\) .*$|\1|p"`
+ if [ "x${PKG_ARCH_TAIL}" == x ]; then
+ PATCHFILE=${WORKDIR}/no-builtin-arch.patch
+ else
+ PATCHFILE=${WORKDIR}/builtin-arch.patch
+ fi
+
+ sed -i "${PATCHFILE}" \
+ -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" \
+ -e "s|@PKG_ARCH@|${BASE_PACKAGE_ARCH}|g" \
+ -e "s|@PKG_ARCH_TAIL@|${PKG_ARCH_TAIL}|g"
+
+ patch -p1 -i "${PATCHFILE}"
+
+ sed -i ${WORKDIR}/archconf.patch -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g"
+ patch -p1 -i ${WORKDIR}/archconf.patch
+}
+
+addtask archpatch before do_patch after do_unpack
--
1.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 0/4] zypper architecture tuning
@ 2011-03-14 11:54 Qing He
2011-03-14 11:54 ` [PATCH 2/4] libzypp: add machine arch support Qing He
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Qing He @ 2011-03-14 11:54 UTC (permalink / raw)
To: openembedded-core
From: Qing He <qing.he@intel.com>
Zypper and its dependencies used a hard coded list for all the
archs it supports, which doesn't contains several cpu archs like mips,
as well as the ${MACHINE_ARCH} used in poky. This patch set intends to
add this support.
Also fixes package archs of qemux86-64.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: qhe/zypp1
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=qhe/zypp1
Thanks,
Qing He <qing.he@intel.com>
---
Qing He (4):
sat-solver: add machine arch support
libzypp: add machine arch support
zypper: add machine arch support
qemux86-64: set qemux86_64 as package arch name
meta/conf/bitbake.conf | 3 +-
.../libzypp/libzypp/archconf.patch | 15 +++
.../libzypp/libzypp/builtin-arch.patch | 122 +++++++++++++++++++
.../libzypp/libzypp/no-builtin-arch.patch | 128 ++++++++++++++++++++
meta/recipes-extended/libzypp/libzypp_git.bb | 28 ++++-
.../sat-solver/sat-solver/builtin-arch.patch | 28 +++++
.../sat-solver/sat-solver/no-builtin-arch.patch | 29 +++++
meta/recipes-extended/sat-solver/sat-solver_git.bb | 28 ++++-
meta/recipes-extended/zypper/zypper_git.bb | 4 +-
9 files changed, 380 insertions(+), 5 deletions(-)
create mode 100644 meta/recipes-extended/libzypp/libzypp/archconf.patch
create mode 100644 meta/recipes-extended/libzypp/libzypp/builtin-arch.patch
create mode 100644 meta/recipes-extended/libzypp/libzypp/no-builtin-arch.patch
create mode 100644 meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch
create mode 100644 meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/4] qemux86-64: set qemux86_64 as package arch name
2011-03-14 11:54 [PATCH 0/4] zypper architecture tuning Qing He
` (2 preceding siblings ...)
2011-03-14 11:54 ` [PATCH 3/4] zypper: " Qing He
@ 2011-03-14 11:54 ` Qing He
3 siblings, 0 replies; 5+ messages in thread
From: Qing He @ 2011-03-14 11:54 UTC (permalink / raw)
To: openembedded-core
From: Qing He <qing.he@intel.com>
thus allows rpmbuild to generated RPMs with the right architecture.
Signed-off-by: Qing He <qing.he@intel.com>
---
meta/conf/bitbake.conf | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index cf99a81..42b9825 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -93,7 +93,8 @@ SDK_CC_ARCH = "${BUILD_CC_ARCH}"
BASE_PACKAGE_ARCH = "${HOST_ARCH}"
PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
MACHINE_ARCH = "${@[bb.data.getVar('BASE_PACKAGE_ARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))]}"
-PACKAGE_ARCHS = "all any noarch ${TARGET_ARCH} ${PACKAGE_EXTRA_ARCHS} ${MACHINE}"
+MACHINE_ARCH_qemux86-64 = "qemux86_64"
+PACKAGE_ARCHS = "all any noarch ${TARGET_ARCH} ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
# MACHINE shouldn't be included here as a variable dependency since machine specific
# packages are handled using multimachine
PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
--
1.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 1/4] sat-solver: add machine arch support
2011-03-14 11:54 [PATCH 0/4] zypper architecture tuning Qing He
2011-03-14 11:54 ` [PATCH 2/4] libzypp: add machine arch support Qing He
@ 2011-03-14 11:54 ` Qing He
2011-03-14 11:54 ` [PATCH 3/4] zypper: " Qing He
2011-03-14 11:54 ` [PATCH 4/4] qemux86-64: set qemux86_64 as package arch name Qing He
3 siblings, 0 replies; 5+ messages in thread
From: Qing He @ 2011-03-14 11:54 UTC (permalink / raw)
To: openembedded-core
From: Qing He <qing.he@intel.com>
Signed-off-by: Qing He <qing.he@intel.com>
---
.../sat-solver/sat-solver/builtin-arch.patch | 28 +++++++++++++++++++
.../sat-solver/sat-solver/no-builtin-arch.patch | 29 ++++++++++++++++++++
meta/recipes-extended/sat-solver/sat-solver_git.bb | 28 +++++++++++++++++-
3 files changed, 83 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch
create mode 100644 meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch
diff --git a/meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch b/meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch
new file mode 100644
index 0000000..c228c36
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/builtin-arch.patch
@@ -0,0 +1,28 @@
+This patch adds the ${MACHINE_ARCH} and ${PACKAGE_ARCH} to
+sat-solver available archs, see do_archpatch in .bb for more
+details, this is the version for ${BASE_PACKAGE_ARCH} already
+recognized in sat-sovler.
+
+Signed-off-by: Qing He <qing.he@intel.com>
+
+diff --git a/src/poolarch.c b/src/poolarch.c
+index 34a14a3..660959b 100644
+--- a/src/poolarch.c
++++ b/src/poolarch.c
+@@ -21,6 +21,7 @@
+ #include "util.h"
+
+ const char *archpolicies[] = {
++ "@MACHINE_ARCH@", "@MACHINE_ARCH@:@PKG_ARCH_TAIL@",
+ "x86_64", "x86_64:i686:i586:i486:i386",
+ "i686", "i686:i586:i486:i386",
+ "i586", "i586:i486:i386",
+@@ -72,7 +74,7 @@ pool_setarch(Pool *pool, const char *arch)
+ return;
+ }
+ #ifndef DEBIAN_SEMANTICS
+- id = ARCH_NOARCH;
++ id = ARCH_ALL;
+ #else
+ id = ARCH_ALL;
+ #endif
diff --git a/meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch b/meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch
new file mode 100644
index 0000000..225fbfe
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/no-builtin-arch.patch
@@ -0,0 +1,29 @@
+This patch adds the ${MACHINE_ARCH} and ${PACKAGE_ARCH} to
+sat-solver available archs, see do_archpatch in .bb for more
+details, this is the version for ${BASE_PACKAGE_ARCH} not
+recognized in sat-sovler.
+
+Signed-off-by: Qing He <qing.he@intel.com>
+
+diff --git a/src/poolarch.c b/src/poolarch.c
+index 34a14a3..36367ba 100644
+--- a/src/poolarch.c
++++ b/src/poolarch.c
+@@ -21,6 +21,8 @@
+ #include "util.h"
+
+ const char *archpolicies[] = {
++ "@MACHINE_ARCH@", "@MACHINE_ARCH@:@PKG_ARCH@",
++ "@PKG_ARCH@", "@PKG_ARCH@",
+ "x86_64", "x86_64:i686:i586:i486:i386",
+ "i686", "i686:i586:i486:i386",
+ "i586", "i586:i486:i386",
+@@ -72,7 +74,7 @@ pool_setarch(Pool *pool, const char *arch)
+ return;
+ }
+ #ifndef DEBIAN_SEMANTICS
+- id = ARCH_NOARCH;
++ id = ARCH_ALL;
+ #else
+ id = ARCH_ALL;
+ #endif
diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
index 02b6c75..54420cd 100644
--- a/meta/recipes-extended/sat-solver/sat-solver_git.bb
+++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
@@ -7,14 +7,38 @@ LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
DEPENDS = "libcheck rpm zlib expat db"
PV = "0.0-git${SRCPV}"
-PR = "r3"
+PR = "r4"
SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \
file://cmake.patch \
file://rpm5.patch \
- file://db5.patch"
+ file://db5.patch \
+ file://builtin-arch.patch;apply=no \
+ file://no-builtin-arch.patch;apply=no \
+ "
S = "${WORKDIR}/git"
EXTRA_OECMAKE += "-DLIB=lib"
+
inherit cmake pkgconfig
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_archpatch () {
+ PKG_ARCH_TAIL=`sed -n ${S}/src/poolarch.c -e "s|^ \"\(${BASE_PACKAGE_ARCH}\)\",.*\"\(.*\)\",.*$|\2|p"`
+ if [ "x${PKG_ARCH_TAIL}" == x ]; then
+ PATCHFILE=${WORKDIR}/no-builtin-arch.patch
+ else
+ PATCHFILE=${WORKDIR}/builtin-arch.patch
+ fi
+
+ sed -i "${PATCHFILE}" \
+ -e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" \
+ -e "s|@PKG_ARCH@|${BASE_PACKAGE_ARCH}|g" \
+ -e "s|@PKG_ARCH_TAIL@|${PKG_ARCH_TAIL}|g"
+
+ patch -p1 -i "${PATCHFILE}"
+}
+
+addtask archpatch before do_patch after do_unpack
--
1.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] zypper: add machine arch support
2011-03-14 11:54 [PATCH 0/4] zypper architecture tuning Qing He
2011-03-14 11:54 ` [PATCH 2/4] libzypp: add machine arch support Qing He
2011-03-14 11:54 ` [PATCH 1/4] sat-solver: " Qing He
@ 2011-03-14 11:54 ` Qing He
2011-03-14 11:54 ` [PATCH 4/4] qemux86-64: set qemux86_64 as package arch name Qing He
3 siblings, 0 replies; 5+ messages in thread
From: Qing He @ 2011-03-14 11:54 UTC (permalink / raw)
To: openembedded-core
From: Qing He <qing.he@intel.com>
Since libzypp is now of ${MACHINE_ARCH}, change zypper to base
on this arch to.
Signed-off-by: Qing He <qing.he@intel.com>
---
meta/recipes-extended/zypper/zypper_git.bb | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-extended/zypper/zypper_git.bb b/meta/recipes-extended/zypper/zypper_git.bb
index af6bd49..9258477 100644
--- a/meta/recipes-extended/zypper/zypper_git.bb
+++ b/meta/recipes-extended/zypper/zypper_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3201406e350b39e05a82e28b5020f413"
DEPENDS = "libzypp augeas"
RRECOMMENDS_${PN} = "procps util-linux-uuidgen"
-PR = "r4"
+PR = "r5"
inherit cmake
@@ -18,3 +18,5 @@ SRC_URI = "git://gitorious.org/opensuse/zypper.git;protocol=git \
S = "${WORKDIR}/git"
PV = "1.5.3-git${SRCPV}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
--
1.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-14 12:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 11:54 [PATCH 0/4] zypper architecture tuning Qing He
2011-03-14 11:54 ` [PATCH 2/4] libzypp: add machine arch support Qing He
2011-03-14 11:54 ` [PATCH 1/4] sat-solver: " Qing He
2011-03-14 11:54 ` [PATCH 3/4] zypper: " Qing He
2011-03-14 11:54 ` [PATCH 4/4] qemux86-64: set qemux86_64 as package arch name Qing He
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.