Changeset 2774
- Timestamp:
- 2001-10-02T22:36:37+12:00 (23 years ago)
- Location:
- trunk/gsdl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/build
r2566 r2774 464 464 } 465 465 466 # creates a file called $outfile.final (should only be called if -out option 467 # is used and isn't STDERR or STDOUT) and writes an output code to it. 466 # creates a file called $outfile.final and writes an output code to it. 468 467 # An output code of 0 specifies that there was no error 469 468 sub final_out { 470 469 my ($exit_code) = @_; 471 470 472 if (open (FINAL, ">$outfile.final")) { 473 print FINAL $exit_code; 474 close FINAL; 471 if ($use_out && (!-e "$outfile.final")) { 472 473 if (open (FINAL, ">$outfile.final")) { 474 print FINAL $exit_code; 475 close FINAL; 476 } 475 477 } 476 478 } … … 578 580 } 579 581 582 # this will produce a .final file if one doesn't exist yet - that 583 # should only happen if there's been an error somewhere in the perl 584 # code 585 &final_out(7); 586 580 587 sub recursive_chmod { 581 588 my ($dir) = @_; -
trunk/gsdl/macros/collect.dm
r2728 r2774 904 904 <table width=_pagewidth_> 905 905 <tr><td> 906 <p>An error has occurred while attempting to build your collection. 907 <br> The build log contains the following: 908 <p>_faillog_ 909 906 _textfailmsg_ 907 </td></tr> 908 </table></center> 909 } 910 911 # _textfailmsg_ will be set to one of the following macros from within 912 # the server 913 914 _textfailmsg1_ { 915 The collection could not be built as it contains no data. Make sure that at 916 least one of the directories or files you specified on the <i>source 917 data</i> page exists and is of a type or (in the case of a directory) 918 contains files of a type, that Greenstone can process. 910 919 <p><center> 911 920 _collectorbar_ 912 921 </center> 913 914 </td></tr> 915 </table></center> 916 } 917 922 } 923 924 _textfailmsg6_ {_textfailmsg1_} 925 926 _textfailmsg2_ { 927 The collection could not be built (import.pl failed). 928 <p>the build log contains the following information: 929 <p>_faillog_ 930 <p>Please <a href="_httppagecollector_" target=_top>restart the collector</a> and try 931 again. 932 } 933 934 _textfailmsg3_ { 935 The collection could not be built (buildcol.pl failed). 936 <p>the build log contains the following information: 937 <p>_faillog_ 938 <p>Please <a href="_httppagecollector_" target=_top>restart the collector</a> and try 939 again. 940 } 941 942 _textfailmsg4_ { 943 The collection was built successfully but could not be installed. 944 <p>the build log contains the following information: 945 <p>_faillog_ 946 } 947 948 _textfailmsg5_ {_textfailmsg4_} 949 950 _textfailmsg7_ { 951 An unexpected error occurred while attepting to build your collection 952 <p>Please <a href="_httppagecollector_" target=_top>restart the collector</a> and try 953 again. 954 } 918 955 919 956 ####################################################################### … … 1051 1088 } 1052 1089 1053 _installfailcontent_ {1054 _messagehead_1055 <p>1056 1057 The collector failed to install your new collection correctly.1058 Possible causes are:1059 <ul>1060 <li> Greenstone does not have permission to write to the _gsdlhome_/collect1061 directory.1062 <li> A _cgiargbc1dirname_ collection already exists in the _gsdlhome_/collect1063 directory.1064 </ul>1065 _messagefoot_1066 }1067 1068 1090 _exptsuccesscontent_ { 1069 1091 _messagehead_ -
trunk/gsdl/src/recpt/collectoraction.cpp
r2727 r2774 457 457 ifstream fbld_in (fbldc); 458 458 if (fbld_in) { 459 char c= fbld_in.get();459 failcode = fbld_in.get(); 460 460 fbld_in.close(); 461 if ( c== '0') {461 if (failcode == '0') { 462 462 // success - we need to create and configure a collection server for the 463 463 // newly built collection (for fastcgi and local library where … … 467 467 current_page = "bilddone"; 468 468 } 469 else if (c == '4' || c == '5') message = "installfail";470 469 else current_page = "bildfail"; 471 470 } else { … … 1027 1026 // _statusline_ -- if displaying the bildstatus page 1028 1027 // _header_ -- may be set for pages that require it 1028 // _textfailmsg_ -- set to different messages depending on failcode returned 1029 // by build script (if build fails) 1029 1030 // _faillog_ - set to last 6 lines of .bld file if build failed 1030 1031 // _gsdlhome_ - the gsdlhome path (dm_safe) … … 1155 1156 1156 1157 if (collector_page == "bildfail") { 1158 1159 text_t textfailmsg = "_textfailmsg"; 1160 textfailmsg.push_back(failcode); 1161 textfailmsg.push_back('_'); 1162 disp.setmacro("textfailmsg", "collector", textfailmsg); 1163 1157 1164 text_t bldlog = filename_cat(gsdlhome, "tmp", args["bc1tmp"], args["bc1dirname"] + ".bld"); 1158 1165 text_t rawlog = file_tail (bldlog, 6, 0); -
trunk/gsdl/src/recpt/collectoraction.h
r2627 r2774 42 42 43 43 text_t message; 44 char failcode; 44 45 45 46 bool do_mkcol;
Note:
See TracChangeset
for help on using the changeset viewer.