From: Changqing Li <[email protected]>

fix below error:
file /usr/bin/scons conflicts between attempted installs of 
python-scons-3.0.5-r0.core2_32 and python3-scons-3.0.5-r0.core2_32
file /usr/bin/scons-3.0.5 conflicts between attempted installs of 
python-scons-3.0.5-r0.core2_32 and python3-scons-3.0.5-r0.core2_32
file /usr/bin/scons-configure-cache conflicts between attempted installs of 
python-scons-3.0.5-r0.core2_32 and python3-scons-3.0.5-r0.core2_32
file /usr/bin/scons-configure-cache-3.0.5 conflicts between attempted installs 
of python-scons-3.0.5-r0.core2_32 and python3-scons-3.0.5-r0.core2_32
file /usr/bin/scons-time conflicts between attempted installs of 
python-scons-3.0.5-r0.core2_32 and python3-scons-3.0.5-r0.core2_32
file /usr/bin/scons-time-3.0.5 conflicts between attempted installs of 
python-scons-3.0.5-r0.core2_32 and python3-scons-3.0.5-r0.core2_32
file /usr/bin/sconsign conflicts between attempted installs of 
python-scons-3.0.5-r0.core2_32 and python3-scons-3.0.5-r0.core2_32
file /usr/bin/sconsign-3.0.5 conflicts between attempted installs of 
python-scons-3.0.5-r0.core2_32 and python3-scons-3.0.5-r0.core2_32

Signed-off-by: Changqing Li <[email protected]>
---
 meta/recipes-devtools/python/python-scons_3.0.5.bb  | 14 +++++++++++++-
 meta/recipes-devtools/python/python3-scons_3.0.5.bb | 14 +++++++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-scons_3.0.5.bb 
b/meta/recipes-devtools/python/python-scons_3.0.5.bb
index 939c15b..94c2d07 100644
--- a/meta/recipes-devtools/python/python-scons_3.0.5.bb
+++ b/meta/recipes-devtools/python/python-scons_3.0.5.bb
@@ -12,7 +12,7 @@ S = "${WORKDIR}/scons-${PV}"
 UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html";
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
 
-inherit setuptools
+inherit setuptools update-alternatives
 
 RDEPENDS_${PN} = "\
   python-fcntl \
@@ -22,3 +22,15 @@ RDEPENDS_${PN} = "\
   python-shell \
   python-pprint \
   "
+
+ALTERNATIVE_${PN} = "scons scons-3.0.5 scons-configure-cache 
scons-configure-cache-3.0.5 scons-time scons-time-3.0.5 sconsign sconsign-3.0.5"
+ALTERNATIVE_TARGET[scons] = "${bindir}/scons"
+ALTERNATIVE_TARGET[scons-3.0.5] = "${bindir}/scons-3.0.5"
+ALTERNATIVE_TARGET[scons-configure-cache] = "${bindir}/scons-configure-cache"
+ALTERNATIVE_TARGET[scons-configure-cache-3.0.5] = 
"${bindir}/scons-configure-cache-3.0.5"
+ALTERNATIVE_TARGET[scons-time] = "${bindir}/scons-time"
+ALTERNATIVE_TARGET[scons-time-3.0.5] = "${bindir}/scons-time-3.0.5"
+ALTERNATIVE_TARGET[sconsign] = "${bindir}/sconsign"
+ALTERNATIVE_TARGET[sconsign-3.0.5] = "${bindir}/sconsign-3.0.5"
+
+ALTERNATIVE_PRIORITY = "20"
diff --git a/meta/recipes-devtools/python/python3-scons_3.0.5.bb 
b/meta/recipes-devtools/python/python3-scons_3.0.5.bb
index 7fb75a6..6e240d8 100644
--- a/meta/recipes-devtools/python/python3-scons_3.0.5.bb
+++ b/meta/recipes-devtools/python/python3-scons_3.0.5.bb
@@ -12,7 +12,7 @@ S = "${WORKDIR}/scons-${PV}"
 UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html";
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
 
-inherit setuptools3
+inherit setuptools3 update-alternatives
 
 do_install_prepend() {
     sed -i -e "1s,#!.*python.*,#!${USRBINPATH}/env python3," ${S}/script/*
@@ -27,3 +27,15 @@ RDEPENDS_${PN} = "\
   python3-pickle \
   python3-pprint \
   "
+
+ALTERNATIVE_${PN} = "scons scons-3.0.5 scons-configure-cache 
scons-configure-cache-3.0.5 scons-time scons-time-3.0.5 sconsign sconsign-3.0.5"
+ALTERNATIVE_TARGET[scons] = "${bindir}/scons"
+ALTERNATIVE_TARGET[scons-3.0.5] = "${bindir}/scons-3.0.5"
+ALTERNATIVE_TARGET[scons-configure-cache] = "${bindir}/scons-configure-cache"
+ALTERNATIVE_TARGET[scons-configure-cache-3.0.5] = 
"${bindir}/scons-configure-cache-3.0.5"
+ALTERNATIVE_TARGET[scons-time] = "${bindir}/scons-time"
+ALTERNATIVE_TARGET[scons-time-3.0.5] = "${bindir}/scons-time-3.0.5"
+ALTERNATIVE_TARGET[sconsign] = "${bindir}/sconsign"
+ALTERNATIVE_TARGET[sconsign-3.0.5] = "${bindir}/sconsign-3.0.5"
+
+ALTERNATIVE_PRIORITY = "30"
-- 
2.7.4

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to