/[BackupPC]/trunk/bin/BackupPC_tarIncCreate
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/BackupPC_tarIncCreate

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 169 by dpavlin, Mon Oct 10 14:12:33 2005 UTC revision 236 by dpavlin, Thu Nov 10 15:38:14 2005 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl  #!/usr/bin/perl -w
2  #============================================================= -*-perl-*-  #============================================================= -*-perl-*-
3  #  #
4  # BackupPC_tarIncCreate: create a tar archive of an existing incremental dump  # BackupPC_tarIncCreate: create a tar archive of an existing incremental dump
# Line 72  use BackupPC::View; Line 72  use BackupPC::View;
72  use BackupPC::SearchLib;  use BackupPC::SearchLib;
73  use Time::HiRes qw/time/;  use Time::HiRes qw/time/;
74  use POSIX qw/strftime/;  use POSIX qw/strftime/;
75    use File::Which;
76    use File::Path;
77    use File::Slurp;
78  use Data::Dumper;       ### FIXME  use Data::Dumper;       ### FIXME
79    
80  die("BackupPC::Lib->new failed\n") if ( !(my $bpc = BackupPC::Lib->new) );  die("BackupPC::Lib->new failed\n") if ( !(my $bpc = BackupPC::Lib->new) );
81  my $TopDir = $bpc->TopDir();  my $TopDir = $bpc->TopDir();
82  my $BinDir = $bpc->BinDir();  my $BinDir = $bpc->BinDir();
83  my %Conf   = $bpc->Conf();  my %Conf   = $bpc->Conf();
84    %BackupPC::SearchLib::Conf = %Conf;
85  my %opts;  my %opts;
86  my $in_backup_increment;  my $in_backup_increment;
87    
88    
89  if ( !getopts("th:n:p:r:s:b:w:v", \%opts) ) {  if ( !getopts("th:n:p:r:s:b:w:vd", \%opts) ) {
90      print STDERR <<EOF;      print STDERR <<EOF;
91  usage: $0 [options]  usage: $0 [options]
92    Required options:    Required options:
# Line 99  usage: $0 [options] Line 103  usage: $0 [options]
103       -b BLOCKS       BLOCKS x 512 bytes per record (default 20; same as tar)       -b BLOCKS       BLOCKS x 512 bytes per record (default 20; same as tar)
104       -w writeBufSz   write buffer size (default 1048576 = 1MB)       -w writeBufSz   write buffer size (default 1048576 = 1MB)
105       -v              verbose output       -v              verbose output
106         -d              debug output
107  EOF  EOF
108      exit(1);      exit(1);
109  }  }
110    
111  if ( $opts{h} !~ /^([\w\.\s-]+)$/ ) {  if ( $opts{h} !~ /^([\w\.\s-]+)$/ ) {
112      print(STDERR "$0: bad host name '$opts{h}'\n");      die "$0: bad host name '$opts{h}'\n";
     exit(1);  
113  }  }
114  my $Host = $opts{h};  my $Host = $opts{h};
115    
116  if ( $opts{n} !~ /^(-?\d+)$/ ) {  if ( $opts{n} !~ /^(-?\d+)$/ ) {
117      print(STDERR "$0: bad dump number '$opts{n}'\n");      die "$0: bad dump number '$opts{n}'\n";
     exit(1);  
118  }  }
119  my $Num = $opts{n};  my $Num = $opts{n};
120    
121    my $bin;
122    foreach my $c (qw/gzip md5sum tee/) {
123            $bin->{$c} = which($c) || die "$0 needs $c, install it\n";
124    }
125    
126  my @Backups = $bpc->BackupInfoRead($Host);  my @Backups = $bpc->BackupInfoRead($Host);
127  my $FileCnt = 0;  my $FileCnt = 0;
128  my $ByteCnt = 0;  my $ByteCnt = 0;
129  my $DirCnt = 0;  my $DirCnt = 0;
130  my $SpecialCnt = 0;  my $SpecialCnt = 0;
131  my $ErrorCnt = 0;  my $ErrorCnt = 0;
132    my $current_tar_size = 0;
133    my $total_increment_size = 0;
134    
135  my $i;  my $i;
136  $Num = $Backups[@Backups + $Num]{num} if ( -@Backups <= $Num && $Num < 0 );  $Num = $Backups[@Backups + $Num]{num} if ( -@Backups <= $Num && $Num < 0 );
# Line 128  for ( $i = 0 ; $i < @Backups ; $i++ ) { Line 138  for ( $i = 0 ; $i < @Backups ; $i++ ) {
138      last if ( $Backups[$i]{num} == $Num );      last if ( $Backups[$i]{num} == $Num );
139  }  }
140  if ( $i >= @Backups ) {  if ( $i >= @Backups ) {
141      print(STDERR "$0: bad backup number $Num for host $Host\n");      die "$0: bad backup number $Num for host $Host\n";
     exit(1);  
142  }  }
143    
144  my $PathRemove = $1 if ( $opts{r} =~ /(.+)/ );  my $PathRemove = $1 if ( $opts{r} =~ /(.+)/ );
145  my $PathAdd    = $1 if ( $opts{p} =~ /(.+)/ );  my $PathAdd    = $1 if ( $opts{p} =~ /(.+)/ );
146  if ( $opts{s} !~ /^([\w\s\.\/\$-]+)$/ && $opts{s} ne "*" ) {  if ( $opts{s} !~ /^([\w\s\.\/\$-]+)$/ && $opts{s} ne "*" ) {
147      print(STDERR "$0: bad share name '$opts{s}'\n");      die "$0: bad share name '$opts{s}'\n";
     exit(1);  
148  }  }
149  our $ShareName = $opts{s};  our $ShareName = $opts{s};
150  our $view = BackupPC::View->new($bpc, $Host, \@Backups);  our $view = BackupPC::View->new($bpc, $Host, \@Backups);
151    
152    # database
153    
154    my $dsn = $Conf{SearchDSN};
155    my $db_user = $Conf{SearchUser} || '';
156    
157    my $dbh = DBI->connect($dsn, $db_user, "", { RaiseError => 1, AutoCommit => 0} );
158    
159    my $sth_inc_size = $dbh->prepare(qq{
160            update backups set
161                    inc_size = ?,
162                    parts = ?,
163                    inc_deleted = false
164            where id = ? });
165    my $sth_backup_parts = $dbh->prepare(qq{
166            insert into backup_parts (
167                    backup_id,
168                    part_nr,
169                    tar_size,
170                    size,
171                    md5,
172                    items
173            ) values (?,?,?,?,?,?)
174    });
175    
176  #  #
177  # This constant and the line of code below that uses it are borrowed  # This constant and the line of code below that uses it are borrowed
178  # from Archive::Tar.  Thanks to Calle Dybedahl and Stephen Zander.  # from Archive::Tar.  Thanks to Calle Dybedahl and Stephen Zander.
# Line 163  my(%HardLinkExtraFiles, @HardLinks); Line 195  my(%HardLinkExtraFiles, @HardLinks);
195  #  #
196  # Write out all the requested files/directories  # Write out all the requested files/directories
197  #  #
198  binmode(STDOUT);  
199  my $fh = *STDOUT;  my $max_file_size = $Conf{'MaxArchiveFileSize'} || die "problem with MaxArchiveFileSize parametar";
200    $max_file_size *= 1024;
201    
202    my $tar_dir = $Conf{InstallDir}.'/'.$Conf{GzipTempDir};
203    die "problem with $tar_dir, check GzipTempDir in configuration\n" unless (-d $tar_dir && -w $tar_dir);
204    
205    my $tar_file = BackupPC::SearchLib::getGzipName($Host, $ShareName, $Num) || die "can't getGzipName($Host, $ShareName, $Num)";
206    
207    my $tar_path = $tar_dir . '/' . $tar_file . '.tmp';
208    $tar_path =~ s#//#/#g;
209    
210    my $sth = $dbh->prepare(qq{
211            SELECT
212                    backups.id
213            FROM backups
214                    JOIN shares on shares.id = shareid
215                    JOIN hosts on hosts.id = shares.hostid
216            WHERE hosts.name = ? and shares.name = ? and backups.num = ?
217    });
218    $sth->execute($Host, $ShareName, $Num);
219    my ($backup_id) = $sth->fetchrow_array;
220    $sth->finish;
221    
222    print STDERR "backup_id: $backup_id working dir: $tar_dir, max uncompressed size $max_file_size bytes, tar $tar_file\n" if ($opts{d});
223    
224    
225    my $fh;
226    my $part = 0;
227    my $no_files = 0;
228    my $items_in_part = 0;
229    
230    sub new_tar_part {
231            my $arg = {@_};
232    
233            if ($fh) {
234                    return if ($current_tar_size == 0);
235    
236                    print STDERR "# closing part $part\n" if ($opts{d});
237    
238                    #
239                    # Finish with two null 512 byte headers,
240                    # and then round out a full block.
241                    #
242                    my $data = "\0" x ($tar_header_length * 2);
243                    TarWrite($fh, \$data);
244                    TarWrite($fh, undef);
245    
246                    close($fh) || die "can't close archive part $part: $!";
247    
248                    my $file = $tar_path . '/' . $part;
249    
250                    my $md5 = read_file( $file . '.md5' ) || die "can't read md5sum file ${file}.md5";
251                    $md5 =~ s/\s.*$//;
252    
253                    my $size = (stat( $file . '.tar.gz' ))[7] || die "can't stat ${file}.tar.gz";
254    
255                    $sth_backup_parts->execute(
256                            $backup_id,
257                            $part,
258                            $current_tar_size,
259                            $size,
260                            $md5,
261                            $items_in_part,
262                    );
263    
264                    $total_increment_size += int( ( $size + 1023 ) / 1024 ) * 1024;
265    
266                    if ($arg->{close}) {
267                            print STDERR "# close last part\n" if ($opts{d});
268                            $sth_inc_size->execute(
269                                    $total_increment_size,
270                                    $part,
271                                    $backup_id
272                            );
273                            return;
274                    }
275    
276            }
277    
278            $part++;
279    
280            # if this is first part, create directory
281    
282            if ($part == 1) {
283                    if (-d $tar_path) {
284                            print STDERR "# deleting existing $tar_path\n" if ($opts{d});
285                            rmtree($tar_path);
286                    }
287                    mkdir($tar_path) || die "can't create directory $tar_path: $!";
288    
289                    sub abort_cleanup {
290                            print STDERR "ABORTED: cleanup temp dir";
291                            rmtree($tar_path);
292                            $dbh->rollback;
293                            exit 1;
294                    }
295    
296                    $SIG{'INT'}  = \&abort_cleanup;
297                    $SIG{'QUIT'} = \&abort_cleanup;
298                    $SIG{'__DIE__'} = \&abort_cleanup;
299    
300            }
301    
302            my $file = $tar_path . '/' . $part;
303    
304            #
305            # create comprex pipe which will pass output through gzip
306            # for compression, create file on disk using tee
307            # and pipe same output to md5sum to create checksum
308            #
309    
310            my $cmd = '| ' . $bin->{'gzip'}   . ' ' . $Conf{GzipLevel} .      ' ' .
311                      '| ' . $bin->{'tee'}    . ' ' . $file . '.tar.gz' . ' ' .
312                      '| ' . $bin->{'md5sum'} . ' - > ' . $file . '.md5';
313    
314            print STDERR "## $cmd\n" if ($opts{d});
315    
316            open($fh, $cmd) or die "can't open $cmd: $!";
317            binmode($fh);
318    
319            $current_tar_size = 0;
320            $items_in_part = 0;
321    }
322    
323    new_tar_part();
324    
325  if (seedCache($Host, $ShareName, $Num)) {  if (seedCache($Host, $ShareName, $Num)) {
326          archiveWrite($fh, '/');          archiveWrite($fh, '/');
327          archiveWriteHardLinks($fh);          archiveWriteHardLinks($fh);
328  } else {  } else {
329          print STDERR "NOTE: no files found for $Host:$ShareName, increment $Num\n" if ($opt{v});          print STDERR "NOTE: no files found for $Host:$ShareName, increment $Num\n" if ($opts{v});
330            $no_files = 1;
331  }  }
332    
333  #  new_tar_part( close => 1 );
334  # Finish with two null 512 byte headers, and then round out a full  
335  # block.  # remove temporary files if there are no files
336  #  if ($no_files) {
337  my $data = "\0" x ($tar_header_length * 2);          rmtree($tar_path);
338  TarWrite($fh, \$data);  } elsif ($part == 1) {
339  TarWrite($fh, undef);          warn "FIXME: if there is only one part move to parent directory and rename";
340    }
341    
342  #  #
343  # print out totals if requested  # print out totals if requested
# Line 193  if ( $ErrorCnt && !$FileCnt && !$DirCnt Line 351  if ( $ErrorCnt && !$FileCnt && !$DirCnt
351      # Got errors, with no files or directories; exit with non-zero      # Got errors, with no files or directories; exit with non-zero
352      # status      # status
353      #      #
354      exit(1);      die "got errors or no files\n";
355  }  }
356  exit(0);  
357    $sth_inc_size->finish;
358    $sth_backup_parts->finish;
359    
360    $dbh->commit || die "can't commit changes to database";
361    $dbh->disconnect();
362    
363    exit;
364    
365  ###########################################################################  ###########################################################################
366  # Subroutines  # Subroutines
# Line 260  sub TarWrite Line 425  sub TarWrite
425  {  {
426      my($fh, $dataRef) = @_;      my($fh, $dataRef) = @_;
427    
428    
429      if ( !defined($dataRef) ) {      if ( !defined($dataRef) ) {
430          #          #
431          # do flush by padding to a full $WriteBufSz          # do flush by padding to a full $WriteBufSz
# Line 267  sub TarWrite Line 433  sub TarWrite
433          my $data = "\0" x ($WriteBufSz - length($WriteBuf));          my $data = "\0" x ($WriteBufSz - length($WriteBuf));
434          $dataRef = \$data;          $dataRef = \$data;
435      }      }
436    
437        # poor man's tell :-)
438        $current_tar_size += length($$dataRef);
439    
440      if ( length($WriteBuf) + length($$dataRef) < $WriteBufSz ) {      if ( length($WriteBuf) + length($$dataRef) < $WriteBufSz ) {
441          #          #
442          # just buffer and return          # just buffer and return
# Line 277  sub TarWrite Line 447  sub TarWrite
447      my $done = $WriteBufSz - length($WriteBuf);      my $done = $WriteBufSz - length($WriteBuf);
448      if ( syswrite($fh, $WriteBuf . substr($$dataRef, 0, $done))      if ( syswrite($fh, $WriteBuf . substr($$dataRef, 0, $done))
449                                  != $WriteBufSz ) {                                  != $WriteBufSz ) {
450          print(STDERR "Unable to write to output file ($!)\n");          die "Unable to write to output file ($!)\n";
         exit(1);  
451      }      }
452      while ( $done + $WriteBufSz <= length($$dataRef) ) {      while ( $done + $WriteBufSz <= length($$dataRef) ) {
453          if ( syswrite($fh, substr($$dataRef, $done, $WriteBufSz))          if ( syswrite($fh, substr($$dataRef, $done, $WriteBufSz))
454                              != $WriteBufSz ) {                              != $WriteBufSz ) {
455              print(STDERR "Unable to write to output file ($!)\n");              die "Unable to write to output file ($!)\n";
             exit(1);  
456          }          }
457          $done += $WriteBufSz;          $done += $WriteBufSz;
458      }      }
# Line 389  sub TarWriteFileInfo Line 557  sub TarWriteFileInfo
557  sub seedCache($$$) {  sub seedCache($$$) {
558          my ($host, $share, $dumpNo) = @_;          my ($host, $share, $dumpNo) = @_;
559    
         my $dsn = $Conf{SearchDSN};  
         my $db_user = $Conf{SearchUser} || '';  
           
560          print STDERR curr_time(), "getting files for $host:$share increment $dumpNo..." if ($opts{v});          print STDERR curr_time(), "getting files for $host:$share increment $dumpNo..." if ($opts{v});
561          my $sql = q{          my $sql = q{
562                  SELECT path                  SELECT path,size
563                  FROM files                  FROM files
564                          JOIN shares on shares.id = shareid                          JOIN shares on shares.id = shareid
565                          JOIN hosts on hosts.id = shares.hostid                          JOIN hosts on hosts.id = shares.hostid
566                  WHERE hosts.name = ? and shares.name = ? and backupnum = ?                  WHERE hosts.name = ? and shares.name = ? and backupnum = ?
567          };          };
568    
         my $dbh = DBI->connect($dsn, $db_user, "", { RaiseError => 1, AutoCommit => 1} );        
569          my $sth = $dbh->prepare($sql);            my $sth = $dbh->prepare($sql);  
570          $sth->execute($host, $share, $dumpNo);          $sth->execute($host, $share, $dumpNo);
571          my $count = $sth->rows;          my $count = $sth->rows;
572          print STDERR " found $count items\n" if ($opts{v});          print STDERR " found $count items\n" if ($opts{v});
573          while (my $row = $sth->fetchrow_arrayref) {          while (my $row = $sth->fetchrow_arrayref) {
574  #print STDERR "+ ", $row->[0],"\n";  #print STDERR "+ ", $row->[0],"\n";
575                  $in_backup_increment->{ $row->[0] }++;                  $in_backup_increment->{ $row->[0] } = $row->[1];
576          }          }
577                    
578          $sth->finish();          $sth->finish();
         $dbh->disconnect();  
579    
580          return $count;          return $count;
581  }  }
582    
583    #
584    # calculate overhad for one file in tar
585    #
586    sub tar_overhead($) {
587            my $name = shift || '';
588    
589            # header, padding of file and two null blocks at end
590            my $len = 4 * $tar_header_length;
591    
592            # if filename is longer than 99 chars subtract blocks for
593            # long filename
594            if ( length($name) > 99 ) {
595                    $len += int( ( length($name) + $tar_header_length ) / $tar_header_length ) * $tar_header_length;
596            }
597    
598            return $len;
599    }
600    
601  my $Attr;  my $Attr;
602  my $AttrDir;  my $AttrDir;
603    
# Line 429  sub TarWriteFile Line 610  sub TarWriteFile
610    
611      $tarPath =~ s{//+}{/}g;      $tarPath =~ s{//+}{/}g;
612    
613  #print STDERR "? $tarPath\n";      #print STDERR "? $tarPath\n" if ($opts{d});
614      return unless ($in_backup_increment->{$tarPath});      my $size = $in_backup_increment->{$tarPath};
615  #print STDERR "A $tarPath\n";      return unless (defined($size));
616    
617        # is this file too large to fit into MaxArchiveFileSize?
618    
619        if ( ($current_tar_size + tar_overhead($tarPath) + $size) > $max_file_size ) {
620            print STDERR "# tar file $current_tar_size + $tar_header_length + $size > $max_file_size, splitting\n" if ($opts{d});
621            new_tar_part();
622        }
623    
624        #print STDERR "A $tarPath [$size] tell: $current_tar_size\n" if ($opts{d});
625        $items_in_part++;
626    
627      if ( defined($PathRemove)      if ( defined($PathRemove)
628              && substr($tarPath, 0, length($PathRemove)) eq $PathRemove ) {              && substr($tarPath, 0, length($PathRemove)) eq $PathRemove ) {
# Line 445  sub TarWriteFile Line 636  sub TarWriteFile
636          #          #
637          # Directory: just write the header          # Directory: just write the header
638          #          #
           
                   
639          $hdr->{name} .= "/" if ( $hdr->{name} !~ m{/$} );          $hdr->{name} .= "/" if ( $hdr->{name} !~ m{/$} );
640          TarWriteFileInfo($fh, $hdr);          TarWriteFileInfo($fh, $hdr);
641          $DirCnt++;          $DirCnt++;
# Line 460  sub TarWriteFile Line 649  sub TarWriteFile
649              $ErrorCnt++;              $ErrorCnt++;
650              return;              return;
651          }          }
652          TarWriteFileInfo($fh, $hdr);          # do we need to split file?
653          my($data, $size);          if ($hdr->{size} < $max_file_size) {
654          while ( $f->read(\$data, $BufSize) > 0 ) {                  TarWriteFileInfo($fh, $hdr);
655              TarWrite($fh, \$data);                  my($data, $size);
656              $size += length($data);                  while ( $f->read(\$data, $BufSize) > 0 ) {
657          }                      TarWrite($fh, \$data);
658          $f->close;                      $size += length($data);
659          TarWritePad($fh, $size);                  }
660                    $f->close;
661                    TarWritePad($fh, $size);
662                  $FileCnt++;                  $FileCnt++;
663                  $ByteCnt += $size;                  $ByteCnt += $size;
664            } else {
665                    my $full_size = $hdr->{size};
666                    my $orig_name = $hdr->{name};
667                    my $max_part_size = $max_file_size - tar_overhead($hdr->{name});
668    
669                    my $parts = int(($full_size + $max_part_size - 1) / $max_part_size);
670                    print STDERR "# splitting $orig_name [$full_size bytes] into $parts parts\n" if ($opts{d});
671                    foreach my $subpart ( 1 .. $parts ) {
672                            new_tar_part();
673                            if ($subpart < $parts) {
674                                    $hdr->{size} = $max_part_size;
675                            } else {
676                                    $hdr->{size} = $full_size % $max_part_size;
677                            }
678                            $hdr->{name} = $orig_name . '/' . $subpart;
679                            print STDERR "## creating part $subpart ",$hdr->{name}, " [", $hdr->{size}," bytes]\n";
680    
681                            TarWriteFileInfo($fh, $hdr);
682                            my($data, $size);
683    if (0) {
684                            for ( 1 .. int($hdr->{size} / $BufSize) ) {
685                                    my $r_size = $f->read(\$data, $BufSize);
686                                    die "expected $BufSize bytes read, got $r_size bytes!" if ($r_size != $BufSize);
687                                    TarWrite($fh, \$data);
688                                    $size += length($data);
689                            }
690    }
691                            my $size_left = $hdr->{size} % $BufSize;
692                            my $r_size = $f->read(\$data, $size_left);
693                            die "expected $size_left bytes last read, got $r_size bytes!" if ($r_size != $size_left);
694    
695                            TarWrite($fh, \$data);
696                            $size += length($data);
697                            TarWritePad($fh, $size);
698    
699                            $items_in_part++;
700                    }
701                    $f->close;
702                    $FileCnt++;
703                    $ByteCnt += $full_size;
704                    new_tar_part();
705            }
706      } elsif ( $hdr->{type} == BPC_FTYPE_HARDLINK ) {      } elsif ( $hdr->{type} == BPC_FTYPE_HARDLINK ) {
707          #          #
708          # Hardlink file: either write a hardlink or the complete file          # Hardlink file: either write a hardlink or the complete file
709                  # depending upon whether the linked-to file will be written          # depending upon whether the linked-to file will be written
710                  # to the archive.          # to the archive.
711          #          #
712                  # Start by reading the contents of the link.          # Start by reading the contents of the link.
713                  #          #
714          my $f = BackupPC::FileZIO->open($hdr->{fullPath}, 0, $hdr->{compress});          my $f = BackupPC::FileZIO->open($hdr->{fullPath}, 0, $hdr->{compress});
715          if ( !defined($f) ) {          if ( !defined($f) ) {
716              print(STDERR "Unable to open file $hdr->{fullPath}\n");              print(STDERR "Unable to open file $hdr->{fullPath}\n");
# Line 488  sub TarWriteFile Line 721  sub TarWriteFile
721          while ( $f->read(\$data, $BufSize) > 0 ) {          while ( $f->read(\$data, $BufSize) > 0 ) {
722              $hdr->{linkname} .= $data;              $hdr->{linkname} .= $data;
723          }          }
724                  $f->close;          $f->close;
725                  my $done = 0;          my $done = 0;
726                  my $name = $hdr->{linkname};          my $name = $hdr->{linkname};
727                  $name =~ s{^\./}{/};          $name =~ s{^\./}{/};
728                  if ( $HardLinkExtraFiles{$name} ) {          if ( $HardLinkExtraFiles{$name} ) {
729                      #              #
730                      # Target file will be or was written, so just remember              # Target file will be or was written, so just remember
731                      # the hardlink so we can dump it later.              # the hardlink so we can dump it later.
732                      #              #
733                      push(@HardLinks, $hdr);              push(@HardLinks, $hdr);
734                      $SpecialCnt++;              $SpecialCnt++;
735                  } else {          } else {
736                      #              #
737                      # Have to dump the original file.  Just call the top-level              # Have to dump the original file.  Just call the top-level
738                      # routine, so that we save the hassle of dealing with              # routine, so that we save the hassle of dealing with
739                      # mangling, merging and attributes.              # mangling, merging and attributes.
740                      #              #
741                      $HardLinkExtraFiles{$hdr->{linkname}} = 1;              $HardLinkExtraFiles{$hdr->{linkname}} = 1;
742                      archiveWrite($fh, $hdr->{linkname}, $hdr->{name});              archiveWrite($fh, $hdr->{linkname}, $hdr->{name});
743                  }          }
744      } elsif ( $hdr->{type} == BPC_FTYPE_SYMLINK ) {      } elsif ( $hdr->{type} == BPC_FTYPE_SYMLINK ) {
745          #          #
746          # Symbolic link: read the symbolic link contents into the header          # Symbolic link: read the symbolic link contents into the header

Legend:
Removed from v.169  
changed lines
  Added in v.236

  ViewVC Help
Powered by ViewVC 1.1.26