[83525] branches/gsoc11-rev-upgrade/base
cal at macports.org
cal at macports.org
Sun Sep 4 04:59:29 PDT 2011
Revision: 83525
http://trac.macports.org/changeset/83525
Author: cal at macports.org
Date: 2011-09-04 04:59:25 -0700 (Sun, 04 Sep 2011)
Log Message:
-----------
rev-upgrade: Merge from trunk
Modified Paths:
--------------
branches/gsoc11-rev-upgrade/base/ChangeLog
branches/gsoc11-rev-upgrade/base/Makefile.in
branches/gsoc11-rev-upgrade/base/config/RELEASE_URL
branches/gsoc11-rev-upgrade/base/portmgr/jobs/org.macports.PortIndex2MySQL.plist
branches/gsoc11-rev-upgrade/base/portmgr/jobs/org.macports.mprsyncup.plist
branches/gsoc11-rev-upgrade/base/portmgr/jobs/port_binary_distributable.tcl
branches/gsoc11-rev-upgrade/base/portmgr/packaging/mpkgall.tcl
branches/gsoc11-rev-upgrade/base/src/cregistry/registry.c
branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl
branches/gsoc11-rev-upgrade/base/src/package1.0/portmpkg.tcl
branches/gsoc11-rev-upgrade/base/src/package1.0/portpkg.tcl
branches/gsoc11-rev-upgrade/base/src/pextlib1.0/fs-traverse.c
branches/gsoc11-rev-upgrade/base/src/port/port.tcl
branches/gsoc11-rev-upgrade/base/src/port1.0/portchecksum.tcl
branches/gsoc11-rev-upgrade/base/src/port1.0/portdistcheck.tcl
branches/gsoc11-rev-upgrade/base/src/port1.0/portfetch.tcl
branches/gsoc11-rev-upgrade/base/src/port1.0/portlivecheck.tcl
branches/gsoc11-rev-upgrade/base/src/port1.0/portstartupitem.tcl
branches/gsoc11-rev-upgrade/base/src/port1.0/portutil.tcl
branches/gsoc11-rev-upgrade/base/src/registry2.0/portimage.tcl
Property Changed:
----------------
branches/gsoc11-rev-upgrade/base/
branches/gsoc11-rev-upgrade/base/portmgr/fedora/macports.spec
branches/gsoc11-rev-upgrade/base/src/pextlib1.0/sha2.c
branches/gsoc11-rev-upgrade/base/src/pextlib1.0/sha2.h
branches/gsoc11-rev-upgrade/base/src/pextlib1.0/sha256cmd.c
branches/gsoc11-rev-upgrade/base/src/pextlib1.0/sha256cmd.h
branches/gsoc11-rev-upgrade/base/src/registry2.0/receipt_sqlite.tcl
Property changes on: branches/gsoc11-rev-upgrade/base
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:78828-82613
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
+ /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:78828-83524
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
Modified: branches/gsoc11-rev-upgrade/base/ChangeLog
===================================================================
--- branches/gsoc11-rev-upgrade/base/ChangeLog 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/ChangeLog 2011-09-04 11:59:25 UTC (rev 83525)
@@ -3,6 +3,48 @@
# $Id$
###
+Unreleased changes:
+
+ - Implement new option-replace using lsearch/lreplace. The old behavior is
+ deprecated for option-replace with only one argument, but can still be
+ found in option-strsed.
+ (raimue in r82760, r82761)
+
+Release 2.0.2 (2011-09-01 by jmr):
+ - Messages recommending running selfupdate will no longer be printed when
+ selfupdate is being run. (#23094, jmr in r83270, r83391)
+
+ - The PortIndex will not be regenerated during selfupdate when base is
+ outdated. This avoids failure to index ports that use features only
+ available in the current version. (#30739, jmr in r83271)
+
+ - Fixed build failures when the TMPDIR environment variable is set to a
+ directory that is not writable by the macports user.
+ (#30749, jmr in r83267)
+
+ - Fixed error when checksumming distfiles with names containing spaces.
+ (#28568, jmr in r83149)
+
+ - The uninstall and deactivate actions now sort the port list so that
+ dependents are processed before the ports they depend on.
+ (#8431, jmr in r82947)
+
+ - Fixed an issue where a non-universal version of a port could be
+ installed as a dependency as well as the universal version, with
+ unpredictable results, when some ports in the dependency graph needed
+ the universal version but others didn't. (jmr in r82924)
+
+ - Now using a temp dir inside ${prefix} when activating, as /tmp or
+ /var/folders may be on a different volume. (jmr in r82767)
+
+ - Fixed extracting portfile-only archives. (#31033, jmr in r81830)
+
+ - Fixed adduser and addgroup procedures not re-dropping privileges when
+ done. (jmr in r81630)
+
+ - Fixed error activating ports with names containing the string "cpio".
+ (#30532, jmr in r81577)
+
Release 2.0.1 (2011-08-02 by jmr):
- Fixed errors when installing some archives built on a case-sensitive
filesystem onto a case-insensitive one. (#30373, jmr in r81562)
Modified: branches/gsoc11-rev-upgrade/base/Makefile.in
===================================================================
--- branches/gsoc11-rev-upgrade/base/Makefile.in 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/Makefile.in 2011-09-04 11:59:25 UTC (rev 83525)
@@ -86,9 +86,13 @@
# Convert image directories (and direct mode installs) to image archives
$(TCLSH) src/images_to_archives.tcl "${macports_tcl_dir}"
endif
+ifndef SELFUPDATING
@echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, add ${prefix}/bin to your PATH and run:"; echo ""
@echo "sudo port -v selfupdate"; echo ""
@echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at https://trac.macports.org/ for full documentation."; echo ""
+else
+ @echo ""; echo "Congratulations, you have successfully upgraded the MacPorts system."; echo ""
+endif
group::
@echo "creating a macports group..." && sudo dseditgroup -o create -n . macports && echo "done! use './configure --with-install-group=macports --with-shared-directory' if you haven't already"
Modified: branches/gsoc11-rev-upgrade/base/config/RELEASE_URL
===================================================================
--- branches/gsoc11-rev-upgrade/base/config/RELEASE_URL 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/config/RELEASE_URL 2011-09-04 11:59:25 UTC (rev 83525)
@@ -1 +1 @@
-https://svn.macports.org/repository/macports/tags/release_2_0_1/base
+https://svn.macports.org/repository/macports/tags/release_2_0_2/base
Property changes on: branches/gsoc11-rev-upgrade/base/portmgr/fedora/macports.spec
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base/portmgr/fedora/macports.spec:37343-46937
/branches/universal-sanity/base/portmgr/fedora/macports.spec:51872-52323
/branches/variant-descs-14482/base/portmgr/fedora/macports.spec:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/portmgr/fedora/macports.spec:78828-82613
/trunk/base/portmgr/fedora/macports.spec.in:30388-57826
/users/perry/base-bugs_and_notes/portmgr/fedora/macports.spec:45682-46060
/users/perry/base-select/portmgr/fedora/macports.spec:44044-44692
+ /branches/gsoc08-privileges/base/portmgr/fedora/macports.spec:37343-46937
/branches/universal-sanity/base/portmgr/fedora/macports.spec:51872-52323
/branches/variant-descs-14482/base/portmgr/fedora/macports.spec:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/portmgr/fedora/macports.spec:78828-83524
/trunk/base/portmgr/fedora/macports.spec.in:30388-57826
/users/perry/base-bugs_and_notes/portmgr/fedora/macports.spec:45682-46060
/users/perry/base-select/portmgr/fedora/macports.spec:44044-44692
Modified: branches/gsoc11-rev-upgrade/base/portmgr/jobs/org.macports.PortIndex2MySQL.plist
===================================================================
--- branches/gsoc11-rev-upgrade/base/portmgr/jobs/org.macports.PortIndex2MySQL.plist 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/portmgr/jobs/org.macports.PortIndex2MySQL.plist 2011-09-04 11:59:25 UTC (rev 83525)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
@@ -11,17 +11,17 @@
<key>StartCalendarInterval</key>
<array>
<dict>
- <key>Hour</key>
- <integer>4</integer>
- <key>Minute</key>
- <integer>15</integer>
- </dict>
- <dict>
- <key>Hour</key>
- <integer>16</integer>
- <key>Minute</key>
- <integer>15</integer>
- </dict>
+ <key>Hour</key>
+ <integer>4</integer>
+ <key>Minute</key>
+ <integer>15</integer>
+ </dict>
+ <dict>
+ <key>Hour</key>
+ <integer>16</integer>
+ <key>Minute</key>
+ <integer>15</integer>
+ </dict>
</array>
<key>UserName</key>
<string>mysql</string>
Modified: branches/gsoc11-rev-upgrade/base/portmgr/jobs/org.macports.mprsyncup.plist
===================================================================
--- branches/gsoc11-rev-upgrade/base/portmgr/jobs/org.macports.mprsyncup.plist 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/portmgr/jobs/org.macports.mprsyncup.plist 2011-09-04 11:59:25 UTC (rev 83525)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
@@ -11,13 +11,13 @@
<key>StartCalendarInterval</key>
<array>
<dict>
- <key>Minute</key>
- <integer>00</integer>
- </dict>
- <dict>
- <key>Minute</key>
- <integer>30</integer>
- </dict>
+ <key>Minute</key>
+ <integer>00</integer>
+ </dict>
+ <dict>
+ <key>Minute</key>
+ <integer>30</integer>
+ </dict>
</array>
</dict>
</plist>
Modified: branches/gsoc11-rev-upgrade/base/portmgr/jobs/port_binary_distributable.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/portmgr/jobs/port_binary_distributable.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/portmgr/jobs/port_binary_distributable.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -34,25 +34,37 @@
# variants like CeCILL and the AGPL) and is not in the list of licenses known
# to do so below.
# 'Noncommercial' means a license that prohibits commercial use.
-set good_licenses {agpl apache apsl artistic autoconf boost bsd cecill copyleft cpl
- curl fontconfig freebsd freetype gfdl gpl gplconflict ibmpl ijg
- jasper lgpl libpng libtool mit mpl noncommercial openssl permissive
+set good_licenses {afl agpl apache apsl artistic autoconf boost bsd cecill copyleft cpl
+ curl fontconfig freebsd freetype gfdl gd gpl gplconflict ibmpl ijg
+ jasper lgpl lppl libpng libtool mit mpl ncsa noncommercial openssl permissive
php psf qpl public-domain restrictive/distributable ruby sleepycat
- ssleay tcl/tk x11 zlib zpl}
+ ssleay tcl/tk x11 wtfpl zlib zpl}
foreach lic $good_licenses {
set license_good($lic) 1
}
+
+proc all_licenses_except { args } {
+ global good_licenses
+ set remaining $good_licenses
+ foreach arg $args {
+ set remaining [lsearch -inline -all -not -exact $remaining $arg]
+ }
+ return [list $remaining]
+}
+
# keep these values sorted
array set license_conflicts \
- {agpl {apache-1 apache-1.1 cecill gpl-1 gpl-2 gplconflict noncommercial restrictive/distributable}
+ "afl {cecill gpl}
+ agpl {apache-1 apache-1.1 cecill gpl-1 gpl-2 gplconflict noncommercial restrictive/distributable}
apache {cecill gpl-1 gpl-2}
apache-1 {agpl gpl}
apache-1.1 {agpl gpl}
apsl {cecill gpl}
cpl {cecill gpl}
- cecill {agpl apache apsl cpl gplconflict ibmpl mpl noncommercial openssl php qpl restrictive/distributable ssleay zpl-1}
+ cecill {afl agpl apache apsl cpl gd gplconflict ibmpl lppl mpl noncommercial openssl php qpl restrictive/distributable ruby ssleay zpl-1}
freetype {gpl-2}
- gpl {agpl apache-1 apache-1.1 apsl cpl gplconflict ibmpl mpl noncommercial openssl php qpl restrictive/distributable ssleay zpl-1}
+ gd {cecill gpl}
+ gpl {afl agpl apache-1 apache-1.1 apsl cpl gd gplconflict ibmpl lppl mpl noncommercial openssl php qpl restrictive/distributable ruby ssleay zpl-1}
gpl-1 {apache gpl-3 gpl-3+ lgpl-3 lgpl-3+}
gpl-2 {apache freetype gpl-3 gpl-3+ lgpl-3 lgpl-3+}
gpl-3 {gpl-1 gpl-2}
@@ -60,13 +72,16 @@
ibmpl {cecill gpl}
lgpl-3 {gpl-1 gpl-2}
lgpl-3+ {gpl-1 gpl-2}
+ lppl {cecill gpl}
mpl {cecill gpl}
openssl {cecill gpl}
+ opensslexception [all_licenses_except openssl ssleay]
php {cecill gpl}
qpl {cecill gpl}
restrictive/distributable {agpl cecill gpl}
+ ruby {cecill gpl}
ssleay {cecill gpl}
- zpl-1 {cecill gpl}}
+ zpl-1 {cecill gpl}"
proc printUsage {} {
puts "Usage: $::argv0 \[-hvV\] \[-t macports-tcl-path\] port-name \[variants...\]"
Modified: branches/gsoc11-rev-upgrade/base/portmgr/packaging/mpkgall.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/portmgr/packaging/mpkgall.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/portmgr/packaging/mpkgall.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -102,7 +102,7 @@
proc write_description_plist {infofile portname portversion description} {
set infofd [open ${infofile} w+]
puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
}
puts $infofd "<dict>
@@ -174,7 +174,7 @@
set infofd [open ${infofile} w+]
puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
}
puts $infofd "<dict>
Modified: branches/gsoc11-rev-upgrade/base/src/cregistry/registry.c
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/cregistry/registry.c 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/cregistry/registry.c 2011-09-04 11:59:25 UTC (rev 83525)
@@ -111,6 +111,12 @@
return 0;
}
if (sqlite3_open(NULL, ®->db) == SQLITE_OK) {
+ /* Enable extended result codes, requires SQLite >= 3.3.8
+ * Check added for compatibility with Tiger. */
+#if SQLITE_VERSION_NUMBER >= 3003008
+ sqlite3_extended_result_codes(reg->db, 1);
+#endif
+
if (init_db(reg->db, errPtr)) {
reg->status = reg_none;
*regPtr = reg;
Modified: branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -839,14 +839,17 @@
set macports::macosx_deployment_target $macosx_version
}
+ # make tools we run operate in UTF-8 mode
+ set env(LANG) en_US.UTF-8
+
# ENV cleanup.
set keepenvkeys {
DISPLAY DYLD_FALLBACK_FRAMEWORK_PATH
DYLD_FALLBACK_LIBRARY_PATH DYLD_FRAMEWORK_PATH
DYLD_LIBRARY_PATH DYLD_INSERT_LIBRARIES
HOME JAVA_HOME MASTER_SITE_LOCAL ARCHIVE_SITE_LOCAL
- PATCH_SITE_LOCAL PATH PORTSRC RSYNC_PROXY TMP TMPDIR
- USER GROUP
+ PATCH_SITE_LOCAL PATH PORTSRC RSYNC_PROXY
+ USER GROUP LANG
http_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY NO_PROXY
COLUMNS LINES
}
@@ -854,6 +857,29 @@
set keepenvkeys [concat ${keepenvkeys} ${extra_env}]
}
+ if {[file isdirectory $libpath]} {
+ lappend auto_path $libpath
+ set macports::auto_path $auto_path
+
+ # XXX: not sure if this the best place, but it needs to happen
+ # early, and after auto_path has been set. Or maybe Pextlib
+ # should ship with macports1.0 API?
+ package require Pextlib 1.0
+ package require registry 1.0
+ package require registry2 2.0
+ } else {
+ return -code error "Library directory '$libpath' must exist"
+ }
+
+ # don't keep unusable TMPDIR/TMP values
+ foreach var {TMP TMPDIR} {
+ if {[info exists env($var)] && [file writable $env($var)] &&
+ ([getuid] != 0 || $macportsuser == "root" ||
+ [file attributes $env($var) -owner] == $macportsuser)} {
+ lappend keepenvkeys $var
+ }
+ }
+
set env_names [array names env]
foreach envkey $env_names {
if {[lsearch -exact $keepenvkeys $envkey] == -1} {
@@ -861,8 +887,14 @@
}
}
- # make tools we run operate in UTF-8 mode
- set env(LANG) en_US.UTF-8
+ # unset environment an extra time, to work around bugs in Leopard Tcl
+ if {$macosx_version == "10.5"} {
+ foreach envkey $env_names {
+ if {[lsearch -exact $keepenvkeys $envkey] == -1} {
+ unsetenv $envkey
+ }
+ }
+ }
if {![info exists xcodeversion] || ![info exists xcodebuildcmd]} {
# We'll resolve these later (if needed)
@@ -885,29 +917,6 @@
set env(ARCHIVE_SITE_LOCAL) "$archive_site_local"
}
- if {[file isdirectory $libpath]} {
- lappend auto_path $libpath
- set macports::auto_path $auto_path
-
- # XXX: not sure if this the best place, but it needs to happen
- # early, and after auto_path has been set. Or maybe Pextlib
- # should ship with macports1.0 API?
- package require Pextlib 1.0
- package require registry 1.0
- package require registry2 2.0
- } else {
- return -code error "Library directory '$libpath' must exist"
- }
-
- # unset environment an extra time, to work around bugs in Leopard Tcl
- if {$macosx_version == "10.5"} {
- foreach envkey $env_names {
- if {[lsearch -exact $keepenvkeys $envkey] == -1} {
- unsetenv $envkey
- }
- }
- }
-
# Proxy handling (done this late since Pextlib is needed)
if {![info exists proxy_override_env] } {
set proxy_override_env "no"
@@ -955,14 +964,16 @@
# load the quick index
_mports_load_quickindex
- set default_source_url [lindex ${sources_default} 0]
- if {[macports::getprotocol $default_source_url] == "file" || [macports::getprotocol $default_source_url] == "rsync"} {
- set default_portindex [macports::getindex $default_source_url]
- if {[file exists $default_portindex] && [expr [clock seconds] - [file mtime $default_portindex]] > 1209600} {
- ui_warn "port definitions are more than two weeks old, consider using selfupdate"
+ if {![info exists macports::ui_options(ports_no_old_index_warning)]} {
+ set default_source_url [lindex ${sources_default} 0]
+ if {[macports::getprotocol $default_source_url] == "file" || [macports::getprotocol $default_source_url] == "rsync"} {
+ set default_portindex [macports::getindex $default_source_url]
+ if {[file exists $default_portindex] && [expr [clock seconds] - [file mtime $default_portindex]] > 1209600} {
+ ui_warn "port definitions are more than two weeks old, consider using selfupdate"
+ }
}
}
-
+
# init registry
set db_path [file join ${registry.path} registry registry.db]
set db_exists [file exists $db_path]
@@ -1634,6 +1645,7 @@
# An error occurred.
global ::logenabled ::debuglogname
ui_error "Failed to install $portname"
+ ui_debug "$::errorInfo"
if {[info exists ::logenabled] && $::logenabled && [info exists ::debuglogname]} {
ui_notice "Log for $portname is at: $::debuglogname"
}
@@ -1927,6 +1939,9 @@
global macports::portverbose
global macports::autoconf::rsync_path macports::autoconf::tar_path macports::autoconf::openssl_path
array set options $optionslist
+ if {[info exists options(no_reindex)]} {
+ upvar $options(needed_portindex_var) any_needed_portindex
+ }
set numfailed 0
@@ -2054,8 +2069,10 @@
file delete -force ${destdir}/tmp
}
+ set needs_portindex 1
# now sync the index if the local file is missing or older than a day
- if {![file isfile $indexfile] || [expr [clock seconds] - [file mtime $indexfile]] > 86400} {
+ if {![file isfile $indexfile] || [expr [clock seconds] - [file mtime $indexfile]] > 86400
+ || [info exists options(no_reindex)]} {
if {$is_tarball} {
# chop ports.tar off the end
set index_source [string range $source 0 end-[string length [file tail $source]]]
@@ -2069,8 +2086,10 @@
ui_debug "Synchronization of the PortIndex failed doing rsync"
} else {
set ok 1
+ set needs_portindex 0
if {$is_tarball} {
set ok 0
+ set needs_portindex 1
# verify signature for PortIndex
set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options} ${remote_indexfile}.rmd160 ${destdir}"
ui_debug $rsync_commandline
@@ -2078,6 +2097,7 @@
foreach pubkey ${macports::archivefetch_pubkeys} {
if {![catch {exec $openssl dgst -ripemd160 -verify $pubkey -signature ${destdir}/PortIndex.rmd160 ${destdir}/PortIndex} result]} {
set ok 1
+ set needs_portindex 0
ui_debug "successful verification with key $pubkey"
break
} else {
@@ -2099,7 +2119,6 @@
if {[catch {system "chmod -R a+r \"$destdir\""}]} {
ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
}
- set needs_portindex 1
}
{^https?$|^ftp$} {
if {[_source_is_snapshot $source filename extension]} {
@@ -2161,8 +2180,6 @@
}
file delete $tarpath
-
- set needs_portindex 1
} else {
# sync just a PortIndex file
set indexfile [macports::getindex $source]
@@ -2177,10 +2194,13 @@
}
if {$needs_portindex} {
- global macports::prefix
- set indexdir [file dirname [macports::getindex $source]]
- if {[catch {system "${macports::prefix}/bin/portindex $indexdir"}]} {
- ui_error "updating PortIndex for $source failed"
+ set any_needed_portindex 1
+ if {![info exists options(no_reindex)]} {
+ global macports::prefix
+ set indexdir [file dirname [macports::getindex $source]]
+ if {[catch {system "${macports::prefix}/bin/portindex $indexdir"}]} {
+ ui_error "updating PortIndex for $source failed"
+ }
}
}
}
@@ -2612,7 +2632,7 @@
set workername [ditem_key $mport workername]
set deptypes [macports::_deptypes_for_target $target $workername]
- set subPorts {}
+ set depPorts {}
if {[llength $deptypes] > 0} {
array set optionsarray [ditem_key $mport options]
# avoid propagating requested flag from parent
@@ -2631,9 +2651,24 @@
continue
}
foreach depspec $portinfo($deptype) {
- # skip depspec/archs combos we've already seen
+ # skip depspec/archs combos we've already seen, and ones with less archs than ones we've seen
set seenkey "${depspec},[join $required_archs ,]"
+ set seen 0
if {[info exists depspec_seen($seenkey)]} {
+ set seen 1
+ } else {
+ set prev_seenkeys [array names depspec_seen ${depspec},*]
+ set nrequired [llength $required_archs]
+ foreach key $prev_seenkeys {
+ set key_archs [lrange [split $key ,] 1 end]
+ if {[llength $key_archs] > $nrequired} {
+ set seen 1
+ set seenkey $key
+ break
+ }
+ }
+ }
+ if {$seen} {
if {$depspec_seen($seenkey) != 0} {
# nonzero means the dep is not satisfied, so we have to record it
ditem_append_unique $mport requires $depspec_seen($seenkey)
@@ -2683,23 +2718,23 @@
set check_archs 0
}
lappend options subport $dep_portname
- # Figure out the subport. Check the open_mports list first, since
+ # Figure out the depport. Check the open_mports list first, since
# we potentially leak mport references if we mportopen each time,
# because mportexec only closes each open mport once.
- set subport [dlist_match_multi $macports::open_mports [list porturl $dep_portinfo(porturl) options $options variations $variations]]
+ set depport [dlist_match_multi $macports::open_mports [list porturl $dep_portinfo(porturl) options $options variations $variations]]
- if {$subport == {}} {
+ if {$depport == {}} {
# We haven't opened this one yet.
- set subport [mportopen $dep_portinfo(porturl) $options $variations]
+ set depport [mportopen $dep_portinfo(porturl) $options $variations]
}
}
# check archs
if {$parse && $check_archs
- && ![macports::_mport_supports_archs $subport $required_archs]} {
+ && ![macports::_mport_supports_archs $depport $required_archs]} {
- set supported_archs [_mportkey $subport supported_archs]
- mportclose $subport
+ set supported_archs [_mportkey $depport supported_archs]
+ mportclose $depport
set arch_mismatch 1
set has_universal 0
if {[info exists dep_portinfo(variants)] && [lsearch -exact $dep_portinfo(variants) universal] != -1} {
@@ -2710,8 +2745,8 @@
if {![info exists variation_array(universal)] || $variation_array(universal) != "+"} {
set variation_array(universal) +
# try again with +universal
- set subport [mportopen $dep_portinfo(porturl) $options [array get variation_array]]
- if {[macports::_mport_supports_archs $subport $required_archs]} {
+ set depport [mportopen $dep_portinfo(porturl) $options [array get variation_array]]
+ if {[macports::_mport_supports_archs $depport $required_archs]} {
set arch_mismatch 0
}
}
@@ -2725,24 +2760,24 @@
if {$parse} {
if {$recurseDeps} {
# Add to the list we need to recurse on.
- lappend subPorts $subport
+ lappend depPorts $depport
}
-
+
# Append the sub-port's provides to the port's requirements list.
- set subport_provides "[ditem_key $subport provides]"
- ditem_append_unique $mport requires $subport_provides
- set depspec_seen($seenkey) $subport_provides
+ set depport_provides "[ditem_key $depport provides]"
+ ditem_append_unique $mport requires $depport_provides
+ set depspec_seen($seenkey) $depport_provides
} else {
set depspec_seen($seenkey) 0
}
}
}
- # Loop on the subports.
+ # Loop on the depports.
if {$recurseDeps} {
- foreach subport $subPorts {
+ foreach depport $depPorts {
# Sub ports should be installed (all dependencies must be satisfied).
- set res [mportdepends $subport "" $recurseDeps $skipSatisfied 1]
+ set res [mportdepends $depport "" $recurseDeps $skipSatisfied 1]
if {$res != 0} {
return $res
}
@@ -2909,14 +2944,6 @@
set updatestatus no
}
- # syncing ports tree.
- if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
- ui_msg "---> Updating the ports tree"
- if {[catch {mportsync $optionslist} result]} {
- return -code error "Couldn't sync the ports tree: $result"
- }
- }
-
# are we syncing a tarball? (implies detached signature)
set is_tarball 0
if {[string range ${rsync_dir} end-3 end] == ".tar"} {
@@ -3005,6 +3032,20 @@
# check if we we need to rebuild base
set comp [vercmp $macports_version_new $macports::autoconf::macports_version]
+
+ # syncing ports tree.
+ if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
+ ui_msg "---> Updating the ports tree"
+ if {$comp > 0} {
+ # updated portfiles potentially need new base to parse - tell sync to try to
+ # use prefabricated PortIndex files and signal if it couldn't
+ lappend optionslist no_reindex 1 needed_portindex_var needed_portindex
+ }
+ if {[catch {mportsync $optionslist} result]} {
+ return -code error "Couldn't sync the ports tree: $result"
+ }
+ }
+
if {$use_the_force_luke == "yes" || $comp > 0} {
if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
ui_msg "---> MacPorts base is outdated, selfupdate would install $macports_version_new (dry run)"
@@ -3051,7 +3092,7 @@
# do the actual configure, build and installation of new base
ui_msg "Installing new MacPorts release in $prefix as $owner:$group; permissions $perms; Tcl-Package in $tclpackage\n"
- if { [catch { system "cd $mp_source_path && ${cc_arg}./configure $configure_args && make && make install" } result] } {
+ if { [catch { system "cd $mp_source_path && ${cc_arg}./configure $configure_args && make && make install SELFUPDATING=1" } result] } {
return -code error "Error installing new MacPorts base: $result"
}
if {[info exists updatestatus]} {
@@ -3072,8 +3113,13 @@
}
if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
- ui_msg "\nThe ports tree has been updated. To upgrade your installed ports, you should run"
- ui_msg " port upgrade outdated"
+ if {[info exists needed_portindex]} {
+ ui_msg "Not all sources could be fully synced using the old version of MacPorts."
+ ui_msg "Please run selfupdate again now that MacPorts base has been updated."
+ } else {
+ ui_msg "\nThe ports tree has been updated. To upgrade your installed ports, you should run"
+ ui_msg " port upgrade outdated"
+ }
}
return 0
Modified: branches/gsoc11-rev-upgrade/base/src/package1.0/portmpkg.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/package1.0/portmpkg.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/package1.0/portmpkg.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -192,7 +192,7 @@
set infofd [open ${infofile} w+]
puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
}
puts $infofd "<dict>
Modified: branches/gsoc11-rev-upgrade/base/src/package1.0/portpkg.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/package1.0/portpkg.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/package1.0/portpkg.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -181,7 +181,7 @@
set infofd [open ${infofile} w+]
puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
}
puts $infofd "<dict>
@@ -229,7 +229,7 @@
set infofd [open ${infofile} w+]
puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
}
puts $infofd "<dict>
Modified: branches/gsoc11-rev-upgrade/base/src/pextlib1.0/fs-traverse.c
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/pextlib1.0/fs-traverse.c 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/pextlib1.0/fs-traverse.c 2011-09-04 11:59:25 UTC (rev 83525)
@@ -249,8 +249,14 @@
}
}
/* check errno before calling fts_close in case it sets errno to 0 on success */
- if (errno != 0 || (fts_close(root_fts) != 0 && !(flags & F_IGNORE_ERRORS))) {
+ if (errno != 0) {
Tcl_SetErrno(errno);
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, root_fts->fts_path, ": ", (char *)Tcl_PosixError(interp), NULL);
+ fts_close(root_fts);
+ return TCL_ERROR;
+ } else if (fts_close(root_fts) != 0 && !(flags & F_IGNORE_ERRORS)) {
+ Tcl_SetErrno(errno);
Tcl_SetResult(interp, (char *)Tcl_PosixError(interp), TCL_STATIC);
return TCL_ERROR;
}
Property changes on: branches/gsoc11-rev-upgrade/base/src/pextlib1.0/sha2.c
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.c:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.c:78828-82613
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.c:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.c:44044-44692
+ /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.c:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.c:78828-83524
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.c:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.c:44044-44692
Property changes on: branches/gsoc11-rev-upgrade/base/src/pextlib1.0/sha2.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.h:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.h:78828-82613
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.h:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.h:44044-44692
+ /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.h:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.h:78828-83524
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.h:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.h:44044-44692
Property changes on: branches/gsoc11-rev-upgrade/base/src/pextlib1.0/sha256cmd.c
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.c:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.c:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.c:78828-82613
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.c:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.c:44044-44692
+ /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.c:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.c:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.c:78828-83524
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.c:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.c:44044-44692
Property changes on: branches/gsoc11-rev-upgrade/base/src/pextlib1.0/sha256cmd.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.h:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.h:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.h:78828-82613
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.h:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.h:44044-44692
+ /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.h:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.h:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.h:78828-83524
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.h:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.h:44044-44692
Modified: branches/gsoc11-rev-upgrade/base/src/port/port.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port/port.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/port/port.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -513,6 +513,43 @@
return [lsort -command portlist_compareint $list]
}
+# sort portlist so dependents come before their dependencies
+proc portlist_sortdependents { portlist } {
+ foreach p $portlist {
+ array set pvals $p
+ lappend entries($pvals(name)) $p
+ if {![info exists dependents($pvals(name))]} {
+ set dependents($pvals(name)) {}
+ foreach result [registry::list_dependents $pvals(name)] {
+ lappend dependents($pvals(name)) [lindex $result 2]
+ }
+ }
+ array unset pvals
+ }
+ set ret {}
+ foreach p $portlist {
+ portlist_sortdependents_helper $p entries dependents seen ret
+ }
+ return $ret
+}
+
+proc portlist_sortdependents_helper {p up_entries up_dependents up_seen up_retlist} {
+ upvar $up_seen seen
+ if {![info exists seen($p)]} {
+ set seen($p) 1
+ upvar $up_entries entries $up_dependents dependents $up_retlist retlist
+ array set pvals $p
+ foreach dependent $dependents($pvals(name)) {
+ if {[info exists entries($dependent)]} {
+ foreach entry $entries($dependent) {
+ portlist_sortdependents_helper $entry entries dependents seen retlist
+ }
+ }
+ }
+ lappend retlist $p
+ }
+}
+
proc regex_pat_sanitize { s } {
set sanitized [regsub -all {[\\(){}+$.^]} $s {\\&}]
return $sanitized
@@ -2336,6 +2373,7 @@
if {[require_portlist portlist] || [prefix_unwritable]} {
return 1
}
+ set portlist [portlist_sortdependents $portlist]
foreachport $portlist {
set composite_version [composite_version $portversion [array get variations]]
if {![info exists options(ports_deactivate_no-exec)]
@@ -2913,6 +2951,8 @@
return 1
}
+ set portlist [portlist_sortdependents $portlist]
+
foreachport $portlist {
if {![registry::entry_exists_for_name $portname]} {
ui_info "$portname is already uninstalled"
@@ -4655,6 +4695,9 @@
# interactive mode
if { [llength $remaining_args] == 0 && ![info exists ui_options(ports_commandfiles)] } {
lappend ui_options(ports_commandfiles) -
+} elseif {[lookahead] == "selfupdate" || [lookahead] == "sync"} {
+ # tell mportinit not to tell the user they should selfupdate
+ set ui_options(ports_no_old_index_warning) 1
}
# Initialize mport
Modified: branches/gsoc11-rev-upgrade/base/src/port1.0/portchecksum.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port1.0/portchecksum.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/port1.0/portchecksum.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -86,7 +86,7 @@
&& [expr $nb_checksum / 2] <= $checksum_types_count
&& [lsearch -exact $checksum_types [lindex $checksums_str 0]] >= 0} {
# Convert to format #2
- set checksums_str [linsert $checksums_str 0 $all_dist_files]
+ set checksums_str [linsert $checksums_str 0 [lindex $all_dist_files 0]]
# We increased the size.
incr nb_checksum
}
Modified: branches/gsoc11-rev-upgrade/base/src/port1.0/portdistcheck.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port1.0/portdistcheck.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/port1.0/portdistcheck.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -47,15 +47,11 @@
}
# define options
-options distcheck.type distcheck.check
+options distcheck.type
# defaults
default distcheck.type moddate
-default distcheck.check moddate
-# Deprecation
-option_deprecate distcheck.check distcheck.type
-
proc portdistcheck::distcheck_main {args} {
global distcheck.type
global fetch.type
Modified: branches/gsoc11-rev-upgrade/base/src/port1.0/portfetch.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port1.0/portfetch.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/port1.0/portfetch.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -104,7 +104,7 @@
default hg.tag {tip}
# Set distfiles
-default distfiles {[portfetch::suffix $distname]}
+default distfiles {[list [portfetch::suffix $distname]]}
default dist_subdir {${name}}
# user name & password
@@ -122,9 +122,6 @@
default mirror_sites.listfile {"mirror_sites.tcl"}
default mirror_sites.listpath {"port1.0/fetch"}
-# Deprecation
-option_deprecate svn.tag svn.revision
-
# Option-executed procedures
option_proc use_bzip2 portfetch::set_extract_type
option_proc use_lzma portfetch::set_extract_type
@@ -168,6 +165,9 @@
proc portfetch::set_fetch_type {option action args} {
global os.platform os.major
if {[string equal ${action} "set"]} {
+ if {$args != "standard"} {
+ distfiles
+ }
switch $args {
bzr {
depends_fetch-append bin:bzr:bzr
@@ -207,16 +207,8 @@
# Given a distname, return the distname with extract.suffix appended
proc portfetch::suffix {distname} {
- global extract.suffix fetch.type
- switch -- "${fetch.type}" {
- bzr -
- cvs -
- svn -
- git -
- hg { return "" }
- standard -
- default { return "${distname}${extract.suffix}" }
- }
+ global extract.suffix
+ return "${distname}${extract.suffix}"
}
# XXX import suffix into the global namespace as it is currently used from
# Portfiles, but should better go somewhere else
@@ -229,7 +221,7 @@
if {[info exists patchfiles]} {
foreach file $patchfiles {
- if {![file exists $filespath/$file]} {
+ if {![file exists "${filespath}/${file}"]} {
set distsite [getdisttag $file]
set file [getdistname $file]
lappend all_dist_files $file
@@ -252,7 +244,7 @@
if {[info exists distfiles]} {
foreach file $distfiles {
- if {![file exists $filespath/$file]} {
+ if {![file exists "${filespath}/${file}"]} {
set distsite [getdisttag $file]
set file [getdistname $file]
lappend all_dist_files $file
Modified: branches/gsoc11-rev-upgrade/base/src/port1.0/portlivecheck.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port1.0/portlivecheck.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/port1.0/portlivecheck.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -47,11 +47,10 @@
}
# define options
-options livecheck.url livecheck.type livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version livecheck.ignore_sslcert
+options livecheck.url livecheck.type livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version livecheck.ignore_sslcert
# defaults
default livecheck.url {$homepage}
-default livecheck.check default
default livecheck.type default
default livecheck.md5 ""
default livecheck.regex ""
@@ -60,9 +59,6 @@
default livecheck.version {$version}
default livecheck.ignore_sslcert yes
-# Deprecation
-option_deprecate livecheck.check livecheck.type
-
proc portlivecheck::livecheck_main {args} {
global livecheck.url livecheck.type livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version
global livecheck.ignore_sslcert
Modified: branches/gsoc11-rev-upgrade/base/src/port1.0/portstartupitem.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port1.0/portstartupitem.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/port1.0/portstartupitem.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -573,7 +573,7 @@
set plist [open "${destroot}${itemdir}/${plistname}" w 0644]
puts ${plist} "<?xml version='1.0' encoding='UTF-8'?>"
- puts ${plist} "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\""
+ puts ${plist} "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\""
puts ${plist} "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\" >"
puts ${plist} "<plist version='1.0'>"
puts ${plist} "<dict>"
Modified: branches/gsoc11-rev-upgrade/base/src/port1.0/portutil.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port1.0/portutil.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/port1.0/portutil.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -132,11 +132,11 @@
}
##
-# Handle option-replace
+# Handle option-strsed
#
# @param option name of the option
# @param args arguments
-proc handle_option-replace {option args} {
+proc handle_option-strsed {option args} {
global $option user_options option_procs
if {![info exists user_options($option)] && [info exists $option]} {
@@ -148,6 +148,36 @@
}
}
+##
+# Handle option-replace
+#
+# @param option name of the option
+# @param args arguments
+proc handle_option-replace {option args} {
+ global $option user_options option_procs deprecated_options
+
+ # Deprecate -replace with only one argument, for backwards compatibility call -strsed
+ # XXX: Remove this in 2.2.0
+ if {[llength $args] == 1} {
+ if {![info exists deprecated_options(${option}-replace)]} {
+ set deprecated_options(${option}-replace) [list ${option}-strsed 0]
+ }
+ set refcount [lindex $deprecated_options(${option}-replace) 1]
+ lset deprecated_options(${option}-replace) 1 [expr $refcount + 1]
+ return [eval handle_option-strsed $option $args]
+ }
+
+ if {![info exists user_options($option)] && [info exists $option]} {
+ foreach {old new} $args {
+ set index [lsearch -exact [set $option] $old]
+ if {$index == -1} {
+ continue
+ }
+ set $option [lreplace [set $option] $index $index $new]
+ }
+ }
+}
+
# options
# Exports options in an array as externally callable procedures
# Thus, "options name date" would create procedures named "name"
@@ -160,6 +190,7 @@
interp alias {} $option {} handle_option $option
interp alias {} $option-append {} handle_option-append $option
interp alias {} $option-delete {} handle_option-delete $option
+ interp alias {} $option-strsed {} handle_option-strsed $option
interp alias {} $option-replace {} handle_option-replace $option
}
}
Modified: branches/gsoc11-rev-upgrade/base/src/registry2.0/portimage.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/registry2.0/portimage.tcl 2011-09-04 11:34:43 UTC (rev 83524)
+++ branches/gsoc11-rev-upgrade/base/src/registry2.0/portimage.tcl 2011-09-04 11:59:25 UTC (rev 83525)
@@ -289,7 +289,8 @@
# extract an archive to a temporary location
# returns: path to the extracted directory
proc extract_archive_to_tmpdir {location} {
- set extractdir [mkdtemp [::file join [macports::gettmpdir] mpextractXXXXXXXX]]
+ global macports::registry.path
+ set extractdir [mkdtemp [::file dirname $location]/mpextractXXXXXXXX]
set startpwd [pwd]
try {
Property changes on: branches/gsoc11-rev-upgrade/base/src/registry2.0/receipt_sqlite.tcl
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base/src/registry1.0/receipt_sqlite.tcl:37343-46937
/branches/gsoc09-logging/base/src/registry1.0/receipt_sqlite.tcl:51231-60371
/branches/universal-sanity/base/src/registry1.0/receipt_sqlite.tcl:51872-52323
/branches/variant-descs-14482/base/src/registry1.0/receipt_sqlite.tcl:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/registry2.0/receipt_sqlite.tcl:78828-82613
/users/perry/base-bugs_and_notes/src/registry1.0/receipt_sqlite.tcl:45682-46060
/users/perry/base-select/src/registry1.0/receipt_sqlite.tcl:44044-44692
+ /branches/gsoc08-privileges/base/src/registry1.0/receipt_sqlite.tcl:37343-46937
/branches/gsoc09-logging/base/src/registry1.0/receipt_sqlite.tcl:51231-60371
/branches/universal-sanity/base/src/registry1.0/receipt_sqlite.tcl:51872-52323
/branches/variant-descs-14482/base/src/registry1.0/receipt_sqlite.tcl:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/registry2.0/receipt_sqlite.tcl:78828-83524
/users/perry/base-bugs_and_notes/src/registry1.0/receipt_sqlite.tcl:45682-46060
/users/perry/base-select/src/registry1.0/receipt_sqlite.tcl:44044-44692
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110904/2ab0eeae/attachment-0001.html>
More information about the macports-changes
mailing list