[gjs] package: Don't rely upon directory configuration for initSubmodule()



commit cba886e1a8d38f1b4fd555dfad830a795d4d31a1
Author: Patrick Griffis <tingping tingping se>
Date:   Tue May 2 08:51:39 2017 -0400

    package: Don't rely upon directory configuration for initSubmodule()
    
    This leads to an incorrect state where `moduledir` is a gresource
    path and initSubmodule() then behaves like it is being ran from
    within source.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782065

 modules/package.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/modules/package.js b/modules/package.js
index 87bbe6b..ca4dfe8 100644
--- a/modules/package.js
+++ b/modules/package.js
@@ -259,7 +259,7 @@ function initFormat() {
 }
 
 function initSubmodule(name) {
-    if (moduledir != pkgdatadir) {
+    if (_runningFromMesonSource() || _runningFromSource()) {
         // Running from source tree, add './name' to search paths
 
         let submoduledir = GLib.build_filenamev([_submoduledir, name]);


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