Hello,
Here's a patch for having a more clear error message and abort if the specs file isn't present at the expected location when running "pike -x monger --install" for example.
The current error is actually a user-unfriendly backtrace.
Maybe the check for this file could be moved elsewhere, since before checking for the specs file, monger select the good version of the software to install and downloads it.
----8<----8<----8<----8<---- --- Tools.pmod/Standalone.pmod/module.pike.ori 2008-03-18 15:32:11.000000000 +0100 +++ Tools.pmod/Standalone.pmod/module.pike 2008-03-18 15:50:42.000000000 +0100 @@ -194,6 +194,14 @@
int main(int argc, array(string) argv) { + string specspath=include_path+"/specs"; + + if(!Stdio.is_file(specspath)) + { + werror("Missing specs file at %s\n",specspath); + return 1; + } + run_pike = master()->_pike_file_name; #ifdef NOT_INSTALLED run_pike += " -DNOT_INSTALLED"; @@ -205,7 +213,7 @@ run_pike += " -m"+master()->_master_file_name; putenv("RUNPIKE", run_pike);
- load_specs(include_path+"/specs"); + load_specs(specspath);
foreach(Getopt.find_all_options(argv,aggregate( ({"autoconf",Getopt.NO_ARG,({"--autoconf"}) }), ---->8---->8---->8---->8----
I can't say much intelligent about this patch, but it looks like an improvement. Since noone else has shown any interest I've committed it to 7.7 so it doesn't get lost in time. Thanks!
pike-devel@lists.lysator.liu.se