Skip to contentSkip to conversation

nativesdk-qtbase: do qmake replacement in ${D} instead of ${B}

PATCH In review Denys Dmytriyenko 3 participants 7 messages Feb 20, 2014 – Feb 24, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 nativesdk-qtbase: do qmake replacement in ${D} instead of ${B}

From: Denys Dmytriyenko <[email protected]>

* This way we don't mangle ${B} and can repeat do_install if necessary. And previously it would require running do_compile again to restore the proper state of ${B}.
* Need to bump PR, since do_compile isn't changing, but needs to re-run to re-populate qmake-real binary.

---
 recipes-qt/qt5/nativesdk-qtbase.inc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
recipes-qt/qt5/nativesdk-qtbase.inc +6 -6
index fa44009..3cb9b0e 100644
@@ -10,6 +10,8 @@ require nativesdk-qt5.inc
 # it's already included with newer oe-core, but include it here for dylan
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
 
+PR = "r1"
+
 # common with -native and target version
 SRC_URI += "\
     file://0001-Add-linux-oe-g-platform.patch \
@@ -192,14 +194,12 @@ do_install() {
     # Fix install paths for all
     find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE},(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"
 
-    # switch back the proper qmake
-    if [ -e ${B}/bin/qmake-real ]; then
-        rm ${B}/bin/qmake
-        mv ${B}/bin/qmake-real ${B}/bin/qmake
-    fi
-
     oe_runmake install INSTALL_ROOT=${D}
 
+    # replace the native qmake installed above with nativesdk version
+    rm -rf ${D}${OE_QMAKE_PATH_HOST_BINS}/qmake
+    install -m 755 ${B}/bin/qmake-real ${D}${OE_QMAKE_PATH_HOST_BINS}/qmake
+
     # for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt)
     # e.g. qt3d, qtwayland
     ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
Signature · 1 line
1.8.3.2
#1 lore raw

Hello Denys,

Quoted 9 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

* This way we don't mangle ${B} and can repeat do_install if necessary. And previously it would require running do_compile again to restore the proper state of ${B}.
* Need to bump PR, since do_compile isn't changing, but needs to re-run to re-populate qmake-real binary.

Works like a charm. I will wait until tomorrow to see if someone has any extra feedback and push it.

Thanks for reworking the patch.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#2 lore raw
In reply to Denys Dmytriyenko
Quoted 18 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

* This way we don't mangle ${B} and can repeat do_install if necessary. And previously it would require running do_compile again to restore the proper state of ${B}.
* Need to bump PR, since do_compile isn't changing, but needs to re-run to re-populate qmake-real binary.

---
 recipes-qt/qt5/nativesdk-qtbase.inc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
recipes-qt/qt5/nativesdk-qtbase.inc +0 -0
index fa44009..3cb9b0e 100644

recipes-qt/qt5/nativesdk-qtbase.inc require nativesdk-qt5.inc · line 14

Quoted 5 lines
recipes-qt/qt5/nativesdk-qtbase.inc +2 -0
@@ -10,6 +10,8 @@ require nativesdk-qt5.inc
 # it's already included with newer oe-core, but include it here for dylan
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
 
+PR = "r1"
+

It's already merged, but please don't add new PRs, especially to .inc files.

Quoted 29 lines
recipes-qt/qt5/nativesdk-qtbase.inc +4 -6
 # common with -native and target version
 SRC_URI += "\
     file://0001-Add-linux-oe-g-platform.patch \
@@ -192,14 +194,12 @@ do_install() {
     # Fix install paths for all
     find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE},(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"
 
-    # switch back the proper qmake
-    if [ -e ${B}/bin/qmake-real ]; then
-        rm ${B}/bin/qmake
-        mv ${B}/bin/qmake-real ${B}/bin/qmake
-    fi
-
     oe_runmake install INSTALL_ROOT=${D}
 
+    # replace the native qmake installed above with nativesdk version
+    rm -rf ${D}${OE_QMAKE_PATH_HOST_BINS}/qmake
+    install -m 755 ${B}/bin/qmake-real ${D}${OE_QMAKE_PATH_HOST_BINS}/qmake
+
     # for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt)
     # e.g. qt3d, qtwayland
     ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
Signature · 6 lines
1.8.3.2

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw
Quoted 22 lines · Martin Jansa
Quoted 21 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

* This way we don't mangle ${B} and can repeat do_install if necessary. And previously it would require running do_compile again to restore the proper state of ${B}.
* Need to bump PR, since do_compile isn't changing, but needs to re-run to re-populate qmake-real binary.

---
 recipes-qt/qt5/nativesdk-qtbase.inc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
recipes-qt/qt5/nativesdk-qtbase.inc +0 -0
index fa44009..3cb9b0e 100644
@@ -10,6 +10,8 @@ require nativesdk-qt5.inc
 # it's already included with newer oe-core, but include it here for dylan
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
 
Quoted 5 lines

recipes-qt/qt5/nativesdk-qtbase.inc require nativesdk-qt5.inc · line 14

Quoted 2 lines
recipes-qt/qt5/nativesdk-qtbase.inc +2 -0
+PR = "r1"
+

It's already merged, but please don't add new PRs, especially to .inc files.

Please read the commit description above that explains the reason PR is required here. Without it, the build will be broken for everyone who already built nativesdk-qtbase and would require a clean up or rerun of do_compile

Quoted 39 lines
Quoted 29 lines
recipes-qt/qt5/nativesdk-qtbase.inc +4 -6
 # common with -native and target version
 SRC_URI += "\
     file://0001-Add-linux-oe-g-platform.patch \
@@ -192,14 +194,12 @@ do_install() {
     # Fix install paths for all
     find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE},(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"
 
-    # switch back the proper qmake
-    if [ -e ${B}/bin/qmake-real ]; then
-        rm ${B}/bin/qmake
-        mv ${B}/bin/qmake-real ${B}/bin/qmake
-    fi
-
     oe_runmake install INSTALL_ROOT=${D}
 
+    # replace the native qmake installed above with nativesdk version
+    rm -rf ${D}${OE_QMAKE_PATH_HOST_BINS}/qmake
+    install -m 755 ${B}/bin/qmake-real ${D}${OE_QMAKE_PATH_HOST_BINS}/qmake
+
     # for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt)
     # e.g. qt3d, qtwayland
     ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
Signature · 6 lines
1.8.3.2

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 8 lines
Martin 'JaMa' Jansa     jabber: [email protected]



_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
#4 lore raw
In reply to Martin Jansa

Hello Martin,

Quoted 22 lines · Martin Jansa
Quoted 21 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

* This way we don't mangle ${B} and can repeat do_install if necessary. And previously it would require running do_compile again to restore the proper state of ${B}.
* Need to bump PR, since do_compile isn't changing, but needs to re-run to re-populate qmake-real binary.

---
 recipes-qt/qt5/nativesdk-qtbase.inc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
recipes-qt/qt5/nativesdk-qtbase.inc +0 -0
index fa44009..3cb9b0e 100644
@@ -10,6 +10,8 @@ require nativesdk-qt5.inc
 # it's already included with newer oe-core, but include it here for dylan
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
 
Quoted 5 lines

recipes-qt/qt5/nativesdk-qtbase.inc require nativesdk-qt5.inc · line 14

Quoted 2 lines
recipes-qt/qt5/nativesdk-qtbase.inc +2 -0
+PR = "r1"
+

It's already merged, but please don't add new PRs, especially to .inc files.

As explained by Denys this is really need, in this case. I agree it could have been put in the bb recipe though.

Denys, could you move this to the bb recipe? This avoids the PR to be kept when we update to newer version.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#5 lore raw
Quoted 25 lines · Otavio Salvador

Hello Martin,

Quoted 22 lines · Martin Jansa
Quoted 21 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

* This way we don't mangle ${B} and can repeat do_install if necessary. And previously it would require running do_compile again to restore the proper state of ${B}.
* Need to bump PR, since do_compile isn't changing, but needs to re-run to re-populate qmake-real binary.

---
 recipes-qt/qt5/nativesdk-qtbase.inc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
recipes-qt/qt5/nativesdk-qtbase.inc +0 -0
index fa44009..3cb9b0e 100644
@@ -10,6 +10,8 @@ require nativesdk-qt5.inc
 # it's already included with newer oe-core, but include it here for dylan
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
 
Quoted 8 lines
Quoted 5 lines

recipes-qt/qt5/nativesdk-qtbase.inc require nativesdk-qt5.inc · line 14

Quoted 2 lines
recipes-qt/qt5/nativesdk-qtbase.inc +2 -0
+PR = "r1"
+

It's already merged, but please don't add new PRs, especially to .inc files.

As explained by Denys this is really need, in this case. I agree it could have been put in the bb recipe though.

Sorry I've overlooked it in message.

with rm_work you wouldn't see this issue, but for cost of reexecuting do_compile :)

Quoted 2 lines

Denys, could you move this to the bb recipe? This avoids the PR to be kept when we update to newer version.

I can try to remember this and remove it when doing next upgrade to 5.2.2.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#6 lore raw
Quoted 37 lines · Martin Jansa
Quoted 25 lines · Otavio Salvador

Hello Martin,

Quoted 22 lines · Martin Jansa
Quoted 21 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

* This way we don't mangle ${B} and can repeat do_install if necessary. And previously it would require running do_compile again to restore the proper state of ${B}.
* Need to bump PR, since do_compile isn't changing, but needs to re-run to re-populate qmake-real binary.

---
 recipes-qt/qt5/nativesdk-qtbase.inc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
recipes-qt/qt5/nativesdk-qtbase.inc +0 -0
index fa44009..3cb9b0e 100644
@@ -10,6 +10,8 @@ require nativesdk-qt5.inc
 # it's already included with newer oe-core, but include it here for dylan
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
 
Quoted 8 lines
Quoted 5 lines

recipes-qt/qt5/nativesdk-qtbase.inc require nativesdk-qt5.inc · line 14

Quoted 2 lines
recipes-qt/qt5/nativesdk-qtbase.inc +2 -0
+PR = "r1"
+

It's already merged, but please don't add new PRs, especially to .inc files.

As explained by Denys this is really need, in this case. I agree it could have been put in the bb recipe though.

Sorry I've overlooked it in message.

Quoted 8 lines

with rm_work you wouldn't see this issue, but for cost of reexecuting do_compile :)

Quoted 2 lines

Denys, could you move this to the bb recipe? This avoids the PR to be kept when we update to newer version.

I can try to remember this and remove it when doing next upgrade to 5.2.2.

Yes but I keep rm_work off in my builders to get this kind of failure ;-)

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750