[53681] branches/images-and-archives/base
blb at macports.org
blb at macports.org
Sat Jul 11 12:24:32 PDT 2009
Revision: 53681
http://trac.macports.org/changeset/53681
Author: blb at macports.org
Date: 2009-07-11 12:24:31 -0700 (Sat, 11 Jul 2009)
Log Message:
-----------
Merge from trunk
Modified Paths:
--------------
branches/images-and-archives/base/Makefile.in
branches/images-and-archives/base/src/port/port.tcl
branches/images-and-archives/base/src/registry2.0/portimage.tcl
Added Paths:
-----------
branches/images-and-archives/base/config/dp_version
Property Changed:
----------------
branches/images-and-archives/base/
Property changes on: branches/images-and-archives/base
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:50249-53503
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
+ /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:50249-53680
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
Modified: branches/images-and-archives/base/Makefile.in
===================================================================
--- branches/images-and-archives/base/Makefile.in 2009-07-11 19:01:51 UTC (rev 53680)
+++ branches/images-and-archives/base/Makefile.in 2009-07-11 19:24:31 UTC (rev 53681)
@@ -41,10 +41,9 @@
# Remove duplicate entries from the dependency map (could occur with 1.6 and earlier):
$(TCLSH) src/dep_map_clean.tcl ${TCL_PACKAGE_DIR}
endif
- @echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, run:"; echo ""
+ @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 ""
@echo "sudo port -v selfupdate"; echo ""
@echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at http://trac.macports.org/ for full documentation."; echo ""
- @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 ""
group::
@echo "creating a macports group..." && sudo dseditgroup -o create -n . macports && echo "done! use './configure --with-install-group=macports --with-shared-directory' if you haven't already"
Copied: branches/images-and-archives/base/config/dp_version (from rev 53680, trunk/base/config/dp_version)
===================================================================
--- branches/images-and-archives/base/config/dp_version (rev 0)
+++ branches/images-and-archives/base/config/dp_version 2009-07-11 19:24:31 UTC (rev 53681)
@@ -0,0 +1 @@
+1.710
Modified: branches/images-and-archives/base/src/port/port.tcl
===================================================================
--- branches/images-and-archives/base/src/port/port.tcl 2009-07-11 19:01:51 UTC (rev 53680)
+++ branches/images-and-archives/base/src/port/port.tcl 2009-07-11 19:24:31 UTC (rev 53681)
@@ -260,6 +260,7 @@
# name
# version (version_revision)
# variants array (variant=>+-)
+ # requested_variants array (variant=>+-)
# options array (key=>value)
# fullname (name/version_revision+-variants)
@@ -268,6 +269,7 @@
if {![info exists port(name)]} { set port(name) "" }
if {![info exists port(version)]} { set port(version) "" }
if {![info exists port(variants)]} { set port(variants) "" }
+ if {![info exists port(requested_variants)]} { set port(requested_variants) "" }
if {![info exists port(options)]} { set port(options) [array get global_options] }
# If neither portname nor url is specified, then default to the current port
@@ -300,7 +302,8 @@
foreach portentry $ports {
array set port $portentry
if ([info exists overrides(version)]) { set port(version) $overrides(version) }
- if ([info exists overrides(variants)]) { set port(variants) $overrides(variants) }
+ if ([info exists overrides(variants)]) { set port(variants) $overrides(variants) }
+ if ([info exists overrides(requested_variants)]) { set port(requested_variants) $overrides(requested_variants) }
if ([info exists overrides(options)]) { set port(options) $overrides(options) }
add_to_portlist portlist [array get port]
}
@@ -364,6 +367,8 @@
set portversion $portspec(version)
array unset variations
array set variations $portspec(variants)
+ array unset requested_variations
+ array set requested_variations $portspec(requested_variants)
array unset options
array set options $portspec(options)
}
@@ -877,7 +882,7 @@
set url ""
set name ""
set version ""
- array unset variants
+ array unset requested_variants
array unset options
set token [lookahead]
@@ -971,11 +976,12 @@
advance
set name [url_to_portname $token]
if {$name != ""} {
- parsePortSpec version variants options
+ parsePortSpec version requested_variants options
add_to_portlist reslist [list url $token \
name $name \
version $version \
- variants [array get variants] \
+ requested_variants [array get requested_variants] \
+ variants [array get requested_variants] \
options [array get options]]
} else {
ui_error "Can't open URL '$token' as a port"
@@ -986,11 +992,12 @@
default { # Treat anything else as a portspec (portname, version, variants, options
# or some combination thereof).
- parseFullPortSpec url name version variants options
+ parseFullPortSpec url name version requested_variants options
add_to_portlist reslist [list url $url \
name $name \
version $version \
- variants [array get variants] \
+ requested_variants [array get requested_variants] \
+ variants [array get requested_variants] \
options [array get options]]
set el 1
}
@@ -1010,7 +1017,12 @@
array unset overrides
if {$version != ""} { set overrides(version) $version }
- if {[array size variants]} { set overrides(variants) [array get variants] }
+ if {[array size variants]} {
+ # we always record the requested variants separately,
+ # but requested ones always override existing ones
+ set overrides(requested_variants) [array get variants]
+ set overrides(variants) [array get variants]
+ }
if {[array size options]} { set overrides(options) [array get options] }
add_ports_to_portlist reslist $ports [array get overrides]
@@ -1723,6 +1735,16 @@
array set portinfo [lindex $result 1]
set porturl $portinfo(porturl)
}
+
+ # Add any global_variations to the variations
+ # specified for the port
+ array unset merged_variations
+ array set merged_variations [array get variations]
+ foreach { variation value } [array get global_variations] {
+ if { ![info exists merged_variations($variation)] } {
+ set merged_variations($variation) $value
+ }
+ }
# Open the Portfile associated with this port.
if {[catch {set mport [mportopen $porturl [array get options] \
@@ -1984,7 +2006,7 @@
# First filter out implicit variants from the explicitly set/unset variants.
set global_variations_list [mport_filtervariants [array get global_variations] yes]
- set variations_list [mport_filtervariants [array get variations] yes]
+ set variations_list [mport_filtervariants [array get requested_variations] yes]
macports::upgrade $portname "port:$portname" $global_variations_list $variations_list [array get options] depscache
}
@@ -2804,12 +2826,13 @@
set porturl $portinfo(porturl)
}
- # Add any global_variations to the variations
- # specified for the port
- foreach { variation value } [array get global_variations] {
- if { ![info exists variations($variation)] } {
- set variations($variation) $value
- }
+ # use existing variants iff none were explicitly requested
+ if {[array get requested_variations] == "" && [array get variations] != ""} {
+ array unset requested_variations
+ array set requested_variations [array get variations]
+ set filtered_variations [mport_filtervariants [array get variations] no]
+ } else {
+ set filtered_variations [mport_filtervariants [array get requested_variations] yes]
}
# Filter out implicit variants from the explicitly set/unset variants.
# Except we need to keep them for some targets to work right...
@@ -2817,18 +2840,25 @@
distfiles -
mirror {}
default {
- set variationslist [mport_filtervariants [array get variations] yes]
- array unset variations
- array set variations $variationslist
+ array unset requested_variations
+ array set requested_variations $filtered_variations
}
}
+
+ # Add any global_variations to the variations
+ # specified for the port
+ foreach { variation value } [array get global_variations] {
+ if { ![info exists requested_variations($variation)] } {
+ set requested_variations($variation) $value
+ }
+ }
# If version was specified, save it as a version glob for use
# in port actions (e.g. clean).
if {[string length $portversion]} {
set options(ports_version_glob) $portversion
}
- if {[catch {set workername [mportopen $porturl [array get options] [array get variations]]} result]} {
+ if {[catch {set workername [mportopen $porturl [array get options] [array get requested_variations]]} result]} {
global errorInfo
ui_debug "$errorInfo"
break_softcontinue "Unable to open port: $result" 1 status
Modified: branches/images-and-archives/base/src/registry2.0/portimage.tcl
===================================================================
--- branches/images-and-archives/base/src/registry2.0/portimage.tcl 2009-07-11 19:01:51 UTC (rev 53680)
+++ branches/images-and-archives/base/src/registry2.0/portimage.tcl 2009-07-11 19:24:31 UTC (rev 53681)
@@ -57,9 +57,6 @@
# will also remove all of the references of the files from the registry's
# file_map
#
-# Compacting and Uncompacting of port images to save space will be implemented
-# at some point.
-#
# For the creating and removing of links during activation and deactivation,
# code very similar to what is used in portinstall is used.
#
@@ -114,11 +111,6 @@
if { [string equal [$requested state] "active"] } {
return -code error "Image error: ${name} @${version}_${revision}${variants} is already active."
}
-
- # compaction is not yet supported
- #if { [$requested compact] != 0 } {
- # return -code error "Image error: ${name} @${version}_${revision}${variants} is compacted."
- #}
}
_activate_contents $port $force
@@ -166,11 +158,6 @@
return -code error "Image error: ${name} @${specifier} is not active."
}
- # compaction not yet supported
- #if { [registry::property_retrieve $ref compact] != 0 } {
- # return -code error "Image error: ${name} @${specifier} is compacted."
- #}
-
registry::check_dependents $port $force
set imagedir [$requested imagedir]
@@ -180,18 +167,6 @@
$requested state imaged
}
-proc compact {name v} {
- global UI_PREFIX
-
- throw registry::image-error "Image error: compact/uncompact not yet implemented."
-}
-
-proc uncompact {name v} {
- global UI_PREFIX
-
- throw registry::image-error "Image error: compact/uncompact not yet implemented."
-}
-
proc _check_registry {name specifier} {
global UI_PREFIX
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090711/579b34a8/attachment-0001.html>
More information about the macports-changes
mailing list