[84763] branches/gsoc11-statistics/base

derek at macports.org derek at macports.org
Fri Sep 30 15:54:17 PDT 2011


Revision: 84763
          http://trac.macports.org/changeset/84763
Author:   derek at macports.org
Date:     2011-09-30 15:54:17 -0700 (Fri, 30 Sep 2011)
Log Message:
-----------
Merge from trunk

Modified Paths:
--------------
    branches/gsoc11-statistics/base/ChangeLog
    branches/gsoc11-statistics/base/Makefile.in
    branches/gsoc11-statistics/base/config/RELEASE_URL
    branches/gsoc11-statistics/base/portmgr/ReleaseProcess
    branches/gsoc11-statistics/base/portmgr/dmg/postflight
    branches/gsoc11-statistics/base/portmgr/jobs/mirror_macports.sh
    branches/gsoc11-statistics/base/portmgr/jobs/org.macports.PortIndex2MySQL.plist
    branches/gsoc11-statistics/base/portmgr/jobs/org.macports.mprsyncup.plist
    branches/gsoc11-statistics/base/portmgr/jobs/port_binary_distributable.tcl
    branches/gsoc11-statistics/base/portmgr/packaging/mpkgall.tcl
    branches/gsoc11-statistics/base/src/cregistry/entry.c
    branches/gsoc11-statistics/base/src/cregistry/registry.c
    branches/gsoc11-statistics/base/src/macports1.0/macports.tcl
    branches/gsoc11-statistics/base/src/package1.0/portmpkg.tcl
    branches/gsoc11-statistics/base/src/package1.0/portpkg.tcl
    branches/gsoc11-statistics/base/src/pextlib1.0/curl.c
    branches/gsoc11-statistics/base/src/pextlib1.0/fs-traverse.c
    branches/gsoc11-statistics/base/src/port/port.tcl
    branches/gsoc11-statistics/base/src/port1.0/portchecksum.tcl
    branches/gsoc11-statistics/base/src/port1.0/portdistfiles.tcl
    branches/gsoc11-statistics/base/src/port1.0/portfetch.tcl
    branches/gsoc11-statistics/base/src/port1.0/portlint.tcl
    branches/gsoc11-statistics/base/src/port1.0/portstartupitem.tcl
    branches/gsoc11-statistics/base/src/port1.0/portutil.tcl
    branches/gsoc11-statistics/base/src/registry2.0/portimage.tcl
    branches/gsoc11-statistics/base/tests/Makefile

Added Paths:
-----------
    branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/
    branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/Portfile
    branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/master

Removed Paths:
-------------
    branches/gsoc11-statistics/base/tests/test/cvs-and-patchsites/
    branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/Portfile
    branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/master

Property Changed:
----------------
    branches/gsoc11-statistics/base/
    branches/gsoc11-statistics/base/portmgr/fedora/macports.spec
    branches/gsoc11-statistics/base/src/pextlib1.0/sha2.c
    branches/gsoc11-statistics/base/src/pextlib1.0/sha2.h
    branches/gsoc11-statistics/base/src/pextlib1.0/sha256cmd.c
    branches/gsoc11-statistics/base/src/pextlib1.0/sha256cmd.h
    branches/gsoc11-statistics/base/src/registry2.0/receipt_sqlite.tcl


Property changes on: branches/gsoc11-statistics/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:78736-82922
/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:78736-84762
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/gsoc11-statistics/base/ChangeLog
===================================================================
--- branches/gsoc11-statistics/base/ChangeLog	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/ChangeLog	2011-09-30 22:54:17 UTC (rev 84763)
@@ -3,11 +3,52 @@
 # $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.3 (2011-09-05 by raimue)
+    - Fix a regression introduced in 2.0.2 when fetching with a VCS
+      (#31073, jmr in r83471)
+
+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-statistics/base/Makefile.in
===================================================================
--- branches/gsoc11-statistics/base/Makefile.in	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/Makefile.in	2011-09-30 22:54:17 UTC (rev 84763)
@@ -90,9 +90,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-statistics/base/config/RELEASE_URL
===================================================================
--- branches/gsoc11-statistics/base/config/RELEASE_URL	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/config/RELEASE_URL	2011-09-30 22:54:17 UTC (rev 84763)
@@ -1 +1 @@
-https://svn.macports.org/repository/macports/tags/release_2_0_1/base
+https://svn.macports.org/repository/macports/tags/release_2_0_3/base

Modified: branches/gsoc11-statistics/base/portmgr/ReleaseProcess
===================================================================
--- branches/gsoc11-statistics/base/portmgr/ReleaseProcess	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/portmgr/ReleaseProcess	2011-09-30 22:54:17 UTC (rev 84763)
@@ -129,7 +129,7 @@
 All these tarballs are uploaded to the http://distfiles.macports.org/MacPorts/ directory. At present, this must
 be done with the help of the MacOSForge sysadmin.
 
-Additionally, a file is created, and posted to the same location, that contains md5, sha1, and rmd160 checksums
+Additionally, a file is created, and posted to the same location, that contains md5, sha1, rmd160, and sha256 checksums
 for each of the files:
 
  MacPorts-2.0.0.chk.txt

Modified: branches/gsoc11-statistics/base/portmgr/dmg/postflight
===================================================================
--- branches/gsoc11-statistics/base/portmgr/dmg/postflight	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/portmgr/dmg/postflight	2011-09-30 22:54:17 UTC (rev 84763)
@@ -87,19 +87,19 @@
 # backing up the original only if it exists and if it doesn't contain the ${OUR_STRING} identification string,
 # which hints that we've already tweaked it and therefore already backed it up.
 function write_setting () {
-    if [[ -f ${HOME}/.${CONF_FILE} ]] && ! grep "${OUR_STRING}" ${HOME}/.${CONF_FILE} > /dev/null; then
+    if [[ -f "${HOME}/.${CONF_FILE}" ]] && ! grep "${OUR_STRING}" "${HOME}/.${CONF_FILE}" > /dev/null; then
         echo "Backing up your ${HOME}/.${CONF_FILE} shell confguration file as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX} before adapting it for MacPorts."
-        /bin/cp -fp ${HOME}/.${CONF_FILE} "${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}" || {
+        /bin/cp -fp "${HOME}/.${CONF_FILE}" "${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}" || {
             echo "An attempt to backup your original configuration file failed! Please set your MacPorts compatible environment manually."
             update_macports
             exit 1
         }
-        echo -e "\n##\n# Your previous ${HOME}/.${CONF_FILE} file was backed up as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}\n##" >> ${HOME}/.${CONF_FILE}
+        echo -e "\n##\n# Your previous ${HOME}/.${CONF_FILE} file was backed up as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}\n##" >> "${HOME}/.${CONF_FILE}"
     fi
-    echo -e "\n# ${OUR_STRING}: adding an appropriate ${1} variable for use with MacPorts." >> ${HOME}/.${CONF_FILE}
-    echo "${ENV_COMMAND} ${1}${ASSIGN}${2}" >> ${HOME}/.${CONF_FILE}
-    echo -e "# Finished adapting your ${1} environment variable for use with MacPorts.\n" >> ${HOME}/.${CONF_FILE}
-    chown ${USER} ${HOME}/.${CONF_FILE} || echo "Warning: unable to adapt permissions on your ${HOME}/.${CONF_FILE} shell configuration file!"
+    echo -e "\n# ${OUR_STRING}: adding an appropriate ${1} variable for use with MacPorts." >> "${HOME}/.${CONF_FILE}"
+    echo "${ENV_COMMAND} ${1}${ASSIGN}${2}" >> "${HOME}/.${CONF_FILE}"
+    echo -e "# Finished adapting your ${1} environment variable for use with MacPorts.\n" >> "${HOME}/.${CONF_FILE}"
+    chown ${USER} "${HOME}/.${CONF_FILE}" || echo "Warning: unable to adapt permissions on your ${HOME}/.${CONF_FILE} shell configuration file!"
     echo "An appropriate ${1} variable has been added to your shell environment by the MacPorts installer."
 }
 
@@ -204,9 +204,9 @@
         LOGIN_FLAG=""
         ENV_COMMAND="setenv"
         ASSIGN=" "
-        if [[ -f ${HOME}/.tcshrc ]]; then
+        if [[ -f "${HOME}/.tcshrc" ]]; then
             CONF_FILE=tcshrc
-        elif [[ -f ${HOME}/.cshrc ]]; then
+        elif [[ -f "${HOME}/.cshrc" ]]; then
             CONF_FILE=cshrc
         else
             CONF_FILE=tcshrc
@@ -217,9 +217,9 @@
         LOGIN_FLAG="-l"
         ENV_COMMAND="export"
         ASSIGN="="
-        if [[ -f ${HOME}/.bash_profile ]]; then
+        if [[ -f "${HOME}/.bash_profile" ]]; then
             CONF_FILE=bash_profile
-        elif [[ -f ${HOME}/.bash_login ]]; then
+        elif [[ -f "${HOME}/.bash_login" ]]; then
             CONF_FILE=bash_login
         else
             CONF_FILE=profile
@@ -269,6 +269,7 @@
 
 # Postflight script is done with its job, update MacPorts and exit gracefully!
 update_macports
-echo "You have succesfully installed the MacPorts system, launch a terminal and try it out!"
-echo "Read the port(1) manual page and http://guide.macports.org for help, http://www.macports.org/contact.php if you need to get in touch with The MacPorts Project."
+echo "You have successfully installed the MacPorts system. Launch a terminal and try it out!"
+echo "Read the port(1) manual page and http://guide.macports.org/ for help."
+echo "See http://www.macports.org/contact.php if you need to get in touch with The MacPorts Project."
 exit 0


Property changes on: branches/gsoc11-statistics/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:78736-82922
/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:78736-84762
/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-statistics/base/portmgr/jobs/mirror_macports.sh
===================================================================
--- branches/gsoc11-statistics/base/portmgr/jobs/mirror_macports.sh	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/portmgr/jobs/mirror_macports.sh	2011-09-30 22:54:17 UTC (rev 84763)
@@ -7,7 +7,7 @@
 ####
 
 # regexp of ports that we do not mirror
-EXCLUSIONS='^(molden)$'
+EXCLUSIONS='^(molden|metis)$'
 
 # macports really wants this, so lets appease it
 export COLUMNS=80

Modified: branches/gsoc11-statistics/base/portmgr/jobs/org.macports.PortIndex2MySQL.plist
===================================================================
--- branches/gsoc11-statistics/base/portmgr/jobs/org.macports.PortIndex2MySQL.plist	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/portmgr/jobs/org.macports.PortIndex2MySQL.plist	2011-09-30 22:54:17 UTC (rev 84763)
@@ -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-statistics/base/portmgr/jobs/org.macports.mprsyncup.plist
===================================================================
--- branches/gsoc11-statistics/base/portmgr/jobs/org.macports.mprsyncup.plist	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/portmgr/jobs/org.macports.mprsyncup.plist	2011-09-30 22:54:17 UTC (rev 84763)
@@ -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-statistics/base/portmgr/jobs/port_binary_distributable.tcl
===================================================================
--- branches/gsoc11-statistics/base/portmgr/jobs/port_binary_distributable.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/portmgr/jobs/port_binary_distributable.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -34,25 +34,39 @@
 # 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
-                   php psf qpl public-domain restrictive/distributable ruby sleepycat
-                   ssleay tcl/tk x11 zlib zpl}
+set good_licenses {afl agpl apache apsl artistic autoconf boost bsd cecill \
+                   copyleft cpl curl epl fontconfig freebsd freetype gd gfdl \
+                   gpl gplconflict ibmpl ijg isc jasper lgpl libpng libtool \
+                   lppl mit mpl ncsa noncommercial openssl permissive php \
+                   psf public-domain qpl restrictive/distributable ruby \
+                   sleepycat ssleay tcl/tk w3c wtfpl x11 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 epl gd gplconflict ibmpl lppl mpl noncommercial openssl php qpl restrictive/distributable ruby ssleay zpl-1}
+    epl {cecill gpl}
     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 epl 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 +74,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-statistics/base/portmgr/packaging/mpkgall.tcl
===================================================================
--- branches/gsoc11-statistics/base/portmgr/packaging/mpkgall.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/portmgr/packaging/mpkgall.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -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-statistics/base/src/cregistry/entry.c
===================================================================
--- branches/gsoc11-statistics/base/src/cregistry/entry.c	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/cregistry/entry.c	2011-09-30 22:54:17 UTC (rev 84763)
@@ -262,8 +262,14 @@
         char* revision, char* variants, char* epoch, reg_error* errPtr) {
     sqlite3_stmt* stmt = NULL;
     reg_entry* entry = NULL;
-    char* query = "SELECT id FROM registry.ports WHERE name=? AND version=? "
+    char* query;
+    if (strlen(epoch) > 0) {
+        query = "SELECT id FROM registry.ports WHERE name=? AND version=? "
         "AND revision=? AND variants=? AND epoch=?";
+    } else {
+        query = "SELECT id FROM registry.ports WHERE name=? AND version=? "
+        "AND revision=? AND variants=? AND epoch!=?";
+    }
     if ((sqlite3_prepare(reg->db, query, -1, &stmt, NULL) == SQLITE_OK)
             && (sqlite3_bind_text(stmt, 1, name, -1, SQLITE_STATIC)
                 == SQLITE_OK)

Modified: branches/gsoc11-statistics/base/src/cregistry/registry.c
===================================================================
--- branches/gsoc11-statistics/base/src/cregistry/registry.c	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/cregistry/registry.c	2011-09-30 22:54:17 UTC (rev 84763)
@@ -109,6 +109,12 @@
         return 0;
     }
     if (sqlite3_open(NULL, &reg->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;
@@ -187,10 +193,8 @@
             if (!(sb.st_mode & S_IWGRP)) {
                 can_write = 0;
             }
-        } else {
-            if (!(sb.st_mode & S_IWOTH)) {
-                can_write = 0;
-            }
+        } else if (!(sb.st_mode & S_IWOTH) && getuid() != 0) {
+            can_write = 0;
         }
     }
     if (initialized || can_write) {

Modified: branches/gsoc11-statistics/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/macports1.0/macports.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/macports1.0/macports.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -874,14 +874,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
     }
@@ -889,6 +892,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} {
@@ -896,8 +922,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)
@@ -926,29 +958,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"
@@ -996,14 +1005,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]
@@ -1675,6 +1686,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"
         }
@@ -1968,6 +1980,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
 
@@ -2095,8 +2110,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]]]
@@ -2110,8 +2127,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
@@ -2119,6 +2138,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 {
@@ -2140,7 +2160,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]} {
@@ -2202,8 +2221,6 @@
                     }
 
                     file delete $tarpath
-                    
-                    set needs_portindex 1
                 } else {
                     # sync just a PortIndex file
                     set indexfile [macports::getindex $source]
@@ -2218,10 +2235,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"
+                }
             }
         }
     }
@@ -2672,9 +2692,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)
@@ -2950,14 +2985,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"} {
@@ -3046,6 +3073,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)"
@@ -3092,7 +3133,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]} {
@@ -3113,8 +3154,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-statistics/base/src/package1.0/portmpkg.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/package1.0/portmpkg.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/package1.0/portmpkg.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -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-statistics/base/src/package1.0/portpkg.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/package1.0/portpkg.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/package1.0/portpkg.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -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-statistics/base/src/pextlib1.0/curl.c
===================================================================
--- branches/gsoc11-statistics/base/src/pextlib1.0/curl.c	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/pextlib1.0/curl.c	2011-09-30 22:54:17 UTC (rev 84763)
@@ -238,6 +238,20 @@
 			break;
 		}
 
+#if LIBCURL_VERSION_NUM == 0x071307
+        /* FTP_PROXY workaround for Snow Leopard */
+        if (strncmp(theURL, "ftp:", 4) == 0) {
+            char *ftp_proxy = getenv("FTP_PROXY");
+            if (ftp_proxy) {
+                theCurlCode = curl_easy_setopt(theHandle, CURLOPT_PROXY, ftp_proxy);
+                if (theCurlCode != CURLE_OK) {
+                    theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
+                    break;
+                }
+            }
+        }
+#endif
+
 		/* -L option */
 		theCurlCode = curl_easy_setopt(theHandle, CURLOPT_FOLLOWLOCATION, 1);
 		if (theCurlCode != CURLE_OK) {

Modified: branches/gsoc11-statistics/base/src/pextlib1.0/fs-traverse.c
===================================================================
--- branches/gsoc11-statistics/base/src/pextlib1.0/fs-traverse.c	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/pextlib1.0/fs-traverse.c	2011-09-30 22:54:17 UTC (rev 84763)
@@ -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-statistics/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:78736-82922
/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:78736-84762
/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-statistics/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:78736-82922
/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:78736-84762
/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-statistics/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:78736-82922
/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:78736-84762
/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-statistics/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:78736-82922
/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:78736-84762
/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-statistics/base/src/port/port.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/port/port.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/port/port.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -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)]
@@ -3092,6 +3130,8 @@
         return 1
     }
 
+    set portlist [portlist_sortdependents $portlist]
+
     foreachport $portlist {
         if {![registry::entry_exists_for_name $portname]} {
             ui_info "$portname is already uninstalled"
@@ -4834,6 +4874,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-statistics/base/src/port1.0/portchecksum.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/port1.0/portchecksum.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/port1.0/portchecksum.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -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-statistics/base/src/port1.0/portdistfiles.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/port1.0/portdistfiles.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/port1.0/portdistfiles.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -53,10 +53,12 @@
 }
 
 proc portdistfiles::distfiles_main {args} {
-    global UI_PREFIX master_sites checksums_array portdbpath dist_subdir all_dist_files
+    global UI_PREFIX master_sites patch_sites patchfiles checksums_array \
+           portdbpath dist_subdir all_dist_files
     
     # give up on ports that do not provide URLs
-    if {![info exists master_sites] || $master_sites == "{}"} {
+    if {(![info exists master_sites] || $master_sites == "{}")
+        && (![info exists patchfiles] || ![info exists patch_sites] || $patch_sites == "{}")} {
         return 0
     }
 

Modified: branches/gsoc11-statistics/base/src/port1.0/portfetch.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/port1.0/portfetch.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/port1.0/portfetch.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -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
@@ -165,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
@@ -204,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
@@ -226,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
@@ -249,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
@@ -284,6 +279,7 @@
 
 # Perform a bzr fetch
 proc portfetch::bzrfetch {args} {
+    global patchfiles
     if {[catch {command_exec bzr "" "2>&1"} result]} {
         return -code error [msgcat::mc "Bazaar checkout failed"]
     }
@@ -343,7 +339,7 @@
 
 # Perform an svn fetch
 proc portfetch::svnfetch {args} {
-    global svn.args svn.method svn.revision svn.url
+    global svn.args svn.method svn.revision svn.url patchfiles
 
     if {[regexp {\s} ${svn.url}]} {
         return -code error [msgcat::mc "Subversion URL cannot contain whitespace"]
@@ -367,7 +363,7 @@
 
 # Perform a git fetch
 proc portfetch::gitfetch {args} {
-    global worksrcpath
+    global worksrcpath patchfiles
     global git.url git.branch git.sha1 git.cmd
 
     set options "-q"
@@ -399,7 +395,7 @@
 
 # Perform a mercurial fetch.
 proc portfetch::hgfetch {args} {
-    global worksrcpath prefix_frozen
+    global worksrcpath prefix_frozen patchfiles
     global hg.url hg.tag hg.cmd
 
     set cmdstring "${hg.cmd} clone --rev ${hg.tag} ${hg.url} ${worksrcpath} 2>&1"

Modified: branches/gsoc11-statistics/base/src/port1.0/portlint.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/port1.0/portlint.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/port1.0/portlint.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -43,6 +43,7 @@
     "homepage" \
     "master_sites" \
     "checksums" \
+    "license"
     ]
 
 set lint_optional [list \
@@ -289,7 +290,7 @@
     global version revision epoch
     set portarch [get_canonical_archs]
     global description long_description platforms categories all_variants
-    global maintainers homepage master_sites checksums patchfiles
+    global maintainers license homepage master_sites checksums patchfiles
     global depends_fetch depends_extract depends_lib depends_build depends_run distfiles fetch.type
     
     global lint_portsystem lint_platforms
@@ -500,6 +501,11 @@
         incr warnings
     }
 
+    if {[string match "unknown" $license]} {
+        ui_error "$license license"
+        incr errors
+    }
+
     # these checks are only valid for ports stored in the regular tree directories
     if {[info exists category] && $portcatdir != $category} {
         ui_error "Portfile parent directory $portcatdir does not match primary category $category"

Modified: branches/gsoc11-statistics/base/src/port1.0/portstartupitem.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/port1.0/portstartupitem.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/port1.0/portstartupitem.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -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-statistics/base/src/port1.0/portutil.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/port1.0/portutil.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/port1.0/portutil.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -1511,7 +1511,7 @@
             ui_debug "Skipping $target ($subport) since this port is already installed"
             return 0
         } elseif {$target == "activate"} {
-            set regref [registry_open $subport $version $revision $portvariants $epoch]
+            set regref [registry_open $subport $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 ($subport @${version}_${revision}${portvariants}) since this port is already active"

Modified: branches/gsoc11-statistics/base/src/registry2.0/portimage.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/registry2.0/portimage.tcl	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/src/registry2.0/portimage.tcl	2011-09-30 22:54:17 UTC (rev 84763)
@@ -576,10 +576,14 @@
 array set precious_dirs { /Library/LaunchDaemons 1 /Library/LaunchAgents 1 }
 
 proc _deactivate_file {dstfile} {
-    if { [file type $dstfile] == "link" } {
+    if {[catch {file type $dstfile} filetype]} {
+        ui_debug "$dstfile does not exist"
+        return
+    }
+    if { $filetype == "link" } {
         ui_debug "deactivating link: $dstfile"
         file delete -- $dstfile
-    } elseif { [file isdirectory $dstfile] } {
+    } elseif { $filetype == "directory" } {
         # 0 item means empty.
         if { [llength [readdir $dstfile]] == 0 } {
             variable precious_dirs


Property changes on: branches/gsoc11-statistics/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:78736-82922
/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:78736-84762
/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

Modified: branches/gsoc11-statistics/base/tests/Makefile
===================================================================
--- branches/gsoc11-statistics/base/tests/Makefile	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/tests/Makefile	2011-09-30 22:54:17 UTC (rev 84763)
@@ -1,6 +1,6 @@
 include ../Mk/macports.autoconf.mk
 
-TESTS?=checksums-1 cvs-and-patchsites envvariables site-tags trace universal universal-2 xcodeversion dependencies-c dependencies-d dependencies-e case-insensitive-deactivate variants
+TESTS?=checksums-1 svn-and-patchsites envvariables site-tags trace universal universal-2 xcodeversion dependencies-c dependencies-d dependencies-e case-insensitive-deactivate variants
 
 PWD=$(shell pwd)
 


Property changes on: branches/gsoc11-statistics/base/tests/test/svn-and-patchsites
___________________________________________________________________
Added: svn:ignore
   + output


Deleted: branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/Portfile
===================================================================
--- trunk/base/tests/test/svn-and-patchsites/Portfile	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/Portfile	2011-09-30 22:54:17 UTC (rev 84763)
@@ -1,39 +0,0 @@
-# $Id$
-
-PortSystem 1.0
-
-name		svn-and-patchsites
-version		1
-categories	test
-maintainers	nomaintainer
-description	Test port for svn+distant patchfiles functionalities
-homepage	http://www.macports.org/
-platforms	darwin
-
-long_description ${description}
-
-fetch.type          svn
-svn.url             http://svn.pythonmac.org/altgraph/altgraph/tags/altgraph-0.7.0/
-worksrcdir          altgraph-0.7.0
-
-patch_sites      http://home.uchicago.edu/~dgc/sw/mutt/
-patchfiles       patch-1.5.14.dgc.xlabel_ext.9
-checksums        patch-1.5.14.dgc.xlabel_ext.9 md5 c5badc733020187b6677f31b343195e8
-
-# Set depends_fetch to be empty to remove the dependency on svn added by base,
-# as it is not available in the test suite. Otherwise MacPorts will try to
-# verify a subversion port exists.
-depends_fetch
-
-# disable the patch phase in case the svn code gets out of sync with the patch.
-patch		{}
-extract		{}
-configure	{}
-build		{}
-destroot	{
-	system "touch ${destroot}${prefix}/lib/${name}"
-}
-
-test {
-	# test is actually running the fetch target
-}

Copied: branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/Portfile (from rev 84762, trunk/base/tests/test/svn-and-patchsites/Portfile)
===================================================================
--- branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/Portfile	                        (rev 0)
+++ branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/Portfile	2011-09-30 22:54:17 UTC (rev 84763)
@@ -0,0 +1,39 @@
+# $Id$
+
+PortSystem 1.0
+
+name		svn-and-patchsites
+version		1
+categories	test
+maintainers	nomaintainer
+description	Test port for svn+distant patchfiles functionalities
+homepage	http://www.macports.org/
+platforms	darwin
+
+long_description ${description}
+
+fetch.type          svn
+svn.url             http://svn.pythonmac.org/altgraph/altgraph/tags/altgraph-0.7.0/
+worksrcdir          altgraph-0.7.0
+
+patch_sites      http://home.uchicago.edu/~dgc/sw/mutt/
+patchfiles       patch-1.5.14.dgc.xlabel_ext.9
+checksums        patch-1.5.14.dgc.xlabel_ext.9 md5 c5badc733020187b6677f31b343195e8
+
+# Set depends_fetch to be empty to remove the dependency on svn added by base,
+# as it is not available in the test suite. Otherwise MacPorts will try to
+# verify a subversion port exists.
+depends_fetch
+
+# disable the patch phase in case the svn code gets out of sync with the patch.
+patch		{}
+extract		{}
+configure	{}
+build		{}
+destroot	{
+	system "touch ${destroot}${prefix}/lib/${name}"
+}
+
+test {
+	# test is actually running the fetch target
+}

Deleted: branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/master
===================================================================
--- trunk/base/tests/test/svn-and-patchsites/master	2011-09-30 21:40:29 UTC (rev 84762)
+++ branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/master	2011-09-30 22:54:17 UTC (rev 84763)
@@ -1,7 +0,0 @@
---->  Fetching svn-and-patchsites
---->  Attempting to fetch patch-1.5.14.dgc.xlabel_ext.9 from http://home.uchicago.edu/~dgc/sw/mutt/
---->  Verifying checksum(s) for svn-and-patchsites
---->  Extracting svn-and-patchsites
---->  Configuring svn-and-patchsites
---->  Building svn-and-patchsites
---->  Testing svn-and-patchsites

Copied: branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/master (from rev 84762, trunk/base/tests/test/svn-and-patchsites/master)
===================================================================
--- branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/master	                        (rev 0)
+++ branches/gsoc11-statistics/base/tests/test/svn-and-patchsites/master	2011-09-30 22:54:17 UTC (rev 84763)
@@ -0,0 +1,7 @@
+--->  Fetching svn-and-patchsites
+--->  Attempting to fetch patch-1.5.14.dgc.xlabel_ext.9 from http://home.uchicago.edu/~dgc/sw/mutt/
+--->  Verifying checksum(s) for svn-and-patchsites
+--->  Extracting svn-and-patchsites
+--->  Configuring svn-and-patchsites
+--->  Building svn-and-patchsites
+--->  Testing svn-and-patchsites
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110930/1fd109b5/attachment-0001.html>


More information about the macports-changes mailing list