Changeset 60
- Timestamp:
- 11/27/05 00:34:02 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/soft/ObsData/ObsData/Repository.pm
- Property cvs2svn:cvs-rev changed from 1.8 to 1.9
r59 r60 6 6 use warnings; 7 7 use ObsData; 8 use ObsData::Archive; 8 9 use Config::IniFiles; 9 10 … … 71 72 } 72 73 73 if (! $self->file_need_parse($file)) { 74 my $newer = $self->file_need_parse($file); 75 76 77 $self->loging(0, "trying to read archive content of %s", $file); 78 my $archive = ObsData::Archive->new("$self->{dir}/$file") or do { 79 $self->loging(4, 80 "Can't handle archive %s: %s, skipping", 81 $file, 82 ObsData::Archive->error 83 ); 74 84 next; 85 }; 86 87 foreach my $content ($archive->ls) { 88 $self->loging(0, "archive %s: content %s", $file, $content); 89 my ($datatype, $destfile) = $self->{obsdata}->build_dest_filename($content, $self->{datatype}); 90 $self->loging(0, "%s/%s file, datatype %s, destination %s", 91 $file, $content, 92 $datatype || '(none)', 93 $destfile || '(none)', 94 ); 95 96 if (!$datatype) { 97 $self->loging(3, "I don't know what to do of %s/%s", $file, $content); 98 99 next; 100 } 75 101 } 76 77 my ($datatype, $destfile) = $self->{obsdata}->build_dest_filename($file, $self->{datatype}); 78 $self->loging(0, "%s file, datatype %s, destination %s", 79 $file, 80 $datatype || '(none)', 81 $destfile || '(none)', 82 ); 83 84 if (!$datatype) { 85 $self->loging(3, "I don't know what to do of %s", $file); 86 87 next; 88 } 89 90 $self->install_file($file, $destfile); 102 # $self->install_file($file, $destfile); 91 103 92 104 } … … 129 141 } 130 142 131 if ($olddatatype) { 143 #if ($olddatatype) { 144 if (defined($oldmtime) && defined($oldsize)) { 132 145 if (! ($sizeok && $mtimeok)) { 133 146 $self->loging(3, "File %s allready processed but has changed:%s%s, skipping", … … 137 150 ); 138 151 } 139 $self->loging(0, "%s has been allready processed: was %s", $file, $olddatatype);152 # $self->loging(0, "%s has been allready processed: was %s", $file, $olddatatype); 140 153 return 0; 141 154 } else { … … 158 171 } 159 172 160 sub installfile { 173 sub install_file { 174 my ($self, $file) = @_; 161 175 162 176 }
Note: See TracChangeset
for help on using the changeset viewer.