Changeset 53681


Ignore:
Timestamp:
Jul 11, 2009, 7:24:31 PM (10 years ago)
Author:
blb@…
Message:

Merge from trunk

Location:
branches/images-and-archives/base
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/images-and-archives/base

  • branches/images-and-archives/base/Makefile.in

    r53504 r53681  
    4242        $(TCLSH) src/dep_map_clean.tcl ${TCL_PACKAGE_DIR}
    4343endif
    44         @echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, run:"; echo ""
     44        @echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, add ${prefix}/bin to your PATH and run:"; echo ""
    4545        @echo "sudo port -v selfupdate"; echo ""
    4646        @echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at http://trac.macports.org/ for full documentation."; echo ""
    47         @echo "Stray sources might have been left in the legacy ${localstatedir}/db/dports directory after this upgrade, which moved most of what it could to ${localstatedir}/macports, so you might want to look in the former and cleanup manually."; echo ""
    4847
    4948group::
  • branches/images-and-archives/base/src/port/port.tcl

    r53504 r53681  
    261261    #   version         (version_revision)
    262262    #   variants array  (variant=>+-)
     263    #   requested_variants array  (variant=>+-)
    263264    #   options array   (key=>value)
    264265    #   fullname        (name/version_revision+-variants)
     
    269270    if {![info exists port(version)]}   { set port(version) "" }
    270271    if {![info exists port(variants)]}  { set port(variants) "" }
     272    if {![info exists port(requested_variants)]}  { set port(requested_variants) "" }
    271273    if {![info exists port(options)]}   { set port(options) [array get global_options] }
    272274
     
    301303        array set port $portentry
    302304        if ([info exists overrides(version)])   { set port(version) $overrides(version) }
    303         if ([info exists overrides(variants)])  { set port(variants) $overrides(variants)   }
     305        if ([info exists overrides(variants)])  { set port(variants) $overrides(variants) }
     306        if ([info exists overrides(requested_variants)])  { set port(requested_variants) $overrides(requested_variants) }
    304307        if ([info exists overrides(options)])   { set port(options) $overrides(options) }
    305308        add_to_portlist portlist [array get port]
     
    365368            array unset variations
    366369            array set variations $portspec(variants)
     370            array unset requested_variations
     371            array set requested_variations $portspec(requested_variants)
    367372            array unset options
    368373            array set options $portspec(options)
     
    878883    set name ""
    879884    set version ""
    880     array unset variants
     885    array unset requested_variants
    881886    array unset options
    882887   
     
    972977            set name [url_to_portname $token]
    973978            if {$name != ""} {
    974                 parsePortSpec version variants options
     979                parsePortSpec version requested_variants options
    975980                add_to_portlist reslist [list url $token \
    976981                  name $name \
    977982                  version $version \
    978                   variants [array get variants] \
     983                  requested_variants [array get requested_variants] \
     984                  variants [array get requested_variants] \
    979985                  options [array get options]]
    980986            } else {
     
    987993        default             { # Treat anything else as a portspec (portname, version, variants, options
    988994            # or some combination thereof).
    989             parseFullPortSpec url name version variants options
     995            parseFullPortSpec url name version requested_variants options
    990996            add_to_portlist reslist [list url $url \
    991997              name $name \
    992998              version $version \
    993               variants [array get variants] \
     999              requested_variants [array get requested_variants] \
     1000              variants [array get requested_variants] \
    9941001              options [array get options]]
    9951002            set el 1
     
    10111018    array unset overrides
    10121019    if {$version != ""} { set overrides(version) $version }
    1013     if {[array size variants]} { set overrides(variants) [array get variants] }
     1020    if {[array size variants]} {
     1021        # we always record the requested variants separately,
     1022        # but requested ones always override existing ones
     1023        set overrides(requested_variants) [array get variants]
     1024        set overrides(variants) [array get variants]
     1025    }
    10141026    if {[array size options]} { set overrides(options) [array get options] }
    10151027
     
    17241736            set porturl $portinfo(porturl)
    17251737        }
     1738       
     1739        # Add any global_variations to the variations
     1740        # specified for the port
     1741        array unset merged_variations
     1742        array set merged_variations [array get variations]
     1743        foreach { variation value } [array get global_variations] {
     1744            if { ![info exists merged_variations($variation)] } {
     1745                set merged_variations($variation) $value
     1746            }
     1747        }
    17261748
    17271749        # Open the Portfile associated with this port.
     
    19852007            # First filter out implicit variants from the explicitly set/unset variants.
    19862008            set global_variations_list [mport_filtervariants [array get global_variations] yes]
    1987             set variations_list [mport_filtervariants [array get variations] yes]
     2009            set variations_list [mport_filtervariants [array get requested_variations] yes]
    19882010           
    19892011            macports::upgrade $portname "port:$portname" $global_variations_list $variations_list [array get options] depscache
     
    28052827        }
    28062828       
    2807         # Add any global_variations to the variations
    2808         # specified for the port
    2809         foreach { variation value } [array get global_variations] {
    2810             if { ![info exists variations($variation)] } {
    2811                 set variations($variation) $value
    2812             }
     2829        # use existing variants iff none were explicitly requested
     2830        if {[array get requested_variations] == "" && [array get variations] != ""} {
     2831            array unset requested_variations
     2832            array set requested_variations [array get variations]
     2833            set filtered_variations [mport_filtervariants [array get variations] no]
     2834        } else {
     2835            set filtered_variations [mport_filtervariants [array get requested_variations] yes]
    28132836        }
    28142837        # Filter out implicit variants from the explicitly set/unset variants.
     
    28182841            mirror {}
    28192842            default {
    2820                 set variationslist [mport_filtervariants [array get variations] yes]
    2821                 array unset variations
    2822                 array set variations $variationslist
     2843                array unset requested_variations
     2844                array set requested_variations $filtered_variations
     2845            }
     2846        }
     2847       
     2848        # Add any global_variations to the variations
     2849        # specified for the port
     2850        foreach { variation value } [array get global_variations] {
     2851            if { ![info exists requested_variations($variation)] } {
     2852                set requested_variations($variation) $value
    28232853            }
    28242854        }
     
    28292859            set options(ports_version_glob) $portversion
    28302860        }
    2831         if {[catch {set workername [mportopen $porturl [array get options] [array get variations]]} result]} {
     2861        if {[catch {set workername [mportopen $porturl [array get options] [array get requested_variations]]} result]} {
    28322862            global errorInfo
    28332863            ui_debug "$errorInfo"
  • branches/images-and-archives/base/src/registry2.0/portimage.tcl

    r53504 r53681  
    5757# will also remove all of the references of the files from the registry's
    5858# file_map
    59 #
    60 # Compacting and Uncompacting of port images to save space will be implemented
    61 # at some point.
    6259#
    6360# For the creating and removing of links during activation and deactivation,
     
    115112            return -code error "Image error: ${name} @${version}_${revision}${variants} is already active."
    116113        }
    117 
    118         # compaction is not yet supported
    119         #if { [$requested compact] != 0 } {
    120         #    return -code error "Image error: ${name} @${version}_${revision}${variants} is compacted."
    121         #}
    122114    }
    123115
     
    167159    }
    168160
    169     # compaction not yet supported
    170     #if { [registry::property_retrieve $ref compact] != 0 } {
    171     #    return -code error "Image error: ${name} @${specifier} is compacted."
    172     #}
    173 
    174161    registry::check_dependents $port $force
    175162
     
    179166    _deactivate_contents $requested $force
    180167    $requested state imaged
    181 }
    182 
    183 proc compact {name v} {
    184     global UI_PREFIX
    185 
    186     throw registry::image-error "Image error: compact/uncompact not yet implemented."
    187 }
    188 
    189 proc uncompact {name v} {
    190     global UI_PREFIX
    191 
    192     throw registry::image-error "Image error: compact/uncompact not yet implemented."
    193168}
    194169
Note: See TracChangeset for help on using the changeset viewer.