[LON-CAPA-cvs] cvs: loncom /build lpml_parse.pl

raeburn raeburn at source.lon-capa.org
Sun Jan 22 22:32:43 EST 2012


raeburn		Mon Jan 23 03:32:43 2012 EDT

  Modified files:              
    /loncom/build	lpml_parse.pl 
  Log:
  - Bug 6408.
    - Omit errors in WARNINGS file if hosts.tab, domain.tab, and ns_*.tab
      are absent frm /home/httpd/lonTabs (e.g., new installation of LON-CAPA).
  
  
Index: loncom/build/lpml_parse.pl
diff -u loncom/build/lpml_parse.pl:1.57 loncom/build/lpml_parse.pl:1.58
--- loncom/build/lpml_parse.pl:1.57	Fri Mar 25 22:55:06 2011
+++ loncom/build/lpml_parse.pl	Mon Jan 23 03:32:43 2012
@@ -12,7 +12,7 @@
 # The LearningOnline Network with CAPA
 # lpml_parse.pl - Linux Packaging Markup Language parser
 #
-# $Id: lpml_parse.pl,v 1.57 2011/03/25 22:55:06 raeburn Exp $
+# $Id: lpml_parse.pl,v 1.58 2012/01/23 03:32:43 raeburn Exp $
 #
 # Written by Scott Harrison, codeharrison at yahoo.com
 #
@@ -1325,7 +1325,25 @@
 	    }
             my $bflag='-b1';
             $bflag='-b3' if $dependencies or $buildlink;
-	    return <<END;
+	    if ($tokeninfo[2]{type} eq 'private') {
+		return <<END;
+$buildtest	\@if (test -e "${sourceroot}/${source}") && (test -e "${targetroot}/${target}"); then \\
+		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; 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{$categoryname} ${sourceroot}/${source} ${targetroot}/${target}" && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\
+                esac; \\
+	elif (test -e "${sourceroot}/${source}") && !(test -e "${targetroot}/${target}"); then\\
+		echo "install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target}" && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target}; \\
+	fi
+	\@if (test -e "${targetroot}/${target}"); then \\
+		perl verifymodown.pl ${targetroot}/${target} "$categoryhash{$categoryname}"$logcmd; \\
+	fi
+END
+            } else {
+	        return <<END;
 $buildtest	\@if !(test -e "${sourceroot}/${source}") && !(test -e "${targetroot}/${target}"); then \\
 		echo "**** ERROR **** CVS source file does not exist: ${sourceroot}/${source} and neither does target: ${targetroot}/${target}"$logcmd; \\
 	elif !(test -e "${sourceroot}/${source}"); then \\
@@ -1342,6 +1360,7 @@
 		perl verifymodown.pl ${targetroot}/${target} "$categoryhash{$categoryname}"$logcmd; \\
 	fi
 END
+            }
 	}
 	elsif ($mode eq 'configinstall' && (($categoryname eq 'conf') ||
 					    ($categoryname eq 'www conf'))) {




More information about the LON-CAPA-cvs mailing list