Diff for /loncom/build/lpml_parse.pl between versions 1.20 and 1.23

version 1.20, 2001/11/17 21:30:28 version 1.23, 2001/11/29 15:01:04
Line 6 Line 6
 # 06/19/2001,06/20,06/24 - Scott Harrison  # 06/19/2001,06/20,06/24 - Scott Harrison
 # 9/5/2001,9/6,9/7,9/8 - Scott Harrison  # 9/5/2001,9/6,9/7,9/8 - Scott Harrison
 # 9/17,9/18 - 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$  # $Id$
 ###  ###
Line 336  sub format_lpml { Line 336  sub format_lpml {
     my (@tokeninfo)=@_;      my (@tokeninfo)=@_;
     my $date=`date`; chop $date;      my $date=`date`; chop $date;
     if ($mode eq 'html') {      if ($mode eq 'html') {
  $lpml = "<br />LPML BEGINNING: $date";   $lpml = "<br /><font size='+2'>LPML Description Page (dist=$dist, ".
       "$date)".
       "</font>";
    $lpml .=<<END;
   <ul>
   <li>About this file</li>
   <li>Software Package Description</li>
   <li>Directory Structure</li>
   <li>File Type Ownership and Permissions</li>
   <li>File and Directory Structure</li>
   </ul>
   END
           $lpml .=<<END;
   <font size='+2'>About this file</font>
   <p>
   This file is generated dynamically by <tt>lpml_parse.pl</tt> as
   part of a development compilation process.  Author: Scott
   Harrison (harris41\@msu.edu).
   </p>
   END
       }
       elsif ($mode eq 'text') {
    $lpml = "LPML Description Page (dist=$dist, $date)";
    $lpml .=<<END;
   
   * About this file
   * Software Package Description
   * Directory Structure
   * File Type Ownership and Permissions
   * File and Directory Structure
   END
           $lpml .=<<END;
   
   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 'install') {      elsif ($mode eq 'install') {
  print '# LPML install targets. Linux Packaging Markup Language,';   print '# LPML install targets. Linux Packaging Markup Language,';
Line 456  sub format_rpm { Line 495  sub format_rpm {
     my $text=&trim($parser->get_text('/rpm'));      my $text=&trim($parser->get_text('/rpm'));
     $parser->get_tag('/rpm');      $parser->get_tag('/rpm');
     if ($mode eq 'html') {      if ($mode eq 'html') {
  return $rpm="\n<br />BEGIN RPM\n$text\n<br />END RPM";   return $rpm=<<END;
   <font size='+2'>Software Package Description</font>
   <p>
   <table bgcolor='#ffffff' border='0' cellpadding='10' cellspacing='0'>
   <tr><td><pre>
   $text
   </pre></td></tr>
   </table>
   END
       }
       elsif ($mode eq 'text') {
    return $rpm=<<END;
   Software Package Description
   
   $text
   END
     }      }
     else {      else {
  return '';   return '';
Line 467  sub format_rpmSummary { Line 521  sub format_rpmSummary {
     my $text=&trim($parser->get_text('/rpmSummary'));      my $text=&trim($parser->get_text('/rpmSummary'));
     $parser->get_tag('/rpmSummary');      $parser->get_tag('/rpmSummary');
     if ($mode eq 'html') {      if ($mode eq 'html') {
  return $rpmSummary="\n<br />RPMSUMMARY $text";   return $rpmSummary="\nSummary     : $text";
       }
       elsif ($mode eq 'text') {
    return $rpmSummary="\nSummary     : $text";
     }      }
     else {      else {
  return '';   return '';
Line 799  $buildtest \@if !(test -e "${sourceroot} Line 856  $buildtest \@if !(test -e "${sourceroot}
  echo "**** ERROR **** CVS source file does not exist: ${sourceroot}/${source} and neither does target: ${targetroot}/${target}"$logcmd; \\   echo "**** ERROR **** CVS source file does not exist: ${sourceroot}/${source} and neither does target: ${targetroot}/${target}"$logcmd; \\
  elif !(test -e "${sourceroot}/${source}"); then \\   elif !(test -e "${sourceroot}/${source}"); then \\
  echo "**** WARNING **** CVS source file does not exist: ${sourceroot}/${source}"$logcmd; \\   echo "**** WARNING **** CVS source file does not exist: ${sourceroot}/${source}"$logcmd; \\
    perl verifymodown.pl ${targetroot}/${target} "$categoryhash{$categoryname}"$logcmd; \\
  else \\   else \\
  ECODE=0; \\   ECODE=0; \\
  perl filecompare.pl $bflag ${sourceroot}/${source} ${targetroot}/${target} || ECODE=\$\$?; \\   perl filecompare.pl $bflag ${sourceroot}/${source} ${targetroot}/${target} || ECODE=\$\$?; \\
  case "\$\$ECODE" in \\   case "\$\$ECODE" in \\
  1) echo "${targetroot}/${target} is unchanged";; \\   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;; \\   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 -o www -g www -m 0500 ${sourceroot}/${source} ${targetroot}/${target}" && install -o www -g www -m 0500 ${sourceroot}/${source} ${targetroot}/${target};; \\   0) echo "install $categoryhash{$categorname} ${sourceroot}/${source} ${targetroot}/${target}" && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\
  esac; \\   esac; \\
    perl verifymodown.pl ${targetroot}/${target} "$categoryhash{$categoryname}"$logcmd; \\
  fi   fi
 END  END
 #    return "\t".'@test -e '.$sourceroot.'/'.$source.  #    return "\t".'@test -e '.$sourceroot.'/'.$source.
Line 829  END Line 888  END
  '{ [ $$ECODE != "2" ] || (install '.   '{ [ $$ECODE != "2" ] || (install '.
                 $categoryhash{$categoryname}.' '.                  $categoryhash{$categoryname}.' '.
  $sourceroot.'/'.$source.' '.   $sourceroot.'/'.$source.' '.
  $targetroot.'/'.$target.'.lpmlnewconf'.   $targetroot.'/'.$target.'.lpmlnew'.
  ' && echo "**** NOTE: CONFIGURATION FILE CHANGE ****"'.   ' && echo "**** NOTE: CONFIGURATION FILE CHANGE ****"'.
  $logcmd.' && echo "'.   $logcmd.' && echo "'.
  'You likely need to compare contents of '.   'You likely need to compare contents of '.
  ''.$targetroot.'/'.$target.' with the new '.   ''.$targetroot.'/'.$target.' with the new '.
                 ''.$targetroot.'/'.$target.'.lpmlnewconf"'.                  ''.$targetroot.'/'.$target.'.lpmlnew"'.
  "$logcmd); } && ".   "$logcmd); } && ".
  '{ [ $$ECODE != "3" ] || (install '.   '{ [ $$ECODE != "3" ] || (install '.
                 $categoryhash{$categoryname}.' '.                  $categoryhash{$categoryname}.' '.
Line 851  END Line 910  END
  $logcmd.' && echo "'.   $logcmd.' && echo "'.
  'Configuration source file does not exist '.   'Configuration source file does not exist '.
  ''.$sourceroot.'/'.$source.'"'.   ''.$sourceroot.'/'.$source.'"'.
  "$logcmd); };\n\n";   "$logcmd); } && perl verifymodown.pl ${targetroot}/${target} \"$categoryhash{$categoryname}\"$logcmd;\n\n";
  }   }
  elsif ($mode eq 'build' && $build) {   elsif ($mode eq 'build' && $build) {
     push @buildall,$sourceroot.'/'.$source;      push @buildall,$sourceroot.'/'.$source;

Removed from v.1.20  
changed lines
  Added in v.1.23


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>