[51568] branches/images-and-archives/base

blb at macports.org blb at macports.org
Wed May 27 16:52:02 PDT 2009


Revision: 51568
          http://trac.macports.org/changeset/51568
Author:   blb at macports.org
Date:     2009-05-27 16:52:02 -0700 (Wed, 27 May 2009)
Log Message:
-----------
Merge from trunk

Modified Paths:
--------------
    branches/images-and-archives/base/src/macports1.0/macports.tcl
    branches/images-and-archives/base/src/package1.0/portdmg.tcl
    branches/images-and-archives/base/src/package1.0/portdpkg.tcl
    branches/images-and-archives/base/src/package1.0/portmdmg.tcl
    branches/images-and-archives/base/src/package1.0/portmpkg.tcl
    branches/images-and-archives/base/src/package1.0/portpkg.tcl
    branches/images-and-archives/base/src/package1.0/portportpkg.tcl
    branches/images-and-archives/base/src/package1.0/portrpm.tcl
    branches/images-and-archives/base/src/package1.0/portsrpm.tcl
    branches/images-and-archives/base/src/pextlib1.0/Pextlib.c
    branches/images-and-archives/base/src/pextlib1.0/uid.c
    branches/images-and-archives/base/src/pextlib1.0/uid.h
    branches/images-and-archives/base/src/port/port.tcl
    branches/images-and-archives/base/src/port1.0/portactivate.tcl
    branches/images-and-archives/base/src/port1.0/portbuild.tcl
    branches/images-and-archives/base/src/port1.0/portchecksum.tcl
    branches/images-and-archives/base/src/port1.0/portclean.tcl
    branches/images-and-archives/base/src/port1.0/portconfigure.tcl
    branches/images-and-archives/base/src/port1.0/portdestroot.tcl
    branches/images-and-archives/base/src/port1.0/portdistcheck.tcl
    branches/images-and-archives/base/src/port1.0/portdistfiles.tcl
    branches/images-and-archives/base/src/port1.0/portextract.tcl
    branches/images-and-archives/base/src/port1.0/portfetch.tcl
    branches/images-and-archives/base/src/port1.0/portinstall.tcl
    branches/images-and-archives/base/src/port1.0/portlint.tcl
    branches/images-and-archives/base/src/port1.0/portlivecheck.tcl
    branches/images-and-archives/base/src/port1.0/portmain.tcl
    branches/images-and-archives/base/src/port1.0/portmirror.tcl
    branches/images-and-archives/base/src/port1.0/portpatch.tcl
    branches/images-and-archives/base/src/port1.0/portstartupitem.tcl
    branches/images-and-archives/base/src/port1.0/portsubmit.tcl
    branches/images-and-archives/base/src/port1.0/porttest.tcl
    branches/images-and-archives/base/src/port1.0/portutil.tcl

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/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:50249-51502
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:50249-51567
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/images-and-archives/base/src/macports1.0/macports.tcl
===================================================================
--- branches/images-and-archives/base/src/macports1.0/macports.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/macports1.0/macports.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -1067,7 +1067,7 @@
         error "Error evaluating variants"
     }
 
-    ditem_key $mport provides [$workername eval return \$portname]
+    ditem_key $mport provides [$workername eval return \$name]
 
     return $mport
 }
@@ -1238,7 +1238,7 @@
 # Determine if a port is active
 proc _mportactive {mport} {
     set workername [ditem_key $mport workername]
-    if {[catch {set reslist [$workername eval registry_active \${portname}]}]} {
+    if {[catch {set reslist [$workername eval registry_active \${name}]}]} {
         return 0
     } else {
         return [expr [llength $reslist] > 0]
@@ -1284,6 +1284,30 @@
     }
 }
 
+### _mportconflictsinstalled is private; may change without notice
+
+# Determine if the port, per the conflicts option, has any conflicts with
+# what is installed.
+#
+# mport   the port to check for conflicts
+# Returns a list of which installed ports conflict, or an empty list if none
+proc _mportconflictsinstalled {mport conflictinfo} {
+    set conflictlist {}
+    if {[llength $conflictinfo] > 0} {
+        ui_debug "Checking for conflicts against [_mportkey $mport name]"
+        foreach conflictport ${conflictinfo} {
+            if {[_mportispresent $mport port:${conflictport}]} {
+                lappend conflictlist $conflictport
+            }
+        }
+    } else {
+        ui_debug "[_mportkey $mport name] has no conflicts"
+    }
+
+    return $conflictlist
+}
+
+
 ### _mportexec is private; may change without notice
 
 proc _mportexec {target mport} {
@@ -1899,6 +1923,17 @@
         ui_info -nonewline "."
         flush stdout
     }
+    
+    if {[info exists portinfo(conflicts)] && ($target == "" || $target == "install")} {
+        set conflictports [_mportconflictsinstalled $mport $portinfo(conflicts)]
+        if {[llength ${conflictports}] != 0} {
+            if {[macports::global_option_isset ports_force]} {
+                ui_warn "Force option set; installing $portinfo(name) despite conflicts with: ${conflictports}"
+            } else {
+                return -code error "Can't install $portinfo(name) because conflicting ports are installed: ${conflictports}"
+            }
+        }
+    }
 
     # Determine deptypes to look for based on target
     switch $target {

Modified: branches/images-and-archives/base/src/package1.0/portdmg.tcl
===================================================================
--- branches/images-and-archives/base/src/package1.0/portdmg.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/package1.0/portdmg.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -44,11 +44,11 @@
 set_ui_prefix
 
 proc portdmg::dmg_main {args} {
-    global portname portversion portrevision package.destpath UI_PREFIX
+    global name version revision package.destpath UI_PREFIX
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating disk image for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating disk image for %s-%s"] ${name} ${version}]"
     
-    return [package_dmg $portname $portversion $portrevision]
+    return [package_dmg $name $version $revision]
 }
 
 proc portdmg::package_dmg {portname portversion portrevision} {

Modified: branches/images-and-archives/base/src/package1.0/portdpkg.tcl
===================================================================
--- branches/images-and-archives/base/src/package1.0/portdpkg.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/package1.0/portdpkg.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -50,16 +50,16 @@
 proc portdpkg::main {args} {
 	global UI_PREFIX destpath os.arch os.platform
     
-	ui_msg "$UI_PREFIX [format [msgcat::mc "Creating dpkg for %s-%s"] [option portname] [option portversion]]"
+	ui_msg "$UI_PREFIX [format [msgcat::mc "Creating dpkg for %s-%s"] [option name] [option version]]"
 
 	# get deplist
-	set deps [make_dependency_list [option portname]]
+	set deps [make_dependency_list [option name]]
 	set deps [lsort -unique $deps]
 	foreach dep $deps {
 		set name [lindex [split $dep /] 0]
 		set vers [lindex [split $dep /] 1]
 		# don't re-package ourself
-		if {$name != [option portname]} {
+		if {$name != [option name]} {
 			lappend dependencies "${name} (>= ${vers})"
 		}
 	}
@@ -93,9 +93,9 @@
 	
 	# Create dpkg version number
 	if {[expr [option epoch] != 0]} {
-		set pkg_version "[option epoch]:[option portversion]"
+		set pkg_version "[option epoch]:[option version]"
 	} else {
-		set pkg_version "[option portversion]"
+		set pkg_version "[option version]"
 	}
 	if {[expr [option revision] != 0]} {
 		append pkg_version "-[option revision]"
@@ -110,7 +110,7 @@
 	} elseif {[exists description]} {
 		set pkg_long_description " [option description]\n"
 	} else {
-		set pkg_long_description " [option portname]\n"
+		set pkg_long_description " [option name]\n"
 	}
 
 	if {[exists homepage]} {
@@ -137,7 +137,7 @@
 		set pkg_arch "${os.platform}-${pkg_arch}"
 	}
 
-	puts $controlfd "Package: [option portname]"
+	puts $controlfd "Package: [option name]"
 	puts $controlfd "Architecture: ${pkg_arch}"
 	puts $controlfd "Version: ${pkg_version}"
 	puts $controlfd "Section: ${pkg_category}"

Modified: branches/images-and-archives/base/src/package1.0/portmdmg.tcl
===================================================================
--- branches/images-and-archives/base/src/package1.0/portmdmg.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/package1.0/portmdmg.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -44,11 +44,11 @@
 set_ui_prefix
 
 proc portmdmg::mdmg_main {args} {
-    global portname portversion portrevision package.destpath UI_PREFIX
+    global name version revision package.destpath UI_PREFIX
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating disk image for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating disk image for %s-%s"] ${name} ${version}]"
     
-    return [package_mdmg $portname $portversion $portrevision]
+    return [package_mdmg $name $version $revision]
 }
 
 proc portmdmg::package_mdmg {portname portversion portrevision} {

Modified: branches/images-and-archives/base/src/package1.0/portmpkg.tcl
===================================================================
--- branches/images-and-archives/base/src/package1.0/portmpkg.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/package1.0/portmpkg.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -47,12 +47,12 @@
 set_ui_prefix
 
 proc portmpkg::mpkg_main {args} {
-    global portname portversion portrevision package.destpath package.flat UI_PREFIX
+    global name version revision package.destpath package.flat UI_PREFIX
 
     # Make sure the destination path exists.
     system "mkdir -p ${package.destpath}"
 
-    return [package_mpkg $portname $portversion $portrevision]
+    return [package_mpkg $name $version $revision]
 }
 
 proc portmpkg::make_dependency_list {portname} {

Modified: branches/images-and-archives/base/src/package1.0/portpkg.tcl
===================================================================
--- branches/images-and-archives/base/src/package1.0/portpkg.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/package1.0/portpkg.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -51,11 +51,11 @@
 set_ui_prefix
 
 proc portpkg::pkg_main {args} {
-    global portname portversion portrevision package.type package.destpath package.flat UI_PREFIX
+    global name version revision package.type package.destpath package.flat UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating pkg for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating pkg for %s-%s"] ${name} ${version}]"
 
-    return [package_pkg $portname $portversion $portrevision]
+    return [package_pkg $name $version $revision]
 }
 
 proc portpkg::package_pkg {portname portversion portrevision} {

Modified: branches/images-and-archives/base/src/package1.0/portportpkg.tcl
===================================================================
--- branches/images-and-archives/base/src/package1.0/portportpkg.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/package1.0/portportpkg.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -90,18 +90,18 @@
 
 
 proc portportpkg::create_portpkg {} {
-    global portname portversion prefix UI_PREFIX workpath portpath
+    global name prefix UI_PREFIX workpath portpath
 
 	set xar [xar_path]
 	
     set dirname "portpkg"
     set dirpath "${workpath}/${dirname}"
-    set pkgpath "${workpath}/${portname}.portpkg"
+    set pkgpath "${workpath}/${name}.portpkg"
     set metaname "portpkg_meta.xml"
     set metapath "${workpath}/${metaname}"
     
     # Expose and default some global variables
-    set vars " portname portversion maintainers categories description \
+    set vars " maintainers categories description \
     	long_description master_sites homepage epoch version revision \
     	PortInfo \
     	submitter_name submitter_email submitter_key \
@@ -141,7 +141,7 @@
 		puts $sd "</submitter>"
 		
 		puts $sd "<package>"
-			putel $sd name $portname
+			putel $sd name $name
 			putel $sd homepage $homepage
 			putlist $sd categories category $categories
 			putlist $sd maintainers maintainer $maintainers
@@ -187,7 +187,7 @@
     # Create portpkg.xar, including the metadata and the portpkg directory contents
     set cmd "cd ${workpath}; ${xar} -cf ${pkgpath} --exclude \\.DSStore --exclude \\.svn ${dirname} -s ${metapath} -n ${metaname}"
     if {[system $cmd] != ""} {
-		return -code error [format [msgcat::mc "Failed to create portpkg for port : %s"] $portname]
+		return -code error [format [msgcat::mc "Failed to create portpkg for port : %s"] $name]
     }
     
     return ${pkgpath}
@@ -195,9 +195,9 @@
 
 
 proc portportpkg::portpkg_main {args} {
-    global portname portversion portverbose prefix UI_PREFIX workpath portpath
+    global name version portverbose prefix UI_PREFIX workpath portpath
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating portpkg for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating portpkg for %s-%s"] ${name} ${version}]"
 
     # Make sure we have a work directory
     file mkdir ${workpath}

Modified: branches/images-and-archives/base/src/package1.0/portrpm.tcl
===================================================================
--- branches/images-and-archives/base/src/package1.0/portrpm.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/package1.0/portrpm.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -46,11 +46,11 @@
 set_ui_prefix
 
 proc portrpm::rpm_main {args} {
-    global portname portversion portrevision UI_PREFIX
+    global name version revision UI_PREFIX
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating RPM package for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating RPM package for %s-%s"] ${name} ${version}]"
     
-    return [rpm_pkg $portname $portversion $portrevision]
+    return [rpm_pkg $name $version $revision]
 }
 
 proc portrpm::rpm_pkg {portname portversion portrevision} {

Modified: branches/images-and-archives/base/src/package1.0/portsrpm.tcl
===================================================================
--- branches/images-and-archives/base/src/package1.0/portsrpm.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/package1.0/portsrpm.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -47,11 +47,11 @@
 set_ui_prefix
 
 proc portsrpm::srpm_main {args} {
-    global portname portversion portrevision UI_PREFIX
+    global name version revision UI_PREFIX
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating SRPM package for %s-%s"] ${portname} ${portversion}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating SRPM package for %s-%s"] ${name} ${version}]"
     
-    return [srpm_pkg $portname $portversion $portrevision]
+    return [srpm_pkg $name $version $revision]
 }
 
 proc portsrpm::srpm_pkg {portname portversion portrevision} {

Modified: branches/images-and-archives/base/src/pextlib1.0/Pextlib.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/Pextlib.c	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/pextlib1.0/Pextlib.c	2009-05-27 23:52:02 UTC (rev 51568)
@@ -1165,6 +1165,7 @@
 	Tcl_CreateObjCommand(interp, "setegid", setegidCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "name_to_uid", name_to_uidCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "uid_to_name", uid_to_nameCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "uname_to_gid", uname_to_gidCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "name_to_gid", name_to_gidCmd, NULL, NULL);
 	Tcl_CreateObjCommand(interp, "gid_to_name", gid_to_nameCmd, NULL, NULL);
 	

Modified: branches/images-and-archives/base/src/pextlib1.0/uid.c
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/uid.c	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/pextlib1.0/uid.c	2009-05-27 23:52:02 UTC (rev 51568)
@@ -274,7 +274,43 @@
 }
 
 /*
+	uname_to_gid
+	
+	synopsis: uname_to_gid name
+	this function takes a *user* name
+*/
+int uname_to_gidCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
+{
+	struct passwd *pwent;
+	char* name = NULL;
+	
+	/* Check the arg count */
+	if (objc != 2) {
+		Tcl_WrongNumArgs(interp, 1, objv, "name");
+		return TCL_ERROR;
+	}
+	
+	/* Get the  name */
+	name = Tcl_GetString(objv[1]);
+	if (name == NULL || !*name)
+		return TCL_ERROR;
+	
+	/* Map the name --> user gid */
+	pwent = getpwnam(name);
+
+	if (pwent == NULL)
+		Tcl_SetObjResult(interp, Tcl_NewIntObj(-1));
+	else
+		Tcl_SetObjResult(interp, Tcl_NewIntObj(pwent->pw_gid)); 
+
+	return TCL_OK;
+}
+
+/*
     name_to_gid
+
+	synopsis: name_to_gid name
+    this function takes a *group* name
 */
 int name_to_gidCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {

Modified: branches/images-and-archives/base/src/pextlib1.0/uid.h
===================================================================
--- branches/images-and-archives/base/src/pextlib1.0/uid.h	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/pextlib1.0/uid.h	2009-05-27 23:52:02 UTC (rev 51568)
@@ -45,6 +45,7 @@
 int setegidCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
 int name_to_uidCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
 int uid_to_nameCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
+int uname_to_gidCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
 int name_to_gidCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
 int gid_to_nameCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
 

Modified: branches/images-and-archives/base/src/port/port.tcl
===================================================================
--- branches/images-and-archives/base/src/port/port.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port/port.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -1450,6 +1450,7 @@
             maintainers     1
             platforms       1
             variants        1
+            conflicts       1
         "
 
         # Label map for pretty printing
@@ -1466,6 +1467,7 @@
             platforms   Platforms
             maintainers Maintainers
             license     License
+            conflicts   "Conflicts with"
         }
 
         # Wrap-length map for pretty printing
@@ -1480,6 +1482,7 @@
             homepage 22
             platforms 22
             license 22
+            conflicts 22
             maintainers 22
         }
 
@@ -1534,6 +1537,7 @@
                 ports_info_long_description ports_info_homepage 
                 ports_info_skip_line ports_info_depends_build
                 ports_info_depends_lib ports_info_depends_run
+                ports_info_conflicts
                 ports_info_platforms ports_info_license
                 ports_info_maintainers
             }

Modified: branches/images-and-archives/base/src/port1.0/portactivate.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portactivate.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portactivate.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -48,8 +48,8 @@
 set_ui_prefix
 
 proc portactivate::activate_main {args} {
-	global env portname portversion portrevision portvariants user_options portnotes
-	registry_activate $portname ${portversion}_${portrevision}${portvariants} [array get user_options]
+    global env name version revision portvariants user_options portnotes
+    registry_activate $name ${version}_${revision}${portvariants} [array get user_options]
 
     # Display notes at the end of the activation phase.
     if {[info exists portnotes] && $portnotes ne {}} {

Modified: branches/images-and-archives/base/src/port1.0/portbuild.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portbuild.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portbuild.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -142,7 +142,7 @@
 proc portbuild::build_start {args} {
     global UI_PREFIX build.asroot
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s"] [option name]]"
 
     # start gsoc08-privileges
     if { [tbool build.asroot] } {

Modified: branches/images-and-archives/base/src/port1.0/portchecksum.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portchecksum.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portchecksum.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -179,7 +179,7 @@
 proc portchecksum::checksum_start {args} {
     global UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Verifying checksum(s) for %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Verifying checksum(s) for %s"] [option name]]"
 }
 
 # checksum_main

Modified: branches/images-and-archives/base/src/port1.0/portclean.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portclean.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portclean.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -52,7 +52,7 @@
 proc portclean::clean_start {args} {
     global UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Cleaning %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Cleaning %s"] [option name]]"
 }
 
 proc portclean::clean_main {args} {
@@ -62,19 +62,19 @@
 
     if {[info exists ports_clean_all] && $ports_clean_all == "yes" || \
         [info exists ports_clean_dist] && $ports_clean_dist == "yes"} {
-        ui_info "$UI_PREFIX [format [msgcat::mc "Removing distfiles for %s"] [option portname]]"
+        ui_info "$UI_PREFIX [format [msgcat::mc "Removing distfiles for %s"] [option name]]"
         clean_dist
     }
     if {[info exists ports_clean_all] && $ports_clean_all == "yes" || \
         [info exists ports_clean_work] && $ports_clean_work == "yes" || \
         (!([info exists ports_clean_dist] && $ports_clean_dist == "yes"))} {
-         ui_info "$UI_PREFIX [format [msgcat::mc "Removing build directory for %s"] [option portname]]"
+         ui_info "$UI_PREFIX [format [msgcat::mc "Removing build directory for %s"] [option name]]"
          clean_work
     }
 
     # start gsoc-08 privileges
     if {[info exists usealtworkpath] && $usealtworkpath == "yes"} {
-        ui_info "$UI_PREFIX [format [msgcat::mc "Removing alt source directory for %s"] [option portname]]"
+        ui_info "$UI_PREFIX [format [msgcat::mc "Removing alt source directory for %s"] [option name]]"
         clean_altsource
     }
     # end gsoc-08 privileges
@@ -105,7 +105,7 @@
 # This is crude, but works.
 #
 proc portclean::clean_dist {args} {
-    global ports_force portname distpath dist_subdir distfiles
+    global ports_force name distpath dist_subdir distfiles
 
     # remove known distfiles for sure (if they exist)
     set count 0
@@ -133,7 +133,7 @@
     # next remove dist_subdir if only needed for this port,
     # or if user forces us to
     set dirlist [list]
-    if {($dist_subdir != $portname)} {
+    if {($dist_subdir != $name)} {
         if {[info exists dist_subdir]} {
             set distfullpath [file join $distpath $dist_subdir]
             if {!([info exists ports_force] && $ports_force == "yes")
@@ -142,13 +142,13 @@
                 ui_warn [format [msgcat::mc "Distfiles directory '%s' may contain distfiles needed for other ports, use the -f flag to force removal" ] [file join $distpath $dist_subdir]]
             } else {
                 lappend dirlist $dist_subdir
-                lappend dirlist $portname
+                lappend dirlist $name
             }
         } else {
-            lappend dirlist $portname
+            lappend dirlist $name
         }
     } else {
-        lappend dirlist $portname
+        lappend dirlist $name
     }
     # loop through directories
     set count 0

Modified: branches/images-and-archives/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portconfigure.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portconfigure.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -172,7 +172,7 @@
     global UI_PREFIX
     global configure.compiler
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Configuring %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Configuring %s"] [option name]]"
 
     set name ""
     switch -exact ${configure.compiler} {

Modified: branches/images-and-archives/base/src/port1.0/portdestroot.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portdestroot.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portdestroot.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -68,7 +68,7 @@
 default destroot.keepdirs ""
 default destroot.violate_mtree no
 
-default startupitem.name        {${portname}}
+default startupitem.name        {${name}}
 default startupitem.uniquename  {org.macports.${startupitem.name}}
 default startupitem.plist       {${startupitem.uniquename}.plist}
 default startupitem.location    LaunchDaemons
@@ -87,12 +87,12 @@
 set_ui_prefix
 
 proc portdestroot::destroot_start {args} {
-    global UI_PREFIX prefix portname porturl destroot os.platform destroot.clean portsharepath
+    global UI_PREFIX prefix name porturl destroot os.platform destroot.clean portsharepath
     global destroot.umask destroot.asroot macportsuser euid egid usealtworkpath altprefix
     global applications_dir frameworks_dir
     variable oldmask
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Staging %s into destroot"] ${portname}]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Staging %s into destroot"] ${name}]"
 
     # start gsoc08-privileges
     if { [getuid] == 0 && [geteuid] == [name_to_uid "$macportsuser"] } {
@@ -144,7 +144,7 @@
 }
 
 proc portdestroot::destroot_finish {args} {
-    global UI_PREFIX destroot prefix portname startupitem.create destroot.violate_mtree
+    global UI_PREFIX destroot prefix name startupitem.create destroot.violate_mtree
     global os.platform os.version
     variable oldmask
 
@@ -168,8 +168,8 @@
         if {![file isdirectory ${path}]} {
             xinstall -m 0755 -d ${path}
         }
-        if {![file exists ${path}/.turd_${portname}]} {
-            xinstall -c -m 0644 /dev/null ${path}/.turd_${portname}
+        if {![file exists ${path}/.turd_${name}]} {
+            xinstall -c -m 0644 /dev/null ${path}/.turd_${name}
         }
         lappend exclude_dirs "-path \"${path}\""
     }
@@ -186,7 +186,7 @@
         set gunzip "$gzip -d"
         set bunzip2 "[findBinary bzip2 ${portutil::autoconf::bzip2_path}] -d"
         if {[file isdirectory ${manpath}] && [file type ${manpath}] == "directory"} {
-            ui_info "$UI_PREFIX [format [msgcat::mc "Compressing man pages for %s"] ${portname}]"
+            ui_info "$UI_PREFIX [format [msgcat::mc "Compressing man pages for %s"] ${name}]"
             set found 0
             set manlinks [list]
             foreach mandir [readdir "${manpath}"] {
@@ -323,12 +323,12 @@
 
         # abort here only so all violations can be observed
         if { ${mtree_violation} != "no" } {
-            ui_warn "[format [msgcat::mc "%s violates the layout of the ports-filesystems!"] [option portname]]"
+            ui_warn "[format [msgcat::mc "%s violates the layout of the ports-filesystems!"] [option name]]"
             ui_warn "Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!"
             # error "mtree violation!"
         }
     } else {
-        ui_warn "[format [msgcat::mc "%s requests to install files outside the common directory structure!"] [option portname]]"
+        ui_warn "[format [msgcat::mc "%s requests to install files outside the common directory structure!"] [option name]]"
     }
 
     # Restore umask

Modified: branches/images-and-archives/base/src/port1.0/portdistcheck.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portdistcheck.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portdistcheck.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -54,7 +54,7 @@
 proc portdistcheck::distcheck_main {args} {
     global distcheck.check
     global fetch.type
-    global portname portpath
+    global name portpath
 
     set port_moddate [file mtime ${portpath}/Portfile]
 
@@ -82,16 +82,16 @@
                     ui_debug [format [msgcat::mc "Checking %s from %s"] $distfile $site]
                     set file_url [portfetch::assemble_url $site $distfile]
                     if {[catch {set urlnewer [curl isnewer $file_url $port_moddate]} error]} {
-                        ui_warn "couldn't fetch $file_url for $portname ($error)"
+                        ui_warn "couldn't fetch $file_url for $name ($error)"
                     } else {
                         if {$urlnewer} {
-                            ui_warn "port $portname: $file_url is newer than portfile"
+                            ui_warn "port $name: $file_url is newer than portfile"
                         }
                         incr count
                     }
                 }
                 if {$count == 0} {
-                    ui_error "no mirror had $distfile for $portname"
+                    ui_error "no mirror had $distfile for $name"
                 }
             } elseif {${distcheck.check} == "filesize"} {
                 set count 0
@@ -99,18 +99,18 @@
                     ui_debug [format [msgcat::mc "Checking %s from %s"] $distfile $site]
                     set file_url [portfetch::assemble_url $site $distfile]
                     if {[catch {set urlsize [curl getsize $file_url]} error]} {
-                        ui_warn "couldn't fetch $file_url for $portname ($error)"
+                        ui_warn "couldn't fetch $file_url for $name ($error)"
                     } else {
                         incr count
                         if {$urlsize > 0} {
-                            ui_info "port $portname: $distfile $urlsize bytes"
+                            ui_info "port $name: $distfile $urlsize bytes"
                             incr totalsize $urlsize
                             break
                         }
                     }
                 }
                 if {$count == 0} {
-                    ui_error "no mirror had $distfile for $portname"
+                    ui_error "no mirror had $distfile for $name"
                 }
             } else {
                 ui_error "unknown distcheck.check ${distcheck.check}"
@@ -132,7 +132,7 @@
                 set size [expr $totalsize / (1024.0*1024.0*1024.0)]
                 set humansize [format "%.1fG" $size]
             }
-            ui_msg "$portname: $humansize"
+            ui_msg "$name: $humansize"
         }
     }
 }

Modified: branches/images-and-archives/base/src/port1.0/portdistfiles.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portdistfiles.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portdistfiles.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -48,8 +48,8 @@
 set_ui_prefix
 
 proc portdistfiles::distfiles_start {args} {
-    global UI_PREFIX portname
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Distfiles for %s"] ${portname}]"
+    global UI_PREFIX name
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Distfiles for %s"] ${name}]"
 }
 
 proc portdistfiles::distfiles_main {args} {

Modified: branches/images-and-archives/base/src/port1.0/portextract.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portextract.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portextract.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -110,7 +110,7 @@
 proc portextract::extract_start {args} {
     global UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Extracting %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Extracting %s"] [option name]]"
 }
 
 proc portextract::extract_main {args} {

Modified: branches/images-and-archives/base/src/port1.0/portfetch.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portfetch.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portfetch.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -55,7 +55,7 @@
 # define options: distname master_sites
 options master_sites patch_sites extract.suffix distfiles patchfiles use_zip use_bzip2 use_lzma use_7z use_dmg dist_subdir \
     fetch.type fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert \
-    master_sites.mirror_subdir patch_sites.mirror_subdir portname \
+    master_sites.mirror_subdir patch_sites.mirror_subdir \
     cvs.module cvs.root cvs.password cvs.date cvs.tag cvs.method \
     svn.url svn.tag svn.revision svn.method \
     git.url git.branch \
@@ -100,7 +100,7 @@
 
 # Set distfiles
 default distfiles {[portfetch::suffix $distname]}
-default dist_subdir {${portname}}
+default dist_subdir {${name}}
 
 # user name & password
 default fetch.user ""
@@ -207,7 +207,7 @@
 # For a given mirror site type, e.g. "gnu" or "x11", check to see if there's a
 # pre-registered set of sites, and if so, return them.
 proc portfetch::mirror_sites {mirrors tag subdir} {
-    global UI_PREFIX portname porturl mirror_sites.listfile mirror_sites.listpath dist_subdir
+    global UI_PREFIX name porturl mirror_sites.listfile mirror_sites.listpath dist_subdir
     global global_mirror_site fallback_mirror_site
 
     set mirrorfile [getportresourcepath $porturl [file join ${mirror_sites.listpath} ${mirror_sites.listfile}]]
@@ -242,7 +242,7 @@
     if {$mirror_tag == "mirror"} {
         set thesubdir ${dist_subdir}
     } elseif {$subdir == "" && $mirror_tag != "nosubdir"} {
-        set thesubdir ${portname}
+        set thesubdir ${name}
     } else {
         set thesubdir ${subdir}
     }
@@ -756,9 +756,9 @@
 }
 
 proc portfetch::fetch_start {args} {
-    global UI_PREFIX portname
+    global UI_PREFIX name
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Fetching %s"] $portname]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Fetching %s"] $name]"
 }
 
 # Main fetch routine

Modified: branches/images-and-archives/base/src/port1.0/portinstall.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portinstall.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portinstall.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -44,8 +44,8 @@
 set_ui_prefix
 
 proc portinstall::install_main {args} {
-    global UI_PREFIX portname portversion portrevision portvariants
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s @%s_%s%s"] $portname $portversion $portrevision $portvariants]"
+    global UI_PREFIX name version revision portvariants
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s @%s_%s%s"] $name $version $revision $portvariants]"
     
     return 0
 }

Modified: branches/images-and-archives/base/src/port1.0/portlint.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portlint.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portlint.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -89,12 +89,12 @@
 
 
 proc portlint::lint_start {args} {
-    global UI_PREFIX portname
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Verifying Portfile for %s"] ${portname}]"
+    global UI_PREFIX name
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Verifying Portfile for %s"] ${name}]"
 }
 
 proc portlint::lint_main {args} {
-    global UI_PREFIX portname portpath porturl ports_lint_nitpick
+    global UI_PREFIX name portpath porturl ports_lint_nitpick
     set portfile ${portpath}/Portfile
     set portdirs [split ${portpath} /]
     set last [llength $portdirs]
@@ -261,7 +261,7 @@
     ###################################################################
 
     global os.platform os.arch os.version
-    global portversion portrevision portepoch
+    global version revision epoch
     # hoping for "noarch" :
     set portarch ${os.arch}
     global description long_description platforms categories all_variants
@@ -294,26 +294,19 @@
     }
 
     foreach req_var $lint_required {
-        if {$req_var == "name"} {
-            set var "portname"
-        } elseif {$req_var == "version"} {
-            set var "portversion"
-        } else {
-            set var $req_var
-        }
 
-        if {$var == "master_sites"} {
+        if {$req_var == "master_sites"} {
             if {${fetch.type} != "standard"} {
-                ui_info "OK: $var not required for fetch.type ${fetch.type}"
+                ui_info "OK: $req_var not required for fetch.type ${fetch.type}"
                 continue
             }
             if {[llength ${distfiles}] == 0} {
-                ui_info "OK: $var not required when there are no distfiles"
+                ui_info "OK: $req_var not required when there are no distfiles"
                 continue
             }
         }
 
-        if {![info exists $var]} {
+        if {![info exists $req_var]} {
             ui_error "Missing required variable: $req_var"
             incr errors
         } else {
@@ -322,14 +315,7 @@
     }
 
     foreach opt_var $lint_optional {
-        if {$opt_var == "epoch"} {
-            set var "portepoch"
-        } elseif {$opt_var == "revision"} {
-            set var "portrevision"
-        } else {
-            set var $opt_var
-        }
-        if {[info exists $var]} {
+        if {[info exists $opt_var]} {
             # TODO: check whether it was seen (or default)
             ui_info "OK: Found optional variable: $opt_var"
         }
@@ -356,12 +342,12 @@
         }
     }
 
-    if {![string is integer -strict $portepoch]} {
-        ui_error "Port epoch is not numeric:  $portepoch"
+    if {![string is integer -strict $epoch]} {
+        ui_error "Port epoch is not numeric:  $epoch"
         incr errors
     }
-    if {![string is integer -strict $portrevision]} {
-        ui_error "Port revision is not numeric: $portrevision"
+    if {![string is integer -strict $revision]} {
+        ui_error "Port revision is not numeric: $revision"
         incr errors
     }
 
@@ -472,8 +458,8 @@
     } else {
         ui_info "OK: Portfile parent directory matches primary category"
     }
-    if {$portdir != $portname} {
-        ui_error "Portfile directory $portdir does not match port name $portname"
+    if {$portdir != $name} {
+        ui_error "Portfile directory $portdir does not match port name $name"
         incr errors
     } else {
         ui_info "OK: Portfile directory matches port name"
@@ -490,10 +476,10 @@
 
     ### TODO: more checks to Tcl variables/sections
 
-    ui_debug "Name: $portname"
-    ui_debug "Epoch: $portepoch"
-    ui_debug "Version: $portversion"
-    ui_debug "Revision: $portrevision"
+    ui_debug "Name: $name"
+    ui_debug "Epoch: $epoch"
+    ui_debug "Version: $version"
+    ui_debug "Revision: $revision"
     ui_debug "Arch: $portarch"
     ###################################################################
 

Modified: branches/images-and-archives/base/src/port1.0/portlivecheck.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portlivecheck.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portlivecheck.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -60,7 +60,7 @@
 proc portlivecheck::livecheck_main {args} {
     global livecheck.url livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version
     global fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert
-    global homepage portname portpath workpath
+    global homepage portpath workpath
     global master_sites name distfiles
 
     set updated 0
@@ -140,7 +140,7 @@
             # single and multiline regex
             ui_debug "Fetching ${livecheck.url}"
             if {[catch {eval curl fetch $fetch_options {${livecheck.url}} $tempfile} error]} {
-                ui_error "cannot check if $portname was updated ($error)"
+                ui_error "cannot check if $name was updated ($error)"
                 set updated -1
             } else {
                 # let's extract the version from the file.
@@ -182,14 +182,14 @@
                 }
                 close $chan
                 if {$updated < 0} {
-                    ui_error "cannot check if $portname was updated (regex didn't match)"
+                    ui_error "cannot check if $name was updated (regex didn't match)"
                 }
             }
         }
         "md5" {
             ui_debug "Fetching ${livecheck.url}"
             if {[catch {eval curl fetch $fetch_options {${livecheck.url}} $tempfile} error]} {
-                ui_error "cannot check if $portname was updated ($error)"
+                ui_error "cannot check if $name was updated ($error)"
                 set updated -1
             } else {
                 # let's compute the md5 sum.
@@ -203,7 +203,7 @@
         "moddate" {
             set port_moddate [file mtime ${portpath}/Portfile]
             if {[catch {set updated [curl isnewer ${livecheck.url} $port_moddate]} error]} {
-                ui_error "cannot check if $portname was updated ($error)"
+                ui_error "cannot check if $name was updated ($error)"
                 set updated -1
             } else {
                 if {!$updated} {
@@ -222,9 +222,9 @@
 
     if {${livecheck.check} != "none"} {
         if {$updated > 0} {
-            ui_msg "$portname seems to have been updated (port version: ${livecheck.version}, new version: $updated_version)"
+            ui_msg "$name seems to have been updated (port version: ${livecheck.version}, new version: $updated_version)"
         } elseif {$updated == 0} {
-            ui_info "$portname seems to be up to date"
+            ui_info "$name seems to be up to date"
         }
     }
 }

Modified: branches/images-and-archives/base/src/port1.0/portmain.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portmain.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portmain.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -45,12 +45,12 @@
 
 # define options
 options prefix macportsuser name version revision epoch categories maintainers
-options long_description description homepage license
+options long_description description homepage license provides conflicts
 options worksrcdir filesdir distname portdbpath libpath distpath sources_conf os.platform os.version os.major os.arch os.endian platforms default_variants install.user install.group macosx_deployment_target
 options universal_variant os.universal_supported
 
 # Export options via PortInfo
-options_export name version revision epoch categories maintainers platforms description long_description homepage license
+options_export name version revision epoch categories maintainers platforms description long_description homepage license provides conflicts
 
 # Assign option procedure to default_variants
 option_proc default_variants handle_default_variants
@@ -69,7 +69,7 @@
 default revision 0
 default epoch 0
 default license unknown
-default distname {${portname}-${portversion}}
+default distname {${name}-${version}}
 default worksrcdir {$distname}
 default filespath {[file join $portpath $filesdir]}
 default worksrcpath {[file join $workpath $worksrcdir]}
@@ -79,12 +79,6 @@
 default install.user {${portutil::autoconf::install_user}}
 default install.group {${portutil::autoconf::install_group}}
 
-# Compatibility namespace
-default portname {$name}
-default portversion {$version}
-default portrevision {$revision}
-default portepoch {$epoch}
-
 default os.platform {$os_platform}
 default os.version {$os_version}
 default os.major {$os_major}

Modified: branches/images-and-archives/base/src/port1.0/portmirror.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portmirror.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portmirror.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -52,7 +52,7 @@
 # It also records the path in a database.
 
 proc portmirror::mirror_main {args} {
-    global fetch.type portname mirror_filemap ports_mirror_new portdbpath
+    global fetch.type name mirror_filemap ports_mirror_new portdbpath
 
     set mirror_filemap_path [file join $portdbpath distfiles_mirror.db]
     if {![info exists mirror_filemap]

Modified: branches/images-and-archives/base/src/port1.0/portpatch.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portpatch.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portpatch.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -60,7 +60,7 @@
     return 0
     }
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Applying patches to %s"] [option portname]]"
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Applying patches to %s"] [option name]]"
 
     # start gsoc08-privileges
     if { [tbool patch.asroot] } {

Modified: branches/images-and-archives/base/src/port1.0/portstartupitem.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portstartupitem.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portstartupitem.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -74,7 +74,7 @@
 set_ui_prefix
 
 proc portstartupitem::startupitem_create_rcng {args} {
-    global prefix destroot portname os.platform
+    global prefix destroot name os.platform
     global startupitem.name startupitem.requires
     global startupitem.start startupitem.stop startupitem.restart
     global startupitem.type
@@ -120,7 +120,7 @@
 }
 
 proc portstartupitem::startupitem_create_darwin_systemstarter {args} {
-    global UI_PREFIX prefix destroot destroot.keepdirs  portname os.platform
+    global UI_PREFIX prefix destroot destroot.keepdirs name os.platform
     global startupitem.name startupitem.requires startupitem.init
     global startupitem.start startupitem.stop startupitem.restart startupitem.executable
     global startupitem.pidfile startupitem.logfile startupitem.logevents
@@ -177,10 +177,10 @@
         # An executable is specified, and there is no init, start, stop, or restart
     } else {
         if { ![llength ${startupitem.start} ] } {
-            set startupitem.start [list "sh ${scriptdir}/${portname}.sh start"]
+            set startupitem.start [list "sh ${scriptdir}/${name}.sh start"]
         }
         if { ![llength ${startupitem.stop} ] } {
-            set startupitem.stop [list "sh ${scriptdir}/${portname}.sh stop"]
+            set startupitem.stop [list "sh ${scriptdir}/${name}.sh stop"]
         }
     }
     if { ![llength ${startupitem.requires} ] } {
@@ -377,7 +377,7 @@
     # Emit some information for the user
     ui_msg "###########################################################"
     ui_msg "# A startup item has been generated that will aid in"
-    ui_msg "# starting ${portname} with SystemStarter. It is disabled"
+    ui_msg "# starting ${name} with SystemStarter. It is disabled"
     ui_msg "# by default. Add the following line to /etc/hostconfig"
     ui_msg "# or ${prefix}/etc/rc.conf to start it at startup:"
     ui_msg "#"
@@ -386,7 +386,7 @@
 }
 
 proc portstartupitem::startupitem_create_darwin_launchd {args} {
-    global UI_PREFIX prefix destroot destroot.keepdirs portname os.platform
+    global UI_PREFIX prefix destroot destroot.keepdirs name os.platform
     global startupitem.name startupitem.uniquename startupitem.plist startupitem.location
     global startupitem.init startupitem.start startupitem.stop startupitem.restart startupitem.executable
     global startupitem.pidfile startupitem.logfile startupitem.logevents startupitem.netchange
@@ -425,10 +425,10 @@
         set wrapper         "${itemdir}/${wrappername}"
 
         if { ![llength ${startupitem.start}] } {
-            set startupitem.start [list "sh ${scriptdir}/${portname}.sh start"]
+            set startupitem.start [list "sh ${scriptdir}/${name}.sh start"]
         }
         if { ![llength ${startupitem.stop}] } {
-            set startupitem.stop [list "sh ${scriptdir}/${portname}.sh stop"]
+            set startupitem.stop [list "sh ${scriptdir}/${name}.sh stop"]
         }
         if { ![llength ${startupitem.restart}] } {
             set startupitem.restart [list Stop Start]
@@ -603,7 +603,7 @@
     # Emit some information for the user
     ui_msg "###########################################################"
     ui_msg "# A startup item has been generated that will aid in"
-    ui_msg "# starting ${portname} with launchd. It is disabled"
+    ui_msg "# starting ${name} with launchd. It is disabled"
     ui_msg "# by default. Execute the following command to start it,"
     ui_msg "# and to cause it to launch at startup:"
     ui_msg "#"

Modified: branches/images-and-archives/base/src/port1.0/portsubmit.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portsubmit.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portsubmit.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -55,7 +55,7 @@
 
 
 proc portsubmit::submit_main {args} {
-    global mp_remote_submit_url portname portversion portverbose prefix UI_PREFIX workpath portpath
+    global mp_remote_submit_url name version portverbose prefix UI_PREFIX workpath portpath
 
     set submiturl $mp_remote_submit_url
 
@@ -68,7 +68,7 @@
     file mkdir ${workpath}
 
     # Create portpkg.xar in the work directory
-    set pkgpath "${workpath}/${portname}.portpkg"
+    set pkgpath "${workpath}/${name}.portpkg"
 
     # TODO: If a private key was provided, create a signed digest of the submission
 
@@ -83,13 +83,13 @@
     set cmd [join $args]
 
     if {[tbool portverbose]} {
-        ui_msg "Submitting portpkg $pkgpath for $portname to $submiturl"
+        ui_msg "Submitting portpkg $pkgpath for $name to $submiturl"
     }
 
     # Invoke curl to do the submit
     ui_debug $cmd
     if {[system $cmd] != ""} {
-        return -code error [format [msgcat::mc "Failure during submit of port %s"] $portname]
+        return -code error [format [msgcat::mc "Failure during submit of port %s"] $name]
     }
 
     # Parse the result
@@ -108,7 +108,7 @@
     }
     if {[info exists result(STATUS)]} {
         if { $result(STATUS) == 0 } {
-            ui_msg "Submitted portpkg for $portname"
+            ui_msg "Submitted portpkg for $name"
             if {[info exists result(DOWNLOAD_URL)]} {
                 ui_msg "    download URL => $result(DOWNLOAD_URL)"
             }
@@ -116,10 +116,10 @@
                 ui_msg "    human readable URL => $result(HUMAN_URL)"
             }
         } else {
-            return -code error [format [msgcat::mc "Status %d reported during submit of port %s"] $result(STATUS) $portname]
+            return -code error [format [msgcat::mc "Status %d reported during submit of port %s"] $result(STATUS) $name]
         }
     } else {
-        return -code error [format [msgcat::mc "Status not received during submit of port %s"] $portname]
+        return -code error [format [msgcat::mc "Status not received during submit of port %s"] $name]
     }
 
     return
@@ -136,7 +136,7 @@
     }
 
     if {[system $cmd] != ""} {
-    return -code error [format [msgcat::mc "Failed to archive port : %s"] $portname]
+    return -code error [format [msgcat::mc "Failed to archive port : %s"] $name]
     }
 
     set portsource ""
@@ -152,13 +152,13 @@
         close $fd
     }
     if {$portsource == ""} {
-        ui_msg "$UI_PREFIX Submitting $portname-$portversion"
+        ui_msg "$UI_PREFIX Submitting $name-$version"
         puts -nonewline "URL: "
         flush stdout
         gets stdin portsource
     }
 
-    ui_msg "$UI_PREFIX Submitting $portname-$portversion to $portsource"
+    ui_msg "$UI_PREFIX Submitting $name-$version to $portsource"
 
     puts -nonewline "Username: "
     flush stdout
@@ -170,7 +170,7 @@
     puts ""
     exec stty echo
 
-    set vars {portname portversion maintainers categories description \
+    set vars {name version maintainers categories description \
         long_description master_sites}
     eval "global $vars"
     foreach var $vars {
@@ -181,8 +181,8 @@
     append cmd "--silent "
     append cmd "--url [regsub -- {^mports} $portsource {http}]/cgi-bin/portsubmit.cgi "
     append cmd "--output ${workpath}/.portsubmit.out "
-    append cmd "-F name=${portname} "
-    append cmd "-F version=${portversion} "
+    append cmd "-F name=${name} "
+    append cmd "-F version=${version} "
     append cmd "-F base_rev=${base_rev} "
     append cmd "-F md5=[md5 file ${workpath}/Portfile.tar.gz] "
     append cmd "-F attachment=@${workpath}/Portfile.tar.gz "
@@ -196,7 +196,7 @@
 
     ui_debug $cmd
     if {[system $cmd] != ""} {
-    return -code error [format [msgcat::mc "Failed to submit port : %s"] $portname]
+    return -code error [format [msgcat::mc "Failed to submit port : %s"] $name]
     }
 
     #
@@ -217,12 +217,12 @@
     if {[info exists result(OK)]} {
         set fd [open ".mports_source" w]
         puts $fd "source: $portsource"
-        puts $fd "port: $portname"
-        puts $fd "version: $portversion"
+        puts $fd "port: $name"
+        puts $fd "version: $version"
         puts $fd "revision: $result(revision)"
         close $fd
 
-        ui_msg "$portname-$portversion submitted successfully."
+        ui_msg "$name-$version submitted successfully."
         ui_msg "New revision: $result(revision)"
     } elseif {[info exists result(ERROR)]} {
         return -code error $result(ERROR)
@@ -232,14 +232,14 @@
         set tmpdir [mktemp "/tmp/mports.XXXXXXXX"]
         file mkdir $tmpdir/new
         file mkdir $tmpdir/old
-        set worker [mport_open $portsource/files/$portname/$portversion/$result(revision)/Portfile.tar.gz [list portdir $tmpdir/new]]
+        set worker [mport_open $portsource/files/$name/$version/$result(revision)/Portfile.tar.gz [list portdir $tmpdir/new]]
         if {$base_rev != ""} {
-            set worker2 [mport_open $portsource/files/$portname/$portversion/$base_rev/Portfile.tar.gz [list portdir $tmpdir/old]]
-            catch {system "diff3 -m -E -- $portpath/Portfile $tmpdir/old/$portname-$portversion/Portfile $tmpdir/new/$portname-$portversion/Portfile > $tmpdir/Portfile"}
+            set worker2 [mport_open $portsource/files/$name/$version/$base_rev/Portfile.tar.gz [list portdir $tmpdir/old]]
+            catch {system "diff3 -m -E -- $portpath/Portfile $tmpdir/old/$name-$version/Portfile $tmpdir/new/$name-$version/Portfile > $tmpdir/Portfile"}
             file rename -force "${tmpdir}/Portfile" "${portpath}/Portfile"
             mport_close $worker2
         } else {
-            catch {system "diff3 -m -E -- $portpath/Portfile $portpath/Portfile $tmpdir/new/$portname-$portversion/Portfile > $tmpdir/Portfile"}
+            catch {system "diff3 -m -E -- $portpath/Portfile $portpath/Portfile $tmpdir/new/$name-$version/Portfile > $tmpdir/Portfile"}
             file rename -force "${tmpdir}/Portfile" "${portpath}/Portfile"
         }
         mport_close $worker
@@ -247,13 +247,13 @@
 
         set fd [open [file join "$portpath" ".mports_source"] w]
         puts $fd "source: $portsource"
-        puts $fd "port: $portname"
-        puts $fd "version: $portversion"
+        puts $fd "port: $name"
+        puts $fd "version: $version"
         puts $fd "revision: $result(revision)"
         close $fd
 
         ui_error "A newer revision of this port has already been submitted."
-        ui_error "Portfile: $portname-$portversion"
+        ui_error "Portfile: $name-$version"
         ui_error "Base revision: $base_rev"
         ui_error "Current revision: $result(revision)"
         ui_error "Please edit the Portfile to resolve any conflicts and resubmit."

Modified: branches/images-and-archives/base/src/port1.0/porttest.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/porttest.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/porttest.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -26,16 +26,16 @@
 set_ui_prefix
 
 proc porttest::test_start {args} {
-    global UI_PREFIX portname
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Testing %s"] ${portname}]"
+    global UI_PREFIX name
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Testing %s"] ${name}]"
 }
 
 proc porttest::test_main {args} {
-    global portname test.run
+    global name test.run
     if {[tbool test.run]} {
         command_exec test
     } else {
-    return -code error [format [msgcat::mc "%s has no tests turned on. see 'test.run' in portfile(7)"] $portname]
+    return -code error [format [msgcat::mc "%s has no tests turned on. see 'test.run' in portfile(7)"] $name]
     }
     return 0
 }

Modified: branches/images-and-archives/base/src/port1.0/portutil.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portutil.tcl	2009-05-27 23:38:13 UTC (rev 51567)
+++ branches/images-and-archives/base/src/port1.0/portutil.tcl	2009-05-27 23:52:02 UTC (rev 51568)
@@ -54,32 +54,33 @@
 # option
 # This is an accessor for Portfile options.  Targets may use
 # this in the same style as the standard Tcl "set" procedure.
-#   name  - the name of the option to read or write
+#   option  - the name of the option to read or write
+#       not called 'name' because this would fail if its value was 'name'...
 #   value - an optional value to assign to the option
 
-proc option {name args} {
+proc option {option args} {
     # XXX: right now we just transparently use globals
     # eventually this will need to bridge the options between
     # the Portfile's interpreter and the target's interpreters.
-    global $name
+    global $option
     if {[llength $args] > 0} {
-        ui_debug "setting option $name to $args"
-        set $name [lindex $args 0]
+        ui_debug "setting option $option to $args"
+        set $option [lindex $args 0]
     }
-    return [set $name]
+    return [set $option]
 }
 
 # exists
 # This is an accessor for Portfile options.  Targets may use
 # this procedure to test for the existence of a Portfile option.
-#   name - the name of the option to test for existence
+#   option - the name of the option to test for existence
 
-proc exists {name} {
+proc exists {option} {
     # XXX: right now we just transparently use globals
     # eventually this will need to bridge the options between
     # the Portfile's interpreter and the target's interpreters.
-    global $name
-    return [info exists $name]
+    global $option
+    return [info exists $option]
 }
 
 ##
@@ -196,17 +197,17 @@
 # @param option deprecated option
 # @param action read/set
 # @param value ignored
-proc warn_deprecated_option {option action {value ""}} {
-    global portname $option deprecated_options
+proc handle_deprecated_option {option action {value ""}} {
+    global name $option deprecated_options
     set newoption $deprecated_options($option)
     global $newoption
 
     if {$newoption == ""} {
-        ui_warn "Port $portname using deprecated option \"$option\"."
+        ui_warn "Port $name using deprecated option \"$option\"."
         return
     }
 
-    ui_warn "Port $portname using deprecated option \"$option\", superseded by \"$newoption\"."
+    ui_warn "Port $name using deprecated option \"$option\", superseded by \"$newoption\"."
     if {$action != "read"} {
         $newoption [set $option]
     } else {
@@ -224,7 +225,7 @@
     # If a new option is specified, default the option to $newoption
     set deprecated_options($option) $newoption
     # Register a proc for printing a warning
-    option_proc $option warn_deprecated_option
+    option_proc $option handle_deprecated_option
 }
 
 ##
@@ -1194,7 +1195,8 @@
 set ports_dry_last_skipped ""
 
 proc target_run {ditem} {
-    global target_state_fd portname workpath ports_trace PortInfo ports_dryrun ports_dry_last_skipped errorisprivileges
+    global target_state_fd workpath ports_trace PortInfo ports_dryrun ports_dry_last_skipped errorisprivileges
+    set portname [option name]
     set result 0
     set skipped 0
     set procedure [ditem_key $ditem procedure]
@@ -1204,18 +1206,18 @@
     }
 
     if {$procedure != ""} {
-        set name [ditem_key $ditem name]
+        set targetname [ditem_key $ditem name]
 
         if {[ditem_contains $ditem init]} {
-            set result [catch {[ditem_key $ditem init] $name} errstr]
+            set result [catch {[ditem_key $ditem init] $targetname} errstr]
         }
 
         if {$result == 0} {
             # Skip the step if required and explain why through ui_debug.
             # check if the step was already done (as mentioned in the state file)
             if {[ditem_key $ditem state] != "no"
-                    && [check_statefile target $name $target_state_fd]} {
-                ui_debug "Skipping completed $name ($portname)"
+                    && [check_statefile target $targetname $target_state_fd]} {
+                ui_debug "Skipping completed $targetname ($portname)"
                 set skipped 1
             }
 
@@ -1223,10 +1225,10 @@
             if {[info exists ports_dryrun] && $ports_dryrun == "yes"} {
                 # only one message per portname
                 if {$portname != $ports_dry_last_skipped} {
-                    ui_msg "For $portname: skipping $name (dry run)"
+                    ui_msg "For $portname: skipping $targetname (dry run)"
                     set ports_dry_last_skipped $portname
                 } else {
-                    ui_info "    .. and skipping $name"
+                    ui_info "    .. and skipping $targetname"
                 }
                 set skipped 1
             }
@@ -1237,7 +1239,7 @@
 
                 # Execute pre-run procedure
                 if {[ditem_contains $ditem prerun]} {
-                    set result [catch {[ditem_key $ditem prerun] $name} errstr]
+                    set result [catch {[ditem_key $ditem prerun] $targetname} errstr]
                 }
 
                 #start tracelib
@@ -1318,20 +1320,20 @@
                 if {$result == 0} {
                     foreach pre [ditem_key $ditem pre] {
                         ui_debug "Executing $pre"
-                        set result [catch {$pre $name} errstr]
+                        set result [catch {$pre $targetname} errstr]
                         if {$result != 0} { break }
                     }
                 }
 
                 if {$result == 0} {
-                ui_debug "Executing $name ($portname)"
-                set result [catch {$procedure $name} errstr]
+                ui_debug "Executing $targetname ($portname)"
+                set result [catch {$procedure $targetname} errstr]
                 }
 
                 if {$result == 0} {
                     foreach post [ditem_key $ditem post] {
                         ui_debug "Executing $post"
-                        set result [catch {$post $name} errstr]
+                        set result [catch {$post $targetname} errstr]
                         if {$result != 0} { break }
                     }
                 }
@@ -1339,7 +1341,7 @@
                 if {[ditem_contains $ditem postrun] && $result == 0} {
                     set postrun [ditem_key $ditem postrun]
                     ui_debug "Executing $postrun"
-                    set result [catch {$postrun $name} errstr]
+                    set result [catch {$postrun $targetname} errstr]
                 }
 
                 # Check dependencies & file creations outside workpath.
@@ -1364,21 +1366,21 @@
             if {$skipped == 0
           && [ditem_key $ditem runtype] != "always"
           && [ditem_key $ditem state] != "no"} {
-            write_statefile target $name $target_state_fd
+            write_statefile target $targetname $target_state_fd
             }
         } else {
             if {$errorisprivileges != "yes"} {
                 global errorInfo
-                ui_error "Target $name returned: $errstr"
+                ui_error "Target $targetname returned: $errstr"
                 ui_debug "Backtrace: $errorInfo"
             } else {
-                ui_msg "Target $name returned: $errstr"
+                ui_msg "Target $targetname returned: $errstr"
             }
             set result 1
         }
 
     } else {
-        ui_info "Warning: $name does not have a registered procedure"
+        ui_info "Warning: $targetname does not have a registered procedure"
         set result 1
     }
 
@@ -1423,27 +1425,27 @@
 
 
 proc eval_targets {target} {
-    global targets target_state_fd portname portversion portrevision portvariants ports_dryrun user_options errorisprivileges
+    global targets target_state_fd name version revision portvariants ports_dryrun user_options errorisprivileges
     set dlist $targets
     set errorisprivileges "no"
 
     # the statefile will likely be autocleaned away after install,
     # so special-case ignore already-completed install and activate
-    if {[registry_exists $portname $portversion $portrevision $portvariants]} {
+    if {[registry_exists $name $version $revision $portvariants]} {
         if {$target == "install"} {
-            ui_debug "Skipping $target ($portname) since this port is already installed"
+            ui_debug "Skipping $target ($name) since this port is already installed"
             return 0
         } elseif {$target == "activate"} {
-            set regref [registry_open $portname $portversion $portrevision $portvariants]
+            set regref [registry_open $name $version $revision $portvariants]
             if {[registry_prop_retr $regref active] != 0} {
                 # Something to close the registry entry may be called here, if it existed.
-                ui_debug "Skipping $target ($portname @${portversion}_${portrevision}${portvariants}) since this port is already active"
+                ui_debug "Skipping $target ($name @${version}_${revision}${portvariants}) since this port is already active"
             } else {
                 # do the activate here since target_run doesn't know how to selectively ignore the preceding steps
                 if {[info exists ports_dryrun] && $ports_dryrun == "yes"} {
-                    ui_msg "For $portname: skipping $target (dry run)"
+                    ui_msg "For $name: skipping $target (dry run)"
                 } else {
-                    registry_activate $portname ${portversion}_${portrevision}${portvariants} [array get user_options]
+                    registry_activate $name ${version}_${revision}${portvariants} [array get user_options]
                 }
             }
             return 0
@@ -1467,7 +1469,7 @@
 
     if {[llength $dlist] > 0} {
         # somebody broke!
-        set errstring "Warning: the following items did not execute (for $portname):"
+        set errstring "Warning: the following items did not execute (for $name):"
         foreach ditem $dlist {
             append errstring " [ditem_key $ditem name]"
         }
@@ -1489,7 +1491,7 @@
 # open_statefile
 # open file to store name of completed targets
 proc open_statefile {args} {
-    global workpath worksymlink place_worksymlink portname portpath ports_ignore_older
+    global workpath worksymlink place_worksymlink name portpath ports_ignore_older
     global altprefix usealtworkpath env applications_dir portbuildpath distpath
 
     # start gsoc08-privileges
@@ -1571,7 +1573,7 @@
         file mkdir $workpath
     }
     # flock Portfile
-    set statefile [file join $workpath .macports.${portname}.state]
+    set statefile [file join $workpath .macports.${name}.state]
     if {[file exists $statefile]} {
         if {![file writable $statefile]} {
             return -code error "$statefile is not writable - check permission on port directory"
@@ -2359,7 +2361,7 @@
                 #seteuid [name_to_uid [file attributes $workpath -owner]]
                 #setegid [name_to_gid [file attributes $workpath -group]]
 
-                setegid [name_to_gid "$macportsuser"]
+                setegid [uname_to_gid "$macportsuser"]
                 seteuid [name_to_uid "$macportsuser"]
                 ui_debug "egid changed to: [getegid]"
                 ui_debug "euid changed to: [geteuid]"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090527/17ed0864/attachment-0001.html>


More information about the macports-changes mailing list