summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package_manager.py
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2014-07-30 22:35:59 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-02 09:26:16 +0100
commita9c8767a1707fa6ea40cbba99d4e12160fd91d11 (patch)
tree3c60bc15d617e8a0a3043b0da69bda902a57e30c /meta/lib/oe/package_manager.py
parent3c61104c29a1d6ea39d40d1472629fbac50d7108 (diff)
downloadpoky-a9c8767a1707fa6ea40cbba99d4e12160fd91d11.tar.gz
package_manager.py: set preferred ABI for rpm
When using the RPM packaging backend to generate a rootfs there needs to be a way to configure the preferred ABI to resolve ELF file conflicts. Currently RPM resolves ELF file conflicts with the last-installed wins. Using SMART it's difficult to know what the last installed will be. There are three specific policies that can be selected: 1: ELF32 wins 2: ELF64 wins 3: ELF64 N32 wins (mips64 or mips64el only) Another option "0" is uncontrollable, which means that if two are being installed at once Elf64 is preferred, but if they're being installed in two different transactions, last in wins, so we don't document it. Add RPM_PREFER_COLOR to let the user config the preferred ABI. [YOCTO #4073] (From OE-Core rev: f56d7be2c35cedcd763ba66913982aa4c425d561) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package_manager.py')
-rw-r--r--meta/lib/oe/package_manager.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 5444422305..a0984c404b 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -821,6 +821,22 @@ class RpmPM(PackageManager):
821 self._invoke_smart('config --set rpm-extra-macros._var=%s' % 821 self._invoke_smart('config --set rpm-extra-macros._var=%s' %
822 self.d.getVar('localstatedir', True)) 822 self.d.getVar('localstatedir', True))
823 cmd = 'config --set rpm-extra-macros._tmppath=/install/tmp' 823 cmd = 'config --set rpm-extra-macros._tmppath=/install/tmp'
824
825 prefer_color = self.d.getVar('RPM_PREFER_COLOR', True)
826 if prefer_color:
827 if prefer_color not in ['0', '1', '2', '3']:
828 bb.fatal("Invalid RPM_PREFER_COLOR: %s, it should be one of:\n"
829 "\t1: ELF32 wins\n"
830 "\t2: ELF64 wins\n"
831 "\t3: ELF64 N32 wins (mips64 or mips64el only)" %
832 prefer_color)
833 if prefer_color == "3" and self.d.getVar("TUNE_ARCH", True) not in \
834 ['mips64', 'mips64el']:
835 bb.fatal("RPM_PREFER_COLOR = \"3\" is for mips64 or mips64el "
836 "only.")
837 self._invoke_smart('config --set rpm-extra-macros._prefer_color=%s'
838 % prefer_color)
839
824 self._invoke_smart(cmd) 840 self._invoke_smart(cmd)
825 841
826 # Write common configuration for host and target usage 842 # Write common configuration for host and target usage