[24616] branches/dp2mp-move/base

source_changes at macosforge.org source_changes at macosforge.org
Sat Apr 28 19:00:00 PDT 2007


Revision: 24616
          http://trac.macosforge.org/projects/macports/changeset/24616
Author:   jmpp at macports.org
Date:     2007-04-28 18:59:59 -0700 (Sat, 28 Apr 2007)

Log Message:
-----------

Merging r24543, r24544, r24545 r24548, and r24549: Revise error output in image mode to show the port + version in the same syntax as would be required to
deactivate or uninstall the port we complain about.

Modified Paths:
--------------
    branches/dp2mp-move/base/ChangeLog
    branches/dp2mp-move/base/src/registry1.0/portimage.tcl
    branches/dp2mp-move/base/src/registry1.0/receipt_flat.tcl
    branches/dp2mp-move/base/src/registry1.0/registry.tcl

Modified: branches/dp2mp-move/base/ChangeLog
===================================================================
--- branches/dp2mp-move/base/ChangeLog	2007-04-29 01:59:00 UTC (rev 24615)
+++ branches/dp2mp-move/base/ChangeLog	2007-04-29 01:59:59 UTC (rev 24616)
@@ -48,6 +48,9 @@
        - Expose autoconf XAR variable as portutil::autoconf::xar_path. (r24194).
        - Start to build portpkg.xar and meta data, hijacking Kevin's
          portsubmit.tcl. (r24195-24196).
+         
+    - Revise error messages in port image activation to use syntax that
+      matches port(1). (jberry r24543, r24548).
 
 Release 1.4.3 (17-Apr-2007):
 

Modified: branches/dp2mp-move/base/src/registry1.0/portimage.tcl
===================================================================
--- branches/dp2mp-move/base/src/registry1.0/portimage.tcl	2007-04-29 01:59:00 UTC (rev 24615)
+++ branches/dp2mp-move/base/src/registry1.0/portimage.tcl	2007-04-29 01:59:59 UTC (rev 24616)
@@ -95,7 +95,7 @@
 			set	ivariants [lindex $i 3]
 			set iactive [lindex $i 4]
 			if { ![string equal ${iversion}_${irevision}${ivariants} ${version}_${revision}${variants}] && $iactive == 1 } {
-				return -code error "Image error: Another version of $iname (${iversion}_${irevision}${ivariants}) is already active."
+				return -code error "Image error: Another version of this port ($iname @${iversion}_${irevision}${ivariants}) is already active."
 			}
 		}
 	}
@@ -103,13 +103,13 @@
 	set ref [registry::open_entry $name $version $revision $variants]
 	
 	if { ![string equal [registry::property_retrieve $ref installtype] "image"] } {
-		return -code error "Image error: ${name} ${version}_${revision}${variants} not installed as an image."
+		return -code error "Image error: ${name} @${version}_${revision}${variants} not installed as an image."
 	}
 	if { [registry::property_retrieve $ref active] != 0 } {
-		return -code error "Image error: ${name} ${version}_${revision}${variants} is already active."
+		return -code error "Image error: ${name} @${version}_${revision}${variants} is already active."
 	} 
 	if { [registry::property_retrieve $ref compact] != 0 } {
-		return -code error "Image error: ${name} ${version}_${revision}${variants} is compactd."
+		return -code error "Image error: ${name} @${version}_${revision}${variants} is compactd."
 	} 
 
 	set imagedir [registry::property_retrieve $ref imagedir]
@@ -162,13 +162,13 @@
 	set ref [registry::open_entry $name $version $revision $variants]
 
 	if { ![string equal [registry::property_retrieve $ref installtype] "image"] } {
-		return -code error "Image error: ${name} ${fqversion} not installed as an image."
+		return -code error "Image error: ${name} @${fqversion} not installed as an image."
 	}
 	if { [registry::property_retrieve $ref active] != 1 } {
-		return -code error "Image error: ${name} ${fqversion} is not active."
+		return -code error "Image error: ${name} @${fqversion} is not active."
 	} 
 	if { [registry::property_retrieve $ref compact] != 0 } {
-		return -code error "Image error: ${name} ${fqversion} is compactd."
+		return -code error "Image error: ${name} @${fqversion} is compactd."
 	} 
 
 	set imagedir [registry::property_retrieve $ref imagedir]

Modified: branches/dp2mp-move/base/src/registry1.0/receipt_flat.tcl
===================================================================
--- branches/dp2mp-move/base/src/registry1.0/receipt_flat.tcl	2007-04-29 01:59:00 UTC (rev 24615)
+++ branches/dp2mp-move/base/src/registry1.0/receipt_flat.tcl	2007-04-29 01:59:59 UTC (rev 24616)
@@ -111,7 +111,7 @@
 		
 		if {![string length $receipt_file]} {
 			if { $version != 0 } {
-				return -code error "Registry error: ${name} ${version}_${revision}${variants} not registered as installed."
+				return -code error "Registry error: ${name} @${version}_${revision}${variants} not registered as installed."
 			} else {
 				return -code error "Registry error: ${name} not registered as installed."
 			}
@@ -138,7 +138,7 @@
 		}
 	
 		if { ![entry_exists $name $version $revision $variants] } {
-			return -code error "Registry error: ${name} ${version}_${revision}${variants} not registered as installed."
+			return -code error "Registry error: ${name} @${version}_${revision}${variants} not registered as installed."
 		}
 	
 		set receipt_path [file join ${darwinports::registry.path} receipts ${name} ${version}_${revision}${variants}]
@@ -154,7 +154,7 @@
 		set receipt_contents [read $receipt_handle]
 		close $receipt_handle
 	} else {
-		return -code error "Registry error: receipt for ${name} ${version}_${revision}${variants} seems to be compressed, but bzip2 couln't be found."
+		return -code error "Registry error: receipt for ${name} @${version}_${revision}${variants} seems to be compressed, but bzip2 couln't be found."
 	}
 
 	set ref [new_entry]
@@ -176,7 +176,7 @@
 	} elseif {[string match "# Version: *" $receipt_contents]} {
 		# This is new format
 		if {![string match "# Version: 1.0*" $receipt_contents]} {
-			return -code error "Registry error: receipt ${name} ${version}_${revision}${variants} is in an unknown format (version too new?)."
+			return -code error "Registry error: receipt ${name} @${version}_${revision}${variants} is in an unknown format (version too new?)."
 		}
 
 		# Remove any line starting with #

Modified: branches/dp2mp-move/base/src/registry1.0/registry.tcl
===================================================================
--- branches/dp2mp-move/base/src/registry1.0/registry.tcl	2007-04-29 01:59:00 UTC (rev 24615)
+++ branches/dp2mp-move/base/src/registry1.0/registry.tcl	2007-04-29 01:59:59 UTC (rev 24616)
@@ -71,7 +71,7 @@
 
 		return $ref
 	} else {
-		return -code error "Registry error: ${name} ${version}_${revision}${variants} already registered as installed.  Please uninstall it first."
+		return -code error "Registry error: ${name} @${version}_${revision}${variants} already registered as installed.  Please uninstall it first."
 	}
 }
 
@@ -217,9 +217,9 @@
 			set ivariants [lindex $i 3]
 			set iactive [lindex $i 4]
 			if { $iactive == 0 } {
-				puts "	$iname ${iversion}_${irevision}${ivariants}"
+				puts "	$iname @${iversion}_${irevision}${ivariants}"
 			} elseif { $iactive == 1 } {
-				puts "	$iname ${iversion}_${irevision}${ivariants} (active)"
+				puts "	$iname @${iversion}_${irevision}${ivariants} (active)"
 			}
 		}
 		return -1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070428/582ad7ac/attachment.html


More information about the macports-changes mailing list