Ignore:
Timestamp:
Jun 1, 2013, 8:55:55 AM (7 years ago)
Author:
jmr@…
Message:

bring back clean --archive since files can persist in incoming/ in some circumstances

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portinstall.tcl

    r106615 r106617  
    300300
    301301proc portinstall::extract_contents {location type} {
    302     set qflag ${portutil::autoconf::tar_q}
    303     switch -- $type {
    304         tbz -
    305         tbz2 {
    306             set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xOj${qflag}f $location ./+CONTENTS]
    307         }
    308         tgz {
    309             set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xOz${qflag}f $location ./+CONTENTS]
    310         }
    311         tar {
    312             set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xO${qflag}f $location ./+CONTENTS]
    313         }
    314         txz {
    315             set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xO${qflag}f $location --use-compress-program [findBinary xz ""] ./+CONTENTS]
    316         }
    317         tlz {
    318             set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xO${qflag}f $location --use-compress-program [findBinary lzma ""] ./+CONTENTS]
    319         }
    320         xar {
    321             system "cd ${workpath} && [findBinary xar ${portutil::autoconf::xar_path}] -xf $location +CONTENTS"
    322             set twostep 1
    323         }
    324         zip {
    325             set raw_contents [exec [findBinary unzip ${portutil::autoconf::unzip_path}] -p $location +CONTENTS]
    326         }
    327         cpgz {
    328             system "cd ${workpath} && [findBinary pax ${portutil::autoconf::pax_path}] -rzf $location +CONTENTS"
    329             set twostep 1
    330         }
    331         cpio {
    332             system "cd ${workpath} && [findBinary pax ${portutil::autoconf::pax_path}] -rf $location +CONTENTS"
    333             set twostep 1
    334         }
    335     }
    336     if {[info exists twostep]} {
    337         set fd [open "${workpath}/+CONTENTS"]
    338         set raw_contents [read $fd]
    339         close $fd
    340     }
    341     set contents {}
    342     set ignore 0
    343     set sep [file separator]
    344     foreach line [split $raw_contents \n] {
    345         if {$ignore} {
    346             set ignore 0
    347             continue
    348         }
    349         if {[string index $line 0] != "@"} {
    350             lappend contents "${sep}${line}"
    351         } elseif {$line == "@ignore"} {
    352             set ignore 1
    353         }
    354     }
    355     return $contents
     302    return [extract_archive_metadata $location $type contents]
    356303}
    357304
Note: See TracChangeset for help on using the changeset viewer.