[gnome-ostree] build: Throw a more obvious error early if we don't have linux-user-chroot



commit f3da0b66cd20adead14415db2aaddfd12af65ec3
Author: Colin Walters <walters verbum org>
Date:   Fri Jul 19 13:56:16 2013 -0400

    build: Throw a more obvious error early if we don't have linux-user-chroot
    
    https://mail.gnome.org/archives/ostree-list/2013-July/msg00014.html

 src/js/tasks/task-build.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index a642651..9ea3f8f 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -1011,7 +1011,7 @@ const TaskBuild = new Lang.Class({
            let etcDir = composeRootdir.resolve_relative_path('etc');
            let usrEtcDir = composeRootdir.resolve_relative_path('usr/etc');
            GSystem.file_rename(usrEtcDir, etcDir, cancellable);
-           let args = ['linux-user-chroot',
+           let args = [this._linuxUserChrootPath,
                        '--mount-proc', '/proc',
                        '--mount-bind', '/dev', '/dev',
                        '--mount-bind', '/', '/sysroot',
@@ -1174,6 +1174,11 @@ const TaskBuild = new Lang.Class({
     },
 
     execute: function(cancellable) {
+
+       this._linuxUserChrootPath = BuildUtil.findUserChrootPath();
+       if (!this._linuxUserChrootPath)
+           throw new Error("You must have linux-user-chroot installed");
+
         this.forceBuildComponents = {};
        for (let i = 0; i < this.parameters.forceComponents.length; i++)
            this.forceBuildComponents[this.parameters.forceComponents[i]] = true;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]