Changeset 1726 for trunk/base


Ignore:
Timestamp:
Jan 19, 2003, 7:45:33 AM (17 years ago)
Author:
landonf (Landon Fuller)
Message:

Remove all destroot kludges

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

Legend:

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

    r1715 r1726  
    5050default install.pre_args {${install.target}}
    5151default install.target install
    52 option_deprecate build.target.install install.target
    53 
    54 # XXX nasty kludges to support contents lists AND destdir
    55 option_proc contents install_useContents
    56 
    57 proc install_useContents {option action args} {
    58     global install_useContents
    59     if {${action} == "set" || ${action} == "append"} {
    60         set install_useContents yes
    61     }
    62 }
     52default install.args {DESTDIR=${destroot}}
    6353
    6454set UI_PREFIX "---> "
    6555
    6656proc install_start {args} {
    67     global UI_PREFIX portname destpath
     57    global UI_PREFIX portname destroot
    6858
    6959    ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s"] ${portname}]"
    7060       
    71         file mkdir ${destpath}
     61        file mkdir ${destroot}
    7262}
    7363
     
    131121
    132122proc install_main {args} {
    133     global install_useContents destpath
    134123    system "[command install]"
    135     if {![tbool install_useContents]} {
    136         directory_dig ${destpath} ${destpath}
    137     }
    138124    return 0
    139125}
    140126
    141127proc install_registry {args} {
    142     global portname portversion portpath categories description long_description homepage depends_run installPlist package-install uninstall workdir worksrcdir prefix UI_PREFIX contents install_useContents
    143     if {![tbool install_useContents]} {
    144         set _installPlist $installPlist
    145     } else {
    146         set _installPlist $contents
    147     }
     128    global portname portversion portpath categories description long_description homepage depends_run installPlist package-install uninstall workdir worksrcdir prefix UI_PREFIX destroot
     129
     130    # Install ${destroot} contents into /
     131    directory_dig ${destroot} ${destroot}
    148132
    149133    # Package installed successfully, so now we must register it
     
    167151        registry_store $rhandle [concat package-install ${package-install}]
    168152    }
    169     if [info exists _installPlist] {
    170         registry_store $rhandle [list contents [fileinfo_for_index $_installPlist]]
     153    if [info exists installPlist] {
     154        registry_store $rhandle [list contents [fileinfo_for_index $installPlist]]
    171155    }
    172156    if {[info proc pkg_uninstall] == "pkg_uninstall"} {
  • trunk/base/src/port1.0/portregistry.tcl

    r1697 r1726  
    3737
    3838# define options
    39 # XXX kludge to support contents lists AND destdir
    40 option_deprecate contents
    41 options contents registry.nochecksum registry.path registry.nobzip registry.contents_recurse
     39options registry.nochecksum registry.path registry.nobzip
    4240
    4341default registry.path {[file join ${portdbpath} receipts]}
    4442
    4543set UI_PREFIX "---> "
    46 
    47 proc registry_start {args} {
    48     global UI_PREFIX portname
    49 
    50     ui_msg "$UI_PREFIX [format [msgcat::mc "Adding %s to registry, this may take a moment..."] ${portname}]"
    51 }
    5244
    5345# For now, just write stuff to a file for debugging.
     
    146138
    147139proc fileinfo_for_entry {rval dir entry} {
    148     global registry.contents_recurse UI_PREFIX
     140    global UI_PREFIX
    149141
    150142    upvar $rval myrval
    151143    set path [file join $dir $entry]
    152     if {[file isdirectory $path] && [tbool registry.contents_recurse]} {
    153         foreach name [readdir $path] {
    154             if {[string match $name .] || [string match $name ..]} {
    155                 continue
    156             }
    157             set subpath [file join $path $name]
    158             if [file isdirectory $subpath] {
    159                 fileinfo_for_entry myrval $subpath ""
    160             } elseif [file readable $subpath] {
    161                 lappend myrval [fileinfo_for_file $subpath]
    162             }
    163         }
    164     }
    165144    lappend myrval [fileinfo_for_file $path]
    166145    return $myrval
     
    178157            set fname [file join $prefix $file]
    179158            set dir $prefix
    180         }
    181         if {[file isdirectory $fname] && [tbool registry.contents_recurse]} {
    182             ui_msg "$UI_PREFIX [format [msgcat::mc "Warning: Registry adding contents of directory %s"] $fname]"
    183159        }
    184160        fileinfo_for_entry rval $dir $file
Note: See TracChangeset for help on using the changeset viewer.