cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zasp...@apache.org
Subject [09/10] cordova-ubuntu git commit: build: split error message
Date Thu, 23 Jul 2015 11:18:11 GMT
build: split error message


Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/49bbb5ac
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/49bbb5ac
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/49bbb5ac

Branch: refs/heads/master
Commit: 49bbb5ac6a579af16ca3e3259b8ad595006153e4
Parents: 02cd9d9
Author: Maxim Ermilov <maxim.ermilov@canonical.com>
Authored: Thu Jul 23 11:24:05 2015 +0300
Committer: Maxim Ermilov <maxim.ermilov@canonical.com>
Committed: Thu Jul 23 11:24:05 2015 +0300

----------------------------------------------------------------------
 bin/templates/project/cordova/lib/build.js | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/49bbb5ac/bin/templates/project/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/build.js b/bin/templates/project/cordova/lib/build.js
index 3ed2462..078974b 100644
--- a/bin/templates/project/cordova/lib/build.js
+++ b/bin/templates/project/cordova/lib/build.js
@@ -325,16 +325,28 @@ function checkChrootEnv(ubuntuDir, architecture, framework) {
     deps += additionalDependencies(ubuntuDir).join(' ');
     deps = deps.replace(/ARCH/g, architecture);
 
-    var cmd = "click chroot -a " + architecture + " -f " + framework + " run dpkg-query -Wf'${db:Status-abbrev}'
" + deps;
-
     var chrootCreateCmd = "sudo click chroot -a " + architecture + " -f " + framework + "
create";
     var chrootInstallCmd = "sudo click chroot -a " + architecture + " -f " + framework +
" install " + deps;
 
+    var cmd = "click chroot -a " + architecture + " -f " + framework + " run echo 1";
     var res = shell.exec(cmd);
-    if (res.code !== 0 || res.output.match(/[^i ]/)) {
+
+    if (res.code !== 0) {
         logger.error("\nError: missing " + architecture + " chroot");
         logger.error("run:\n" + chrootCreateCmd);
-        logger.error(chrootInstallCmd);
+
+        var deferred = Q.defer();
+        deferred.reject(new Error());
+
+        return deferred.promise;
+    }
+
+    cmd = "click chroot -a " + architecture + " -f " + framework + " run dpkg-query -Wf'${db:Status-abbrev}'
" + deps;
+
+    res = shell.exec(cmd);
+    if (res.code !== 0 || res.output.match(/[^i ]/)) {
+        logger.error("\nError: missing dependency inside " + architecture + " chroot");
+        logger.error("run:\n" + chrootInstallCmd);
 
         var deferred = Q.defer();
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message