--- nsdl/build/lpml_parse.pl 2002/05/05 02:44:57 1.1 +++ nsdl/build/lpml_parse.pl 2002/10/12 15:17:42 1.2 @@ -12,7 +12,7 @@ # The LearningOnline Network with CAPA # lpml_parse.pl - Linux Packaging Markup Language parser # -# $Id: lpml_parse.pl,v 1.1 2002/05/05 02:44:57 harris41 Exp $ +# $Id: lpml_parse.pl,v 1.2 2002/10/12 15:17:42 harris41 Exp $ # # Written by Scott Harrison, codeharrison@yahoo.com # @@ -1266,36 +1266,55 @@ END elsif ($mode eq 'configinstall' && $categoryname eq 'conf') { push @configall,$targetroot.'/'.$target; return $targetroot.'/'.$target.': alwaysrun'."\n". - "\t".'@echo -n ""; ECODE=0 && { perl filecompare.pl -b4 '. - $sourceroot.'/'.$source.' '.$targetroot.'/'.$target. - ' || ECODE=$$?; } && '. - '{ [ $$ECODE != "2" ] || (install '. - $categoryhash{$categoryname}.' '. - $sourceroot.'/'.$source.' '. - $targetroot.'/'.$target.'.lpmlnew'. + "\t".'@# Compare source with target and intelligently respond'. + "\n\t\n\t\n". + + + "\t".'@echo -n ""; ECODE=0 && { perl filecompare.pl -b4 \\'. + "\n\t".$sourceroot.'/'.$source." \\\n\t". + $targetroot.'/'.$target." \\\n\t". + ' || ECODE=$$?; } && '."\\\n\t"."\\\n\t"."\\\n\t". + + + '{ [ $$ECODE != "2" ] || '." \\\n\t".'(install '. + $categoryhash{$categoryname}." \\\n\t\t". + $sourceroot.'/'.$source." \\\n\t\t". + $targetroot.'/'.$target.'.lpmlnew'." \\\n\t\t". ' && echo "**** NOTE: CONFIGURATION FILE CHANGE ****"'. - $logcmd.' && echo "'. - 'You likely need to compare contents of '. - ''.$targetroot.'/'.$target.' with the new '. - ''.$targetroot.'/'.$target.'.lpmlnew"'. - "$logcmd); } && ". - '{ [ $$ECODE != "3" ] || (install '. - $categoryhash{$categoryname}.' '. - $sourceroot.'/'.$source.' '. - $targetroot.'/'.$target.''. + " \\\n\t\t".$logcmd.' && '." \\\n\t\t"."echo -n \"". + 'You likely need to compare contents of "'."\\\n\t\t\t". + '&& echo -n "'.$targetroot.'/'.$target.'"'."\\\n\t\t". + '&& echo -n " with the new "'."\\\n\t\t\t". + '&& echo "'.$targetroot.'/'.$target.'.lpmlnew"'."\\\n\t\t". + "$logcmd); } && "." \\\n\t"."\\\n\t"."\\\n\t". + + + '{ [ $$ECODE != "3" ] || '."\\\n\t". + '(install '. + $categoryhash{$categoryname}."\\\n\t\t". + $sourceroot.'/'.$source."\\\n\t\t". + $targetroot.'/'.$target."\\\n\t\t". ' && echo "**** WARNING: NEW CONFIGURATION FILE ADDED ****"'. - $logcmd.' && echo "'. - 'You likely need to review the contents of '. - ''.$targetroot.'/'.$target.' to make sure its '. - 'settings are compatible with your overall system"'. - "$logcmd); } && ". - '{ [ $$ECODE != "1" ] || ('. - 'echo "**** ERROR ****"'. - $logcmd.' && echo "'. - 'Configuration source file does not exist '. - ''.$sourceroot.'/'.$source.'"'. - "$logcmd); } && perl verifymodown.pl ${targetroot}/${target} \"". - "$categoryhash{$categoryname}\"$logcmd;\n\n"; + "\\\n\t\t".$logcmd.' && '."\\\n\t\t". + 'echo -n "'. + 'You likely need to review the contents of "'."\\\n\t\t\t". + '&& echo -n "'. + $targetroot.'/'.$target.'"'."\\\n\t\t\t". + '&& echo -n "'. + ' to make sure its "'."\\\n\t\t". + '&& echo "'. + 'settings are compatible with your overall system"'."\\\n\t\t". + "$logcmd); } && "."\\\n\t"."\\\n\t"."\\\n\t". + + + '{ [ $$ECODE != "1" ] || ('."\\\n\t\t". + 'echo "**** ERROR ****"'.$logcmd.' && '."\\\n\t\t".'echo -n "'. + 'Configuration source file does not exist "'."\\\n\t\t". + '&& echo -n "'.$sourceroot.'/'.$source.'"'."\\\n\t\t". + "$logcmd); } && "."\\\n\t\t". + "perl verifymodown.pl ${targetroot}/${target} "."\\\n\t\t\t". + "\"$categoryhash{$categoryname}\""."\\\n\t\t\t". + "$logcmd;\n\n"; } elsif ($mode eq 'build' && $build) { push @buildall,$sourceroot.'/'.$source;