Changeset 1607


Ignore:
Timestamp:
Jan 7, 2003, 11:14:48 PM (18 years ago)
Author:
landonf (Landon Fuller)
Message:

Pull contents out of registry, and do not set package destination to install prefix
This allows us to support ports who have files that must be installed in /

Location:
trunk/base/src/port1.0
Files:
2 edited

Legend:

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

    r1598 r1607  
    119119       
    120120    write_PkgInfo ${mpkgpath}/Contents/PkgInfo
    121     write_info_file ${mpkgpath}/Contents/Resources/${portname}.info $portname $portversion $description $prefix
     121    write_info_file ${mpkgpath}/Contents/Resources/${portname}.info $portname $portversion $description
    122122    mpkg_write_info_plist ${mpkgpath}/Contents/Info.plist $portname $portversion $prefix $dependencies
    123123    write_description_plist ${mpkgpath}/Contents/Resources/Description.plist $portname $portversion $description
  • trunk/base/src/port1.0/portpackage.tcl

    r1595 r1607  
    115115
    116116proc package_pkg {portname portversion entry} {
    117     global portdbpath destpath workpath contents prefix portresourcepath description package.destpath long_description homepage
     117    global portdbpath destpath workpath prefix portresourcepath description package.destpath long_description homepage
    118118
    119119    set resourcepath ${workpath}/pkg_resources
     
    126126        set pfile [lindex $plist 0]
    127127
    128         foreach f $contents {
     128        set receipt_contents [lindex $entry [incr ix]]
     129        foreach f $receipt_contents {
    129130            set fname [lindex $f 0]
    130131            puts $pfile $fname
     
    139140        }
    140141
    141         if [catch {system "(cd ${prefix} && gnutar -T [lindex $plist 1] -cPpf -) | (cd ${destpath} && tar xvf -)"} return] {
     142        if [catch {system "gnutar -T [lindex $plist 1] -cPpf - | (cd ${destpath} && tar xvf -)"} return] {
    142143            ui_error "Package creation failed - gnutar returned error status: $return"
    143144            file delete [lindex $plist 1]
     
    157158    system "mkdir -p -m 0755 ${pkgpath}/Contents/Resources"
    158159    write_PkgInfo ${pkgpath}/Contents/PkgInfo
    159     write_info_file ${pkgpath}/Contents/Resources/${portname}.info $portname $portversion $description $prefix
    160     write_info_plist ${pkgpath}/Contents/Info.plist $portname $portversion $prefix
     160    write_info_file ${pkgpath}/Contents/Resources/${portname}.info $portname $portversion $description
     161    write_info_plist ${pkgpath}/Contents/Info.plist $portname $portversion
    161162    write_description_plist ${pkgpath}/Contents/Resources/Description.plist $portname $portversion $description
    162163    # long_description, description, or homepage may not exist
     
    201202}
    202203
    203 proc write_info_file {infofile portname portversion description destination} {
    204         if {[string index $destination end] != "/"} {
    205                 append destination /
    206         }
    207 
     204proc write_info_file {infofile portname portversion description} {
    208205        set infofd [open ${infofile} w+]
    209206        puts $infofd "Title ${portname}
    210207Version ${portversion}
    211208Description ${description}
    212 DefaultLocation ${destination}
     209DefaultLocation /
    213210DeleteWarning
    214211
     
    226223}
    227224
    228 proc write_info_plist {infofile portname portversion destination} {
     225proc write_info_plist {infofile portname portversion} {
    229226        set vers [split $portversion "."]
    230227        set major [lindex $vers 0]
     
    233230        if {$minor == ""} {set minor "0"}
    234231               
    235         if {[string index $destination end] != "/"} {
    236                 append destination /
    237         }
    238 
    239232        set infofd [open ${infofile} w+]
    240233        puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
     
    260253        <string>RootAuthorization</string>
    261254        <key>IFPkgFlagDefaultLocation</key>
    262         <string>${destination}</string>
     255        <string>/</string>
    263256        <key>IFPkgFlagInstallFat</key>
    264257        <false/>
Note: See TracChangeset for help on using the changeset viewer.