summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-11-23 05:23:44 -0800
committerRobert Yang <liezhi.yang@windriver.com>2015-11-23 05:31:52 -0800
commit991915823dfa6b4cabe990272b246cf4bad05038 (patch)
tree7ac90e59954a2b67224de1344ccb2404e27ef5c1
parent6f98c39418c60b7c0b25b30983d2e5257158a6a4 (diff)
downloadopenembedded-core-contrib-rbt/elf.tar.gz
openembedded-core-contrib-rbt/elf.tar.bz2
openembedded-core-contrib-rbt/elf.zip
package_manager.py: fix RPM_PREFER_ELF_ARCH for mipsrbt/elf
We can install 64 bit pkg to 32 bit pkg, so the previous checking is incorrect, it should not only check mips64 or mips64el, the "mips" should work, and 64bit ELF can also use mips as TUNE_ARCH, and there are other mips varieties, so only check whether TUNE_ARCH starts with mips or not. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/lib/oe/package_manager.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 964fddcda2..5e7bb66d81 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -954,12 +954,11 @@ class RpmPM(PackageManager):
bb.fatal("Invalid RPM_PREFER_ELF_ARCH: %s, it should be one of:\n"
"\t1: ELF32 wins\n"
"\t2: ELF64 wins\n"
- "\t4: ELF64 N32 wins (mips64 or mips64el only)" %
+ "\t4: ELF64 N32 wins (mips only)" %
prefer_color)
- if prefer_color == "4" and self.d.getVar("TUNE_ARCH", True) not in \
- ['mips64', 'mips64el']:
- bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips64 or mips64el "
- "only.")
+ if prefer_color == "4" and not \
+ self.d.getVar("TUNE_ARCH", True).startswith('mips'):
+ bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips only.")
self._invoke_smart('config --set rpm-extra-macros._prefer_color=%s'
% prefer_color)