]> git.e2factory.org Git - e2factory.git/commitdiff
bugfix: the e2-cf tool refused to work in projects with a broken
authorGordon Hecker <gh@emlix.com>
Thu, 25 Feb 2010 16:52:01 +0000 (17:52 +0100)
committerGordon Hecker <gh@emlix.com>
Tue, 2 Mar 2010 13:46:14 +0000 (14:46 +0100)
configuration. That prevented the user from fixing a broken
configuration using that tool, making the tool pretty much useless.

Signed-off-by: Gordon Hecker <gh@emlix.com>
local/cf.lua
local/e2tool.lua

index 66babe7cc4e7b4fbafdb69f2ce37970d3eae70e8..04bacfa9690b4bb29680a2870eedf9b2d3caa3c2 100755 (executable)
@@ -52,14 +52,12 @@ modify and create configuration files
 
 local opts = e2option.parse(arg)
 
-local info, re = e2tool.collect_project_info()
+-- initialize some basics in the info structure without actually loading
+-- the project configuration.
+local info, re = e2tool.collect_project_info(nil, true)
 if not info then
   e2lib.abort(re)
 end
-local rc, re = e2tool.check_project_info(info)
-if not rc then
-  e2lib.abort(re)
-end
 
 rc, re = e2lib.chdir(info.root)
 if not rc then
index 306cf2997cd56cb71e22099353f0c35185cbfa7c..d9772feed386fa3ad342d7b41d3256b1c3273c9f 100644 (file)
@@ -378,7 +378,7 @@ function load_user_config2(info, path, types)
   return list, nil
 end
 
-function collect_project_info(path)
+function collect_project_info(path, skip_load_config)
   local rc, re
   local e = new_error("reading project configuration")
 
@@ -454,6 +454,10 @@ The newest configuration syntax supported by the tools is %s.
 
   e2lib.init2() -- configuration must be available
 
+  if skip_load_config == true then
+    return info
+  end
+
   local rc, re = opendebuglogfile(info)
   if not rc then
     return false, e:cat(re)