--- loncom/build/lpml_parse.pl 2001/11/17 18:35:21 1.19 +++ loncom/build/lpml_parse.pl 2001/11/29 15:01:04 1.23 @@ -6,9 +6,9 @@ # 06/19/2001,06/20,06/24 - Scott Harrison # 9/5/2001,9/6,9/7,9/8 - Scott Harrison # 9/17,9/18 - Scott Harrison -# 11/4,11/5,11/6,11/7,11/16 - Scott Harrison +# 11/4,11/5,11/6,11/7,11/16,11/17 - Scott Harrison # -# $Id: lpml_parse.pl,v 1.19 2001/11/17 18:35:21 harris41 Exp $ +# $Id: lpml_parse.pl,v 1.23 2001/11/29 15:01:04 harris41 Exp $ ### ############################################################################### @@ -336,7 +336,46 @@ sub format_lpml { my (@tokeninfo)=@_; my $date=`date`; chop $date; if ($mode eq 'html') { - $lpml = "
LPML BEGINNING: $date"; + $lpml = "
LPML Description Page (dist=$dist, ". + "$date)". + ""; + $lpml .=< +
  • About this file
  • +
  • Software Package Description
  • +
  • Directory Structure
  • +
  • File Type Ownership and Permissions
  • +
  • File and Directory Structure
  • + +END + $lpml .=<About this file +

    +This file is generated dynamically by lpml_parse.pl as +part of a development compilation process. Author: Scott +Harrison (harris41\@msu.edu). +

    +END + } + elsif ($mode eq 'text') { + $lpml = "LPML Description Page (dist=$dist, $date)"; + $lpml .=<get_text('/rpm')); $parser->get_tag('/rpm'); if ($mode eq 'html') { - return $rpm="\n
    BEGIN RPM\n$text\n
    END RPM"; + return $rpm=<Software Package Description +

    + + +
    +$text
    +
    +END + } + elsif ($mode eq 'text') { + return $rpm=<get_text('/rpmSummary')); $parser->get_tag('/rpmSummary'); if ($mode eq 'html') { - return $rpmSummary="\n
    RPMSUMMARY $text"; + return $rpmSummary="\nSummary : $text"; + } + elsif ($mode eq 'text') { + return $rpmSummary="\nSummary : $text"; } else { return ''; @@ -799,14 +856,16 @@ $buildtest \@if !(test -e "${sourceroot} echo "**** ERROR **** CVS source file does not exist: ${sourceroot}/${source} and neither does target: ${targetroot}/${target}"$logcmd; \\ elif !(test -e "${sourceroot}/${source}"); then \\ echo "**** WARNING **** CVS source file does not exist: ${sourceroot}/${source}"$logcmd; \\ + perl verifymodown.pl ${targetroot}/${target} "$categoryhash{$categoryname}"$logcmd; \\ else \\ ECODE=0; \\ perl filecompare.pl $bflag ${sourceroot}/${source} ${targetroot}/${target} || ECODE=\$\$?; \\ case "\$\$ECODE" in \\ 1) echo "${targetroot}/${target} is unchanged";; \\ - 2) echo "**** WARNING **** target file ${targetroot}/${target} is newer than CVS source; creating ${targetroot}/${target}.lpmlnewfile instead"$logcmd && install -o www -g www -m 0500 ${sourceroot}/${source} ${targetroot}/${target}.lpmlnewfile;; \\ - 0) echo "install -o www -g www -m 0500 ${sourceroot}/${source} ${targetroot}/${target}" && install -o www -g www -m 0500 ${sourceroot}/${source} ${targetroot}/${target};; \\ + 2) echo "**** WARNING **** target file ${targetroot}/${target} is newer than CVS source; saving current (old) target file to ${targetroot}/${target}.lpmlsave and then overwriting"$logcmd && install -o www -g www -m 0600 ${targetroot}/${target} ${targetroot}/${target}.lpmlsave && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\ + 0) echo "install $categoryhash{$categorname} ${sourceroot}/${source} ${targetroot}/${target}" && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\ esac; \\ + perl verifymodown.pl ${targetroot}/${target} "$categoryhash{$categoryname}"$logcmd; \\ fi END # return "\t".'@test -e '.$sourceroot.'/'.$source. @@ -823,15 +882,35 @@ 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}.' '. + "\t".'@echo -n ""; ECODE=0 && { perl filecompare.pl -b4 '. + $sourceroot.'/'.$source.' '.$targetroot.'/'.$target. + ' || ECODE=$$?; } && '. + '{ [ $$ECODE != "2" ] || (install '. + $categoryhash{$categoryname}.' '. $sourceroot.'/'.$source.' '. - $targetroot.'/'.$target.'.lpmlnewconf'. + $targetroot.'/'.$target.'.lpmlnew'. ' && echo "**** NOTE: CONFIGURATION FILE CHANGE ****"'. $logcmd.' && echo "'. 'You likely need to compare contents of '. ''.$targetroot.'/'.$target.' with the new '. - ''.$targetroot.'/'.$target.'.lpmlnewconf"'. - "$logcmd); };\n\n"; + ''.$targetroot.'/'.$target.'.lpmlnew"'. + "$logcmd); } && ". + '{ [ $$ECODE != "3" ] || (install '. + $categoryhash{$categoryname}.' '. + $sourceroot.'/'.$source.' '. + $targetroot.'/'.$target.''. + ' && 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"; } elsif ($mode eq 'build' && $build) { push @buildall,$sourceroot.'/'.$source;