[51521] trunk/base/src
jmr at macports.org
jmr at macports.org
Wed May 27 01:48:07 PDT 2009
Revision: 51521
http://trac.macports.org/changeset/51521
Author: jmr at macports.org
Date: 2009-05-27 01:48:05 -0700 (Wed, 27 May 2009)
Log Message:
-----------
Remove legacy option synonyms portname, portepoch, portversion, portrevision
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
trunk/base/src/package1.0/portarchive.tcl
trunk/base/src/package1.0/portdmg.tcl
trunk/base/src/package1.0/portdpkg.tcl
trunk/base/src/package1.0/portmdmg.tcl
trunk/base/src/package1.0/portmpkg.tcl
trunk/base/src/package1.0/portpkg.tcl
trunk/base/src/package1.0/portportpkg.tcl
trunk/base/src/package1.0/portrpm.tcl
trunk/base/src/package1.0/portsrpm.tcl
trunk/base/src/package1.0/portunarchive.tcl
trunk/base/src/port1.0/portactivate.tcl
trunk/base/src/port1.0/portbuild.tcl
trunk/base/src/port1.0/portchecksum.tcl
trunk/base/src/port1.0/portclean.tcl
trunk/base/src/port1.0/portconfigure.tcl
trunk/base/src/port1.0/portdestroot.tcl
trunk/base/src/port1.0/portdistcheck.tcl
trunk/base/src/port1.0/portdistfiles.tcl
trunk/base/src/port1.0/portextract.tcl
trunk/base/src/port1.0/portfetch.tcl
trunk/base/src/port1.0/portinstall.tcl
trunk/base/src/port1.0/portlint.tcl
trunk/base/src/port1.0/portlivecheck.tcl
trunk/base/src/port1.0/portmain.tcl
trunk/base/src/port1.0/portmirror.tcl
trunk/base/src/port1.0/portpatch.tcl
trunk/base/src/port1.0/portstartupitem.tcl
trunk/base/src/port1.0/portsubmit.tcl
trunk/base/src/port1.0/porttest.tcl
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/macports1.0/macports.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -1096,7 +1096,7 @@
error "Error evaluating variants"
}
- ditem_key $mport provides [$workername eval return \$portname]
+ ditem_key $mport provides [$workername eval return \$name]
return $mport
}
@@ -1270,13 +1270,13 @@
proc _mportinstalled {mport} {
# Check for the presence of the port in the registry
set workername [ditem_key $mport workername]
- return [$workername eval registry_exists_for_name \${portname}]
+ return [$workername eval registry_exists_for_name \${name}]
}
# Determine if a port is active (only for image mode)
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]
Modified: trunk/base/src/package1.0/portarchive.tcl
===================================================================
--- trunk/base/src/package1.0/portarchive.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/package1.0/portarchive.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -67,7 +67,7 @@
global UI_PREFIX target_state_fd
global variations package.destpath workpath
global ports_force ports_source_only ports_binary_only
- global portname portversion portrevision portvariants
+ global name version revision portvariants
global archive.destpath archive.type archive.meta
global archive.file archive.path archive.fulldestpath
@@ -100,17 +100,17 @@
if {[check_statefile target org.macports.archive $target_state_fd]} {
return 0
} elseif {[check_statefile target org.macports.unarchive $target_state_fd] && ([info exists ports_binary_only] && $ports_binary_only == "yes")} {
- ui_debug "Skipping archive ($portname) since binary-only is set"
+ ui_debug "Skipping archive ($name) since binary-only is set"
set skipped 1
} elseif {[info exists ports_source_only] && $ports_source_only == "yes"} {
- ui_debug "Skipping archive ($portname) since source-only is set"
+ ui_debug "Skipping archive ($name) since source-only is set"
set skipped 1
} else {
set unsupported 0
set any_missing no
foreach archive.type [option portarchivetype] {
if {[catch {archiveTypeIsSupported ${archive.type}} errmsg] == 0} {
- set archive.file "${portname}-${portversion}_${portrevision}${portvariants}.[option os.arch].${archive.type}"
+ set archive.file "${name}-${version}_${revision}${portvariants}.[option os.arch].${archive.type}"
set archive.path "[file join ${archive.fulldestpath} ${archive.file}]"
if {![file exists ${archive.path}]} {
set any_missing yes
@@ -122,14 +122,14 @@
}
if {!$any_missing} {
# might be nice to allow forcing, but let's fix #16061 first
- ui_debug "Skipping archive ($portname) since archive(s) already exist"
+ ui_debug "Skipping archive ($name) since archive(s) already exist"
set skipped 1
}
if {${archive.type} == "xpkg"} {
set archive.meta true
}
if {[llength [option portarchivetype]] == $unsupported} {
- ui_debug "Skipping archive ($portname) since specified archive types not supported"
+ ui_debug "Skipping archive ($name) since specified archive types not supported"
set skipped 1
}
}
@@ -143,12 +143,12 @@
proc portarchive::archive_start {args} {
global UI_PREFIX
- global portname portversion portrevision portvariants
+ global name version revision portvariants
if {[llength [option portarchivetype]] > 1} {
- ui_msg "$UI_PREFIX [format [msgcat::mc "Packaging [join [option portarchivetype] {, }] archives for %s %s_%s%s"] $portname $portversion $portrevision $portvariants]"
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Packaging [join [option portarchivetype] {, }] archives for %s %s_%s%s"] $name $version $revision $portvariants]"
} else {
- ui_msg "$UI_PREFIX [format [msgcat::mc "Packaging [option portarchivetype] archive for %s %s_%s%s"] $portname $portversion $portrevision $portvariants]"
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Packaging [option portarchivetype] archive for %s %s_%s%s"] $name $version $revision $portvariants]"
}
return 0
@@ -296,7 +296,7 @@
proc portarchive::archive_main {args} {
global UI_PREFIX variations
global workpath destpath portpath ports_force
- global portname portepoch portversion portrevision portvariants
+ global name epoch version revision portvariants
global archive.fulldestpath archive.type archive.file archive.path
global archive.meta archive.metaname archive.metapath
global os.platform os.arch
@@ -313,7 +313,7 @@
# Copy state file into destroot for archiving
# +STATE contains a copy of the MacPorts state information
- set statefile [file join $workpath .macports.${portname}.state]
+ set statefile [file join $workpath .macports.${name}.state]
file copy -force $statefile [file join $destpath "+STATE"]
# Copy Portfile into destroot for archiving
@@ -348,11 +348,11 @@
# files and checksums
set control [list]
set fd [open [file join $destpath "+CONTENTS"] w]
- puts $fd "@name ${portname}-${portversion}_${portrevision}${portvariants}"
- puts $fd "@portname ${portname}"
- puts $fd "@portepoch ${portepoch}"
- puts $fd "@portversion ${portversion}"
- puts $fd "@portrevision ${portrevision}"
+ puts $fd "@name ${name}-${version}_${revision}${portvariants}"
+ puts $fd "@portname ${name}"
+ puts $fd "@portepoch ${epoch}"
+ puts $fd "@portversion ${version}"
+ puts $fd "@portrevision ${revision}"
set vlist [lsort -ascii [array names variations]]
foreach v $vlist {
if {![string equal $v [option os.platform]] && ![string equal $v [option os.arch]]} {
@@ -388,10 +388,10 @@
# TODO: split contents into <buildinfo> (new) and <package> (current)
# see existing <portpkg> for the matching source package layout
- putel $sd name ${portname}
- putel $sd epoch ${portepoch}
- putel $sd version ${portversion}
- putel $sd revision ${portrevision}
+ putel $sd name ${name}
+ putel $sd epoch ${epoch}
+ putel $sd version ${version}
+ putel $sd revision ${revision}
putel $sd major 0
putel $sd minor 0
@@ -416,7 +416,7 @@
# Emit dependencies provided by this package
puts $sd "<provides>"
- set name ${portname}
+ set name ${name}
puts $sd "<item>"
putel $sd name $name
putel $sd major 0
@@ -424,9 +424,9 @@
puts $sd "</item>"
puts $sd "</provides>"
- set res [mport_lookup $portname]
+ set res [mport_lookup $name]
if {[llength $res] < 2} {
- ui_error "Dependency $portname not found"
+ ui_error "Dependency $name not found"
} else {
array set portinfo [lindex $res 1]
@@ -458,7 +458,7 @@
foreach archive.type [option portarchivetype] {
if {[catch {archiveTypeIsSupported ${archive.type}} errmsg] == 0} {
# Define archive file/path
- set archive.file "${portname}-${portversion}_${portrevision}${portvariants}.[option os.arch].${archive.type}"
+ set archive.file "${name}-${version}_${revision}${portvariants}.[option os.arch].${archive.type}"
set archive.path "[file join ${archive.fulldestpath} ${archive.file}]"
# Setup archive command
@@ -481,7 +481,7 @@
proc portarchive::archive_finish {args} {
global UI_PREFIX
- global portname portversion portrevision portvariants
+ global name version revision portvariants
global destpath
# Cleanup all control files when finished
@@ -492,9 +492,9 @@
}
if {[llength [option portarchivetype]] > 1} {
- ui_info "$UI_PREFIX [format [msgcat::mc "Archives for %s %s_%s%s packaged"] $portname $portversion $portrevision $portvariants]"
+ ui_info "$UI_PREFIX [format [msgcat::mc "Archives for %s %s_%s%s packaged"] $name $version $revision $portvariants]"
} else {
- ui_info "$UI_PREFIX [format [msgcat::mc "Archive for %s %s_%s%s packaged"] $portname $portversion $portrevision $portvariants]"
+ ui_info "$UI_PREFIX [format [msgcat::mc "Archive for %s %s_%s%s packaged"] $name $version $revision $portvariants]"
}
return 0
}
Modified: trunk/base/src/package1.0/portdmg.tcl
===================================================================
--- trunk/base/src/package1.0/portdmg.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/package1.0/portdmg.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/package1.0/portdpkg.tcl
===================================================================
--- trunk/base/src/package1.0/portdpkg.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/package1.0/portdpkg.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/package1.0/portmdmg.tcl
===================================================================
--- trunk/base/src/package1.0/portmdmg.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/package1.0/portmdmg.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/package1.0/portmpkg.tcl
===================================================================
--- trunk/base/src/package1.0/portmpkg.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/package1.0/portmpkg.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/package1.0/portpkg.tcl
===================================================================
--- trunk/base/src/package1.0/portpkg.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/package1.0/portpkg.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -55,11 +55,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: trunk/base/src/package1.0/portportpkg.tcl
===================================================================
--- trunk/base/src/package1.0/portportpkg.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/package1.0/portportpkg.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/package1.0/portrpm.tcl
===================================================================
--- trunk/base/src/package1.0/portrpm.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/package1.0/portrpm.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/package1.0/portsrpm.tcl
===================================================================
--- trunk/base/src/package1.0/portsrpm.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/package1.0/portsrpm.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/package1.0/portunarchive.tcl
===================================================================
--- trunk/base/src/package1.0/portunarchive.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/package1.0/portunarchive.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -63,7 +63,7 @@
proc portunarchive::unarchive_init {args} {
global UI_PREFIX target_state_fd variations workpath
global ports_force ports_source_only ports_binary_only
- global portname portversion portrevision portvariants portpath
+ global name version revision portvariants portpath
global unarchive.srcpath unarchive.type unarchive.file unarchive.path unarchive.fullsrcpath
# Check mode in case archive called directly by user
@@ -95,20 +95,20 @@
if {[check_statefile target org.macports.unarchive $target_state_fd]} {
return 0
} elseif {[info exists ports_source_only] && $ports_source_only == "yes"} {
- ui_debug "Skipping unarchive ($portname) since source-only is set"
+ ui_debug "Skipping unarchive ($name) since source-only is set"
set skipped 1
} elseif {[check_statefile target org.macports.destroot $target_state_fd]} {
- ui_debug "Skipping unarchive ($portname) since destroot completed"
+ ui_debug "Skipping unarchive ($name) since destroot completed"
set skipped 1
} elseif {[info exists ports_force] && $ports_force == "yes"} {
- ui_debug "Skipping unarchive ($portname) since force is set"
+ ui_debug "Skipping unarchive ($name) since force is set"
set skipped 1
} else {
set found 0
set unsupported 0
foreach unarchive.type [option portarchivetype] {
if {[catch {archiveTypeIsSupported ${unarchive.type}} errmsg] == 0} {
- set unarchive.file "${portname}-${portversion}_${portrevision}${portvariants}.[option os.arch].${unarchive.type}"
+ set unarchive.file "${name}-${version}_${revision}${portvariants}.[option os.arch].${unarchive.type}"
set unarchive.path "[file join ${unarchive.fullsrcpath} ${unarchive.file}]"
if {[file exist ${unarchive.path}]} {
set found 1
@@ -125,12 +125,12 @@
ui_debug "Found [string toupper ${unarchive.type}] archive: ${unarchive.path}"
} else {
if {[info exists ports_binary_only] && $ports_binary_only == "yes"} {
- return -code error "Archive for ${portname} ${portversion}_${portrevision}${portvariants} not found, required when binary-only is set!"
+ return -code error "Archive for ${name} ${version}_${revision}${portvariants} not found, required when binary-only is set!"
} else {
if {[llength [option portarchivetype]] == $unsupported} {
- ui_debug "Skipping unarchive ($portname) since specified archive types not supported"
+ ui_debug "Skipping unarchive ($name) since specified archive types not supported"
} else {
- ui_debug "Skipping unarchive ($portname) since no archive found"
+ ui_debug "Skipping unarchive ($name) since no archive found"
}
set skipped 1
}
@@ -145,10 +145,10 @@
}
proc portunarchive::unarchive_start {args} {
- global UI_PREFIX portname portversion portrevision portvariants
+ global UI_PREFIX name version revision portvariants
global unarchive.type
- ui_msg "$UI_PREFIX [format [msgcat::mc "Unpacking ${unarchive.type} archive for %s %s_%s%s"] $portname $portversion $portrevision $portvariants]"
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Unpacking ${unarchive.type} archive for %s %s_%s%s"] $name $version $revision $portvariants]"
return 0
}
@@ -271,7 +271,7 @@
proc portunarchive::unarchive_main {args} {
global UI_PREFIX
- global portname portversion portrevision portvariants
+ global name version revision portvariants
global unarchive.dir unarchive.file unarchive.pipe_cmd
# Setup unarchive command
@@ -294,10 +294,10 @@
}
proc portunarchive::unarchive_finish {args} {
- global UI_PREFIX target_state_fd unarchive.file portname workpath destpath
+ global UI_PREFIX target_state_fd unarchive.file name workpath destpath
# Reset state file with archive version
- set statefile [file join $workpath .macports.${portname}.state]
+ set statefile [file join $workpath .macports.${name}.state]
file copy -force [file join $destpath "+STATE"] $statefile
exec touch $statefile
Modified: trunk/base/src/port1.0/portactivate.tcl
===================================================================
--- trunk/base/src/port1.0/portactivate.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portactivate.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -52,8 +52,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: trunk/base/src/port1.0/portbuild.tcl
===================================================================
--- trunk/base/src/port1.0/portbuild.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portbuild.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portchecksum.tcl
===================================================================
--- trunk/base/src/port1.0/portchecksum.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portchecksum.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portclean.tcl
===================================================================
--- trunk/base/src/port1.0/portclean.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portclean.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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,25 +62,25 @@
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_archive] && $ports_clean_archive == "yes"} {
- ui_info "$UI_PREFIX [format [msgcat::mc "Removing archives for %s"] [option portname]]"
+ ui_info "$UI_PREFIX [format [msgcat::mc "Removing archives for %s"] [option name]]"
clean_archive
}
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") && \
!([info exists ports_clean_archive] && $ports_clean_archive == "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
@@ -111,7 +111,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
@@ -139,7 +139,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")
@@ -148,13 +148,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
@@ -200,7 +200,7 @@
}
proc portclean::clean_archive {args} {
- global workpath portarchivepath portname portversion ports_version_glob
+ global workpath portarchivepath name version ports_version_glob
# Define archive destination directory and target filename
if {$portarchivepath ne $workpath && $portarchivepath ne ""} {
@@ -210,7 +210,7 @@
if {[info exists ports_version_glob]} {
# Match all possible archive variatns that match the version
# glob specified by the user for this OS.
- set fileglob "$portname-[option ports_version_glob]*.[option os.arch].*"
+ set fileglob "$name-[option ports_version_glob]*.[option os.arch].*"
} else {
# Match all possible archive variants for the current version on
# this OS. If you want to delete previous versions, use the
@@ -219,7 +219,7 @@
# We do this because if we don't, then ports that match the
# first part of the name (e.g. trying to remove foo-*, it will
# pick up anything foo-bar-* as well, which is undesirable).
- set fileglob "$portname-$portversion*.[option os.arch].*"
+ set fileglob "$name-$version*.[option os.arch].*"
}
# Remove the archive files
@@ -229,7 +229,7 @@
set file [file tail $path]
# Make sure file is truly a port archive file, and not
# and accidental match with some other file that might exist.
- if {[regexp "^$portname-\[-_a-zA-Z0-9\.\]+_\[0-9\]*\[+-_a-zA-Z0-9\]*\[\.\][option os.arch]\[\.\]\[a-z\]+\$" $file]} {
+ if {[regexp "^$name-\[-_a-zA-Z0-9\.\]+_\[0-9\]*\[+-_a-zA-Z0-9\]*\[\.\][option os.arch]\[\.\]\[a-z\]+\$" $file]} {
if {[file isfile $path]} {
ui_debug "Removing archive: $path"
if {[catch {delete $path} result]} {
Modified: trunk/base/src/port1.0/portconfigure.tcl
===================================================================
--- trunk/base/src/port1.0/portconfigure.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portconfigure.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portdestroot.tcl
===================================================================
--- trunk/base/src/port1.0/portdestroot.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portdestroot.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portdistcheck.tcl
===================================================================
--- trunk/base/src/port1.0/portdistcheck.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portdistcheck.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portdistfiles.tcl
===================================================================
--- trunk/base/src/port1.0/portdistfiles.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portdistfiles.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portextract.tcl
===================================================================
--- trunk/base/src/port1.0/portextract.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portextract.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portfetch.tcl
===================================================================
--- trunk/base/src/port1.0/portfetch.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portfetch.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portinstall.tcl
===================================================================
--- trunk/base/src/port1.0/portinstall.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portinstall.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -55,9 +55,9 @@
set_ui_prefix
proc portinstall::install_start {args} {
- global UI_PREFIX portname portversion portrevision variations portvariants
+ global UI_PREFIX name version revision variations portvariants
global install.asroot prefix
- ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s @%s_%s%s"] $portname $portversion $portrevision $portvariants]"
+ ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s @%s_%s%s"] $name $version $revision $portvariants]"
# start gsoc08-privileges
if { [tbool install.asroot] } {
@@ -139,10 +139,10 @@
}
proc portinstall::install_main {args} {
- global portname portversion portpath categories description long_description homepage depends_run installPlist package-install uninstall workdir worksrcdir pregrefix UI_PREFIX destroot portrevision maintainers ports_force portvariants targets depends_lib PortInfo epoch license
+ global name version portpath categories description long_description homepage depends_run installPlist package-install uninstall workdir worksrcdir pregrefix UI_PREFIX destroot revision maintainers ports_force portvariants targets depends_lib PortInfo epoch license
# Begin the registry entry
- set regref [registry_new $portname $portversion $portrevision $portvariants $epoch]
+ set regref [registry_new $name $version $revision $portvariants $epoch]
# Install the files
directory_dig ${destroot} ${destroot} ${regref}
@@ -166,16 +166,16 @@
}
if {[info exists depends_run]} {
registry_prop_store $regref depends_run $depends_run
- registry_register_deps $depends_run $portname
+ registry_register_deps $depends_run $name
}
if {[info exists depends_lib]} {
registry_prop_store $regref depends_lib $depends_lib
- registry_register_deps $depends_lib $portname
+ registry_register_deps $depends_lib $name
}
if {[info exists installPlist]} {
registry_prop_store $regref contents [registry_fileinfo_for_index $installPlist]
if { [registry_prop_retr $regref installtype] != "image" } {
- registry_bulk_register_files [registry_fileinfo_for_index $installPlist] $portname
+ registry_bulk_register_files [registry_fileinfo_for_index $installPlist] $name
}
}
if {[info exists package-install]} {
Modified: trunk/base/src/port1.0/portlint.tcl
===================================================================
--- trunk/base/src/port1.0/portlint.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portlint.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portlivecheck.tcl
===================================================================
--- trunk/base/src/port1.0/portlivecheck.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portlivecheck.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portmain.tcl
===================================================================
--- trunk/base/src/port1.0/portmain.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portmain.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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}
-
# Platform Settings
set os_arch $tcl_platform(machine)
if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }
Modified: trunk/base/src/port1.0/portmirror.tcl
===================================================================
--- trunk/base/src/port1.0/portmirror.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portmirror.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portpatch.tcl
===================================================================
--- trunk/base/src/port1.0/portpatch.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portpatch.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portstartupitem.tcl
===================================================================
--- trunk/base/src/port1.0/portstartupitem.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portstartupitem.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portsubmit.tcl
===================================================================
--- trunk/base/src/port1.0/portsubmit.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portsubmit.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/porttest.tcl
===================================================================
--- trunk/base/src/port1.0/porttest.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/porttest.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -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: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2009-05-27 08:25:40 UTC (rev 51520)
+++ trunk/base/src/port1.0/portutil.tcl 2009-05-27 08:48:05 UTC (rev 51521)
@@ -197,16 +197,16 @@
# @param action read/set
# @param value ignored
proc warn_deprecated_option {option action {value ""}} {
- global portname $option deprecated_options
+ 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 {
@@ -1194,7 +1194,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 +1205,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 +1224,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 +1238,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 +1319,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 +1340,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 +1365,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 +1424,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 +1468,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 +1490,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 +1572,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"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090527/e4313e9f/attachment-0001.html>
More information about the macports-changes
mailing list