mhonarc-commits
[Top] [All Lists]

CVS: install.me NEWS,1.4,1.5 install.me,1.19,1.20

2003-08-07 14:56:04
Update of /cvsroot/mhonarc/install.me
In directory subversions:/tmp/cvs-serv27837

Modified Files:
	NEWS install.me 
Log Message:
* Added check for print operator return value in cpfile() and die
  if not true.  There have been at least two reports about 0 byte
  files being created during MHonArc installation.  This does not
  fix what the real problem may be, but it will hopefully provide
  diagnostic information if the problem occurs again.


Index: NEWS
===================================================================
RCS file: /cvsroot/mhonarc/install.me/NEWS,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** NEWS	20 Jul 2003 00:00:50 -0000	1.4
--- NEWS	7 Aug 2003 21:53:59 -0000	1.5
***************
*** 1,2 ****
--- 1,12 ----
+ YYYY/MM/DD
+ ===========================================================================
+ 2003/08/07    1.1.2
+ 
+ * Added check for print operator return value in cpfile() and die
+   if not true.  There have been at least two reports about 0 byte
+   files being created during MHonArc installation.  This does not
+   fix what the real problem may be, but it will hopefully provide
+   diagnostic information if the problem occurs again.
+ 
  ===========================================================================
  2003/07/19    1.1.1

Index: install.me
===================================================================
RCS file: /cvsroot/mhonarc/install.me/install.me,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** install.me	20 Jul 2003 00:00:51 -0000	1.19
--- install.me	7 Aug 2003 21:53:59 -0000	1.20
***************
*** 709,713 ****
  sub cpfile {
      my($src, $dst, $prepend, $mkbat) = @_;
!     my($bflag);
  
      if (-d $dst) {
--- 709,713 ----
  sub cpfile {
      my($src, $dst, $prepend, $mkbat) = @_;
!     my($bflag, $status);
  
      if (-d $dst) {
***************
*** 727,731 ****
  
      if (!$bflag && $mkbat) {
! 	print DST <<'EndOfBat';
  @rem = '--*-Perl-*--
  @echo off
--- 727,731 ----
  
      if (!$bflag && $mkbat) {
! 	$status = print DST <<'EndOfBat';
  @rem = '--*-Perl-*--
  @echo off
***************
*** 740,754 ****
  @rem ';
  EndOfBat
      }
      if ($prepend) {
! 	print DST $prepend;
      }
!     print DST <SRC>;
  
      if (!$bflag && $mkbat) {
! 	print DST <<'EndOfBat';
  __END__
  :endofperl
  EndOfBat
      }
  
--- 740,758 ----
  @rem ';
  EndOfBat
+ 	die qq/Error: Write failure to "$dst": $!\n/  unless $status;
      }
      if ($prepend) {
! 	$status = print DST $prepend;
! 	die qq/Error: Write failure to "$dst": $!\n/  unless $status;
      }
!     $status = print DST <SRC>;
!     die qq/Error: Write failure to "$dst": $!\n/  unless $status;
  
      if (!$bflag && $mkbat) {
! 	$status = print DST <<'EndOfBat';
  __END__
  :endofperl
  EndOfBat
+       die qq/Error: Write failure to "$dst": $!\n/  unless $status;
      }
  

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV