Patchwork [meta-qt5,1/2] nativesdk-qtbase: Fix install error in case install task is rerun

login
register
mail settings
Submitter Otavio Salvador
Date Feb. 17, 2014, 7:37 p.m.
Message ID <1392665835-16839-1-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/66875/
State Not Applicable
Delegated to: Otavio Salvador
Headers show

Comments

Otavio Salvador - Feb. 17, 2014, 7:37 p.m.
In case changes are done in do_install and the sstate checksums
change, the task would fail as the qmake binary has already been
replaced. Avoid this error checking for the original filename.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 recipes-qt/qt5/nativesdk-qtbase.inc |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Otavio Salvador - Feb. 17, 2014, 7:39 p.m.
On Mon, Feb 17, 2014 at 4:37 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> In case changes are done in do_install and the sstate checksums
> change, the task would fail as the qmake binary has already been
> replaced. Avoid this error checking for the original filename.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

Wrong file ... sorry.

Patch

diff --git a/recipes-qt/qt5/nativesdk-qtbase.inc b/recipes-qt/qt5/nativesdk-qtbase.inc
index c4ef6e8..36bc334 100644
--- a/recipes-qt/qt5/nativesdk-qtbase.inc
+++ b/recipes-qt/qt5/nativesdk-qtbase.inc
@@ -178,8 +178,10 @@  do_install() {
     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
-    rm ${B}/bin/qmake
-    mv ${B}/bin/qmake-real ${B}/bin/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}