|
|
|
@ -2085,6 +2085,10 @@ namespace eval punkcheck { |
|
|
|
foreach rec $record_list { |
|
|
|
foreach rec $record_list { |
|
|
|
if {[dict get $rec tag] eq "FILEINFO"} { |
|
|
|
if {[dict get $rec tag] eq "FILEINFO"} { |
|
|
|
set tgtlist [dict get $rec -targets] |
|
|
|
set tgtlist [dict get $rec -targets] |
|
|
|
|
|
|
|
if {[dict exists $result $tgtlist]} { |
|
|
|
|
|
|
|
#todo - warn - duplicate record for same targetlist - shouldn't happen as we should be using get_file_record to find existing records |
|
|
|
|
|
|
|
error "punkcheck::recordlist::records_as_target_dict - multiple records with same targetlist '$tgtlist'" |
|
|
|
|
|
|
|
} |
|
|
|
dict set result $tgtlist $rec |
|
|
|
dict set result $tgtlist $rec |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2092,8 +2096,6 @@ namespace eval punkcheck { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#will only match if same base was used.. and same targetlist |
|
|
|
#will only match if same base was used.. and same targetlist |
|
|
|
proc get_file_record {targetlist record_list} { |
|
|
|
proc get_file_record {targetlist record_list} { |
|
|
|
set posn 0 |
|
|
|
set posn 0 |
|
|
|
@ -2349,12 +2351,12 @@ namespace eval punkcheck { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#extract new or existing filerecord for path given |
|
|
|
#extract new or existing filerecord for path given |
|
|
|
#review - locking/concurrency |
|
|
|
#REVIEW - locking/concurrency |
|
|
|
proc extract_or_create_fileset_record {relative_target_paths recordset} { |
|
|
|
proc extract_or_create_fileset_record {relative_target_paths recordset} { |
|
|
|
set fetch_record_result [punkcheck::recordlist::get_file_record $relative_target_paths $recordset] |
|
|
|
set fetch_record_result [punkcheck::recordlist::get_file_record $relative_target_paths $recordset] |
|
|
|
set existing_posn [dict get $fetch_record_result position] |
|
|
|
set existing_posn [dict get $fetch_record_result position] |
|
|
|
if {$existing_posn == -1} { |
|
|
|
if {$existing_posn == -1} { |
|
|
|
#puts stdout "NO existing record for $relative_target_paths" |
|
|
|
puts stdout "punkcheck NO existing record for $relative_target_paths" |
|
|
|
set isnew 1 |
|
|
|
set isnew 1 |
|
|
|
set fileset_record [dict create tag FILEINFO -targets $relative_target_paths body {}] |
|
|
|
set fileset_record [dict create tag FILEINFO -targets $relative_target_paths body {}] |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|