Changeset 105002


Ignore:
Timestamp:
Apr 7, 2013, 12:15:15 PM (7 years ago)
Author:
afb@…
Message:

Remove support for the xml metadata and the xpkg package archives

Doesn't make much sense now it has been moved from archive to install,
and the corresponding xpkg binary package support was never implemented.
Now that the source packages are removed, lose the binary packages too.
Future attempts are more likely to used a tar-based format, than a xar.

Location:
trunk/base/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/images_to_archives.tcl

    r95480 r105002  
    7575        set found 0
    7676        foreach adir [list $oldarchivedir $olderarchivedir] {
    77             foreach type {tbz2 tbz tgz tar txz tlz xar xpkg zip cpgz cpio} {
     77            foreach type {tbz2 tbz tgz tar txz tlz xar zip cpgz cpio} {
    7878                set oldarchivefullpath "[file join $adir $oldarchiverootname].${type}"
    7979                if {[file isfile $oldarchivefullpath]} {
  • trunk/base/src/package1.0/portunarchive.tcl

    r100434 r105002  
    202202            }
    203203        }
    204         xar|xpkg {
     204        xar {
    205205            set xar "xar"
    206206            if {[catch {set xar [findBinary $xar ${portutil::autoconf::xar_path}]} errmsg] == 0} {
  • trunk/base/src/port1.0/portinstall.tcl

    r93512 r105002  
    9393        }
    9494        return $rval
    95 }
    96 
    97 proc portinstall::putel { fd el data } {
    98     # Quote xml data
    99     set quoted [string map  { & &amp; < &lt; > &gt; } $data]
    100     # Write the element
    101     puts $fd "<${el}>${quoted}</${el}>"
    102 }
    103 
    104 proc portinstall::putlist { fd listel itemel list } {
    105     puts $fd "<$listel>"
    106     foreach item $list {
    107         putel $fd $itemel $item
    108     }
    109     puts $fd "</$listel>"
    11095}
    11196
     
    201186            }
    202187        }
    203         xpkg {
    204             set xar "xar"
    205             set compression "bzip2"
    206             set archive.meta yes
    207             set archive.metaname "xpkg"
    208             set archive.metapath [file join $workpath "${archive.metaname}.xml"]
    209             if {[catch {set xar [findBinary $xar ${portutil::autoconf::xar_path}]} errmsg] == 0} {
    210                 ui_debug "Using $xar"
    211                 set archive.cmd "$xar"
    212                 set archive.pre_args "-cv --exclude='\./\+.*' --compression=${compression} -n ${archive.metaname} -s ${archive.metapath} -f"
    213                 set archive.args "${location} ."
    214             } else {
    215                 ui_debug $errmsg
    216                 return -code error "No '$xar' was found on this system!"
    217             }
    218         }
    219188        zip {
    220189            set zip "zip"
     
    335304    close $fd
    336305
    337     # the XML package metadata, for XAR package
    338     # (doesn't contain any file list/checksums)
    339     if {[tbool archive.meta]} {
    340         set sd [open ${archive.metapath} w]
    341         puts $sd "<xpkg version='0.2'>"
    342         # TODO: split contents into <buildinfo> (new) and <package> (current)
    343         #       see existing <portpkg> for the matching source package layout
    344 
    345         putel $sd name ${subport}
    346         putel $sd epoch ${epoch}
    347         putel $sd version ${version}
    348         putel $sd revision ${revision}
    349         putel $sd major 0
    350         putel $sd minor 0
    351 
    352         putel $sd platform ${os.platform}
    353         if {[llength [get_canonical_archs]] > 1} {
    354             putlist $sd archs arch [get_canonical_archs]
    355         } else {
    356             putel $sd arch [get_canonical_archs]
    357         }
    358         putlist $sd variants variant $vlist
    359 
    360         if {[exists categories]} {
    361             set primary [lindex [split [option categories] " "] 0]
    362             putel $sd category $primary
    363         }
    364         if {[exists description]} {
    365             putel $sd comment "[option description]"
    366         }
    367         if {[exists long_description]} {
    368             putel $sd desc "[option long_description]"
    369         }
    370         if {[exists homepage]} {
    371             putel $sd homepage "[option homepage]"
    372         }
    373 
    374             # Emit dependencies provided by this package
    375             puts $sd "<provides>"
    376                 puts $sd "<item>"
    377                 putel $sd name $subport
    378                 putel $sd major 0
    379                 putel $sd minor 0
    380                 puts $sd "</item>"
    381             puts $sd "</provides>"
    382 
    383 
    384             # Emit build, library, and runtime dependencies
    385             puts $sd "<requires>"
    386             foreach {key type} {
    387                 depends_fetch "fetch"
    388                 depends_extract "extract"
    389                 depends_build "build"
    390                 depends_lib "library"
    391                 depends_run "runtime"
    392             } {
    393                 if {[info exists $key]} {
    394                     set depname [lindex [split [set $key] :] end]
    395                     puts $sd "<item type=\"$type\">"
    396                     putel $sd name $depname
    397                     putel $sd major 0
    398                     putel $sd minor 0
    399                     puts $sd "</item>"
    400                 }
    401             }
    402             puts $sd "</requires>"
    403 
    404         puts $sd "</xpkg>"
    405         close $sd
    406     }
    407 
    408306    # Now create the archive
    409307    ui_debug "Creating [file tail $location]"
     
    440338        xar {
    441339            system "cd ${workpath} && [findBinary xar ${portutil::autoconf::xar_path}] -xf $location +CONTENTS"
    442             set twostep 1
    443         }
    444         xpkg {
    445             system "cd ${workpath} && [findBinary xar ${portutil::autoconf::xar_path}] -xf $location --compression=bzip2 +CONTENTS"
    446340            set twostep 1
    447341        }
  • trunk/base/src/port1.0/portutil.tcl

    r104413 r105002  
    24362436    if {![info exists supported_archive_types]} {
    24372437        set supported_archive_types {}
    2438         foreach type {tbz2 tbz tgz tar txz tlz xar xpkg zip cpgz cpio} {
     2438        foreach type {tbz2 tbz tgz tar txz tlz xar zip cpgz cpio} {
    24392439            if {[catch {archiveTypeIsSupported $type}] == 0} {
    24402440                lappend supported_archive_types $type
     
    25122512            }
    25132513        }
    2514         xar|xpkg {
     2514        xar {
    25152515            set xar "xar"
    25162516            if {[catch {set xar [findBinary $xar ${portutil::autoconf::xar_path}]} errmsg] == 0} {
  • trunk/base/src/registry2.0/portimage.tcl

    r98737 r105002  
    373373                }
    374374            }
    375             xar|xpkg {
     375            xar {
    376376                set xar "xar"
    377377                if {[catch {set xar [macports::findBinary $xar ${macports::autoconf::xar_path}]} errmsg] == 0} {
Note: See TracChangeset for help on using the changeset viewer.