[82305] branches/gsoc11-rev-upgrade/base

cal at macports.org cal at macports.org
Fri Aug 12 09:35:07 PDT 2011


Revision: 82305
          http://trac.macports.org/changeset/82305
Author:   cal at macports.org
Date:     2011-08-12 09:35:06 -0700 (Fri, 12 Aug 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/Mk/macports.autoconf.mk.in
    branches/gsoc11-rev-upgrade/base/config/RELEASE_URL
    branches/gsoc11-rev-upgrade/base/configure
    branches/gsoc11-rev-upgrade/base/configure.ac
    branches/gsoc11-rev-upgrade/base/doc/portfile.7
    branches/gsoc11-rev-upgrade/base/doc/porthier.7
    branches/gsoc11-rev-upgrade/base/portmgr/ReleaseProcess
    branches/gsoc11-rev-upgrade/base/portmgr/dmg/postflight
    branches/gsoc11-rev-upgrade/base/portmgr/jobs/mprsyncup
    branches/gsoc11-rev-upgrade/base/portmgr/jobs/portfile_mirror.pl
    branches/gsoc11-rev-upgrade/base/src/cregistry/vercomp.c
    branches/gsoc11-rev-upgrade/base/src/darwintracelib1.0/Makefile
    branches/gsoc11-rev-upgrade/base/src/images_to_archives.tcl
    branches/gsoc11-rev-upgrade/base/src/macports1.0/Makefile
    branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl
    branches/gsoc11-rev-upgrade/base/src/package1.0/portdpkg.tcl
    branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Makefile
    branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Pextlib.c
    branches/gsoc11-rev-upgrade/base/src/pextlib1.0/vercomp.c
    branches/gsoc11-rev-upgrade/base/src/pextlib1.0/vercomp.h
    branches/gsoc11-rev-upgrade/base/src/port/port.tcl
    branches/gsoc11-rev-upgrade/base/src/port/portindex.tcl
    branches/gsoc11-rev-upgrade/base/src/port1.0/portconfigure.tcl
    branches/gsoc11-rev-upgrade/base/src/port1.0/portextract.tcl
    branches/gsoc11-rev-upgrade/base/src/port1.0/portlivecheck.tcl
    branches/gsoc11-rev-upgrade/base/src/port1.0/portutil.tcl
    branches/gsoc11-rev-upgrade/base/src/programs/daemondo/Makefile.in
    branches/gsoc11-rev-upgrade/base/src/registry2.0/portimage.tcl
    branches/gsoc11-rev-upgrade/base/tests/test/xcodeversion/Portfile

Added Paths:
-----------
    branches/gsoc11-rev-upgrade/base/src/pextlib1.0/tests/vercomp.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-81265
/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-82303
/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-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/ChangeLog	2011-08-12 16:35:06 UTC (rev 82305)
@@ -3,6 +3,34 @@
 # $Id$
 ###
 
+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)
+
+    - Fixed users created by MacPorts showing up in the GUI in some places on
+      Lion. (#30168, jeremyhu in r81558)
+
+    - Added replaced_by pseudo-portname selector. (afb in r81475)
+
+    - Added progress output to port image conversion script.
+      (#30347, jmr in r81464)
+
+    - Now doing a better job of avoiding UID conflicts with non-local users
+      when creating the 'macports' user. (#30464, jmr in r81414, r81415) Also
+      improved Tiger compatibility in this area. (jmr in r81454, r81467)
+
+    - Fixed 'port selfupdate' exiting with non-zero status after installing a
+      new version of base. (jmr in r81371)
+
+    - Added --subports to options accepted by 'port info'. (jmr in r81234)
+
+    - Fixed incorrect info sometimes being added to PortIndex entries when
+      using subports. (#30463, jmr in r81361)
+
+    - Fixed descriptions not being shown for default variants. (jmr in r80971)
+
+    - Fixed 'port variants --index'. (jmr in r80969)
+
 Release 2.0.0 (2011-07-22 by jmr):
 
     - Multiple ports can now be defined in one Portfile using the 'subport'

Modified: branches/gsoc11-rev-upgrade/base/Makefile.in
===================================================================
--- branches/gsoc11-rev-upgrade/base/Makefile.in	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/Makefile.in	2011-08-12 16:35:06 UTC (rev 82305)
@@ -42,7 +42,7 @@
         if ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then \
             if test `id -u` -eq 0; then \
                 echo "Creating group \"${RUNUSR}\"" ; \
-                ${DSEDITGROUP} -q -o create -n . ${RUNUSR} ; \
+                ${DSEDITGROUP} -q -o create ${RUNUSR} ; \
             else \
                 echo "Not creating group \"${RUNUSR}\" (not root)" ; \
             fi ; \
@@ -50,8 +50,19 @@
         if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then \
             if test `id -u` -eq 0; then \
                 echo "Creating user \"${RUNUSR}\"" ; \
+                NEXTUID=501; \
+                while test -n "`${DSCL} -q /Search -search /Users UniqueID $$NEXTUID`"; do \
+                    let "NEXTUID=NEXTUID+1"; \
+                done; \
+                ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$NEXTUID ; \
+                \
+                ${DSCL} -q . -delete /Users/${RUNUSR} AuthenticationAuthority ; \
+                ${DSCL} -q . -delete /Users/${RUNUSR} PasswordPolicyOptions ; \
+                ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:KerberosKeys ; \
+                ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:ShadowHashData ; \
+                \
+                ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
                 ${DSCL} -q . -create /Users/${RUNUSR} Password \* ; \
-                ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$(($$(${DSCL} -q . -list /Users UniqueID | /usr/bin/awk '{print $$2}' | sort -ug | tail -1)+1)) ; \
                 ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
                 ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /var/empty ; \
                 ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false ; \
@@ -59,6 +70,14 @@
                 echo "Not creating user \"${RUNUSR}\" (not root)" ; \
             fi ; \
         fi ; \
+        if test `sw_vers -productVersion | /usr/bin/awk -F . '{print $$2}'` -eq 4 -a `id -u` -eq 0; then \
+            GID=`${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}'` ; \
+            if test "`${DSCL} -q . -read /Users/${RUNUSR} PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $$2}'`" != "$$GID"; then \
+                echo "Fixing PrimaryGroupID for user \"${RUNUSR}\"" ; \
+                ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$GID ; \
+                ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
+            fi ; \
+        fi ; \
     else \
         echo "Can't find ${DSCL} / ${DSEDITGROUP}, not creating user \"${RUNUSR}\"" ; \
     fi

Modified: branches/gsoc11-rev-upgrade/base/Mk/macports.autoconf.mk.in
===================================================================
--- branches/gsoc11-rev-upgrade/base/Mk/macports.autoconf.mk.in	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/Mk/macports.autoconf.mk.in	2011-08-12 16:35:06 UTC (rev 82305)
@@ -7,12 +7,13 @@
 VPATH			= @srcdir@
 
 CC			= @CC@
-CFLAGS			= @CFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_WERROR)
-OBJCFLAGS		= @OBJCFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_WERROR)
+CFLAGS			= @CFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_PEDANTIC) $(CFLAGS_WERROR)
+OBJCFLAGS		= @OBJCFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_PEDANTIC) $(CFLAGS_WERROR)
 CPPFLAGS		= @CPPFLAGS@ @DEFS@ @INCLUDES@ @TCL_INCLUDES@
 TCL_DEFS		= @TCL_DEFS@
 SHLIB_CFLAGS		= @SHLIB_CFLAGS@
 CFLAGS_QUICHEEATERS	= @CFLAGS_QUICHEEATERS@
+CFLAGS_PEDANTIC		= @CFLAGS_PEDANTIC@
 CFLAGS_WERROR		= @CFLAGS_WERROR@
 
 READLINE_CFLAGS		=

Modified: branches/gsoc11-rev-upgrade/base/config/RELEASE_URL
===================================================================
--- branches/gsoc11-rev-upgrade/base/config/RELEASE_URL	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/config/RELEASE_URL	2011-08-12 16:35:06 UTC (rev 82305)
@@ -1 +1 @@
-https://svn.macports.org/repository/macports/tags/release_2_0_0/base
+https://svn.macports.org/repository/macports/tags/release_2_0_1/base

Modified: branches/gsoc11-rev-upgrade/base/configure
===================================================================
--- branches/gsoc11-rev-upgrade/base/configure	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/configure	2011-08-12 16:35:06 UTC (rev 82305)
@@ -674,6 +674,7 @@
 PTHREAD_LIBS
 acx_pthread_config
 CFLAGS_WERROR
+CFLAGS_PEDANTIC
 CFLAGS_QUICHEEATERS
 TAR_CMD
 TAR_Q
@@ -6179,11 +6180,13 @@
 
 # Quiche eaters options.
 if test x$GCC = xyes; then
-	CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
+	CFLAGS_QUICHEEATERS='-Wextra -Wall'
+	CFLAGS_PEDANTIC='-pedantic'
 fi
 
 
 
+
 	# Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; enable_werror=${enableval}

Modified: branches/gsoc11-rev-upgrade/base/configure.ac
===================================================================
--- branches/gsoc11-rev-upgrade/base/configure.ac	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/configure.ac	2011-08-12 16:35:06 UTC (rev 82305)
@@ -154,9 +154,11 @@
 
 # Quiche eaters options.
 if test x$GCC = xyes; then
-	CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
+	CFLAGS_QUICHEEATERS='-Wextra -Wall'
+	CFLAGS_PEDANTIC='-pedantic'
 fi
 AC_SUBST(CFLAGS_QUICHEEATERS)
+AC_SUBST(CFLAGS_PEDANTIC)
 MP_WERROR
 
 MP_COMPILER_ATTRIBUTE_UNUSED

Modified: branches/gsoc11-rev-upgrade/base/doc/portfile.7
===================================================================
--- branches/gsoc11-rev-upgrade/base/doc/portfile.7	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/doc/portfile.7	2011-08-12 16:35:06 UTC (rev 82305)
@@ -2119,8 +2119,8 @@
 .Xr mkdtemp 3 .
 .It Ic md5 Ar
 Compute the MD5 hashes of the file(s).
-.It Ic rpm-vercomp Ar versionA Ar versionB
-Compare two RPM-format versions for equality.  The return value is like
+.It Ic vercmp Ar versionA Ar versionB
+Compare two EVR-format versions for equality.  The return value is like
 strcmp(), returning -1, 0, or 1 when versionA is earlier, equal to, or
 later than versionB, respectively.  Note that some comparisions featuring
 floating-point notation may compare incorrectly, e.g. 2.101 is considered

Modified: branches/gsoc11-rev-upgrade/base/doc/porthier.7
===================================================================
--- branches/gsoc11-rev-upgrade/base/doc/porthier.7	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/doc/porthier.7	2011-08-12 16:35:06 UTC (rev 82305)
@@ -99,7 +99,10 @@
 .It Pa distfiles/
 Holds the distfiles of the fetched ports
 .It Pa receipts/
-Holds the registry information and receipts for the installed ports
+Obsolete. Formerly held the registry information and receipts for the installed ports,
+in flat-file format.
+.It Pa registry/
+Contains the registry database in sqlite format.
 .It Pa software/
 Holds compressed images of the installed ports. These
 are extracted to ${prefix} when activated.

Modified: branches/gsoc11-rev-upgrade/base/portmgr/ReleaseProcess
===================================================================
--- branches/gsoc11-rev-upgrade/base/portmgr/ReleaseProcess	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/portmgr/ReleaseProcess	2011-08-12 16:35:06 UTC (rev 82305)
@@ -208,6 +208,7 @@
 
 
 === Update trunk's version for next release ===
+
 Once trunk is to be used for development of the next major version, increase its version information to
 indicate it's moved past the release version by setting the patch-level version to 99, e.g. 2.0.99 (in
 trunk/base/config/macports_version).
@@ -220,10 +221,18 @@
  * The macports-announce@, macports-users@ and macports-dev@ mailing lists.
  * The MacPorts website, by adapting the $macports_version_major and $macports_version_latest variables as appropriate in the trunk/www/includes/common.inc file.
  * [https://trac.macports.org/news/] The MacOSforge news section (submitter: portmgr@)
- * [http://www.apple.com/downloads/macosx/unix_open_source/macports.html Apple's downloads page] (submitter: jmpp@)
  * [http://freshmeat.net/projects/macports/ Freshmeat] (submitter: mww@)
  * [http://www.versiontracker.com/dyn/moreinfo/macosx/26679 VersionTracker] (submitter: mij@)
  * [http://sourceforge.net/projects/macports/ sourceforge] (submitted: rhwood@)
  * [http://www.macupdate.com/info.php/id/21309/macports MacUpdate] (submitter: ???)
  * [http://twitter.com/macports twitter] (submitter: raimue@)
  * (Where else?)
+
+
+=== Use of new features in Portfiles ===
+
+Using new features introduced by a release should be delayed for 14 days. This
+should allow users to upgrade their installations to the new release. This
+delay matches the warning about outdated ports tree sources.
+
+

Modified: branches/gsoc11-rev-upgrade/base/portmgr/dmg/postflight
===================================================================
--- branches/gsoc11-rev-upgrade/base/portmgr/dmg/postflight	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/portmgr/dmg/postflight	2011-08-12 16:35:06 UTC (rev 82305)
@@ -125,11 +125,16 @@
 # link macports1.0 into tcl package dir if possible
 function link_tcl_package {
     # delete old directory if present
-    if [[ ! -L "${TCL_PACKAGE_DIR}/macports1.0" ]] && [[ -d "${TCL_PACKAGE_DIR}/macports1.0" ]]; then
-        rm -vrf "${TCL_PACKAGE_DIR}/macports1.0" || true
-    fi
-    if [[ ! -e "${TCL_PACKAGE_DIR}/macports1.0" ]] && [[ -w "${TCL_PACKAGE_DIR}" ]]; then
-		ln -vs "${MACPORTS_TCL_DIR}/macports1.0" "${TCL_PACKAGE_DIR}/macports1.0" || true
+    if [[ ! -L "${TCL_PACKAGE_DIR}/macports1.0" ]]; then
+        if [[ ! -e "${TCL_PACKAGE_DIR}" ]]; then
+            /usr/bin/install -d "${TCL_PACKAGE_DIR}" || true
+        fi
+        if [[ -d "${TCL_PACKAGE_DIR}/macports1.0" ]]; then
+            rm -vrf "${TCL_PACKAGE_DIR}/macports1.0" || true
+        fi
+        if [[ ! -e "${TCL_PACKAGE_DIR}/macports1.0" && -d "${TCL_PACKAGE_DIR}" ]]; then
+            ln -vs "${MACPORTS_TCL_DIR}/macports1.0" "${TCL_PACKAGE_DIR}/macports1.0" || true
+        fi
 	fi
 }
 
@@ -138,16 +143,39 @@
     DSEDITGROUP=/usr/sbin/dseditgroup
     if ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then
         echo "Creating group \"${RUNUSR}\""
-        ${DSEDITGROUP} -q -o create -n . ${RUNUSR}
+        ${DSEDITGROUP} -q -o create ${RUNUSR}
     fi
     if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then
         echo "Creating user \"${RUNUSR}\""
+        NEXTUID=501
+        while [[ -n "`${DSCL} -q /Search -search /Users UniqueID $NEXTUID`" ]]; do
+            let "NEXTUID=NEXTUID+1"
+        done
+        ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $NEXTUID
+
+        # These are implicitly added on Mac OSX Lion.  AuthenticationAuthority
+        # causes the user to be visible in the Users & Groups Preference Pane,
+        # and the others are just noise, so delete them.
+        # https://trac.macports.org/ticket/30168
+        ${DSCL} -q . -delete /Users/${RUNUSR} AuthenticationAuthority
+        ${DSCL} -q . -delete /Users/${RUNUSR} PasswordPolicyOptions
+        ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:KerberosKeys
+        ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:ShadowHashData
+
+        ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
         ${DSCL} -q . -create /Users/${RUNUSR} Password \*
-        ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $(($(${DSCL} . -list /Users UniqueID | /usr/bin/awk '{print $2}' | sort -ug | tail -1)+1))
         ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
         ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /var/empty
         ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false
     fi
+    if [[ $(sw_vers -productVersion | /usr/bin/awk -F . '{print $2}') -eq 4 ]]; then
+        GID=$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
+        if [[ "$(${DSCL} -q . -read /Users/${RUNUSR} PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $2}')" != "$GID" ]]; then
+            echo "Fixing PrimaryGroupID for user \"${RUNUSR}\""
+            ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $GID
+            ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
+        fi
+    fi
 }
 
 echo "The MacPorts Project, postflight script version ${VERSION}: checking the shell environment for user \"${USER}\"."


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-81265
/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-82303
/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/mprsyncup
===================================================================
--- branches/gsoc11-rev-upgrade/base/portmgr/jobs/mprsyncup	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/portmgr/jobs/mprsyncup	2011-08-12 16:35:06 UTC (rev 82305)
@@ -43,7 +43,6 @@
 
 # Paths we'll work on:
 ROOT=/var/tmp/macports
-TMPDIR=mp_trunk/base
 PREFIX=${ROOT}/opt/local
 TCLPKG=${PREFIX}/lib/tcl
 SVNROOT=/var/tmp/macports
@@ -60,9 +59,6 @@
 # copy new index of this platform to old index location for MP v1.8 compatability
 OLD_INDEX_PLATFORM="9_i386"
 
-MP_USER=nobody
-MP_GROUP=nobody
-
 # Sources information:
 SVNURL=https://svn.macports.org/repository/macports
 RELEASE_URL_FILE=config/RELEASE_URL
@@ -120,13 +116,11 @@
 # generate platform-specific indexes
 pushd ${PORTS} >> /dev/null
 # build MP trunk in a private location for indexing
-pushd ${ROOT}/${TMPDIR} >> /dev/null
+pushd ${TBASE} >> /dev/null
 ${MKDIR} -p ${TCLPKG}
 ./configure \
     --prefix=${PREFIX} \
-    --with-tclpackage=${TCLPKG} \
-    --with-install-user=${MP_USER} \
-    --with-install-group=${MP_GROUP}
+    --with-tclpackage=${TCLPKG}
 make clean
 make
 make install

Modified: branches/gsoc11-rev-upgrade/base/portmgr/jobs/portfile_mirror.pl
===================================================================
--- branches/gsoc11-rev-upgrade/base/portmgr/jobs/portfile_mirror.pl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/portmgr/jobs/portfile_mirror.pl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -20,7 +20,7 @@
 my $rev = $ARGV[0] or usage();
 my $TMPROOT = "/tmp/mp_mirror/$rev";
 
-my @changes = `$SVNLOOK changed $REPOPATH -r $rev`;
+my @changes = `$SVNLOOK changed $REPOPATH -r $rev | grep '/Portfile' | grep -vE '^[ ]+D'`;
 
 foreach my $change (@changes) {
     if ($change =~ /Portfile/) { 

Modified: branches/gsoc11-rev-upgrade/base/src/cregistry/vercomp.c
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/cregistry/vercomp.c	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/cregistry/vercomp.c	2011-08-12 16:35:06 UTC (rev 82305)
@@ -47,7 +47,7 @@
  */
 
 /**
- * RPM version comparison. Shamelessly copied from Pextlib, with some changes to
+ * EVR version comparison. Shamelessly copied from Pextlib, with some changes to
  * use string lengths instead of strlen by default. That's necessary to make it
  * work with sqlite3 collations. It should be shared with Pextlib, rather than
  * just copied though.
@@ -58,7 +58,7 @@
  * @param [in] lengthA  length of second version string, or -1 to use strlen
  * @return              -1 if A < B; 0 if A = B; 1 if A > B
  */
-static int rpm_vercomp (const char *versionA, int lengthA, const char *versionB,
+static int vercmp (const char *versionA, int lengthA, const char *versionB,
         int lengthB) {
     const char *endA, *endB;
 	const char *ptrA, *ptrB;
@@ -173,7 +173,7 @@
 
 /**
  * VERSION collation for sqlite3. This function collates text according to
- * pextlib's rpm-vercomp function. This allows direct comparison and sorting of
+ * pextlib's vercmp function. This allows direct comparison and sorting of
  * version columns, such as port.version and port.revision.
  *
  * @param [in] userdata unused
@@ -185,5 +185,5 @@
  */
 int sql_version(void* userdata UNUSED, int alen, const void* a, int blen,
         const void* b) {
-    return rpm_vercomp((const char*)a, alen, (const char*)b, blen);
+    return vercmp((const char*)a, alen, (const char*)b, blen);
 }

Modified: branches/gsoc11-rev-upgrade/base/src/darwintracelib1.0/Makefile
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/darwintracelib1.0/Makefile	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/darwintracelib1.0/Makefile	2011-08-12 16:35:06 UTC (rev 82305)
@@ -7,6 +7,7 @@
 include ../../Mk/macports.autoconf.mk
 
 CFLAGS+= -fPIC -Wno-deprecated-declarations
+CFLAGS_PEDANTIC=
 
 all:: ${SHLIB_NAME}
 

Modified: branches/gsoc11-rev-upgrade/base/src/images_to_archives.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/images_to_archives.tcl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/images_to_archives.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -33,8 +33,11 @@
 # list of ports we successfully create an archive of, to be used to update
 # the registry only after we know all creation attempts were successful.
 set archived_list {}
+set installed_len [llength $ilist]
+set counter 0
 
 foreach installed $ilist {
+    incr counter
     set iname [lindex $installed 0]
     set iversion [lindex $installed 1]
     set irevision [lindex $installed 2]
@@ -84,6 +87,7 @@
 
         # compute new name and location of archive
         set archivename "${iname}-${iversion}_${irevision}${ivariants}.${macports::os_platform}_${macports::os_major}.[join $archs -].${archivetype}"
+        ui_msg "Processing ${counter} of ${installed_len}: ${archivename}"
         if {$installtype == "image"} {
             set targetdir [file dirname $location]
         } else {
@@ -115,8 +119,13 @@
     }
 }
 
+set archived_len [llength $archived_list]
+set counter 0
+
 registry::write {
     foreach archived $archived_list {
+        incr counter
+        ui_msg "Updating registry: ${counter} of ${archived_len}"
         set installtype [lindex $archived 0]
         set iref [lindex $archived 1]
         set newlocation [lindex $archived 3]
@@ -134,8 +143,11 @@
     }
 }
 
+set counter 0
 foreach archived $archived_list {
+    incr counter
     set location [lindex $archived 2]
+    ui_msg "Deleting ${counter} of ${archived_len}: ${location}"
     if {$location != "" && [file isdirectory $location]} {
         if {[catch {file delete -force $location} result]} {
             ui_warn "Failed to delete ${location}: $result"

Modified: branches/gsoc11-rev-upgrade/base/src/macports1.0/Makefile
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/macports1.0/Makefile	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/macports1.0/Makefile	2011-08-12 16:35:06 UTC (rev 82305)
@@ -33,15 +33,15 @@
 
 	echo "${TCL_PACKAGE_DIR}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
 	if test -z "${DESTDIR}" -a "${INSTALLPKGLINK}" != "${INSTALLDIR}"; then \
-		if test ! -d "${TCL_PACKAGE_DIR}"; then \
-			$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${TCL_PACKAGE_DIR}" || true; \
-		fi; \
-		if test -w "${TCL_PACKAGE_DIR}"; then \
-			if test ! -L "${INSTALLPKGLINK}" && test -d "${INSTALLPKGLINK}"; then \
-				rm -rf "${INSTALLPKGLINK}" || true; \
-			fi; \
-			if test ! -e "${INSTALLPKGLINK}"; then \
-				ln -s "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
-			fi; \
-		fi; \
+		if test ! -L "${INSTALLPKGLINK}"; then \
+            if test ! -e "${TCL_PACKAGE_DIR}"; then \
+                $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${TCL_PACKAGE_DIR}" || true; \
+            fi; \
+            if test -d "${INSTALLPKGLINK}"; then \
+                rm -vrf "${INSTALLPKGLINK}" || true; \
+            fi; \
+            if test ! -e "${INSTALLPKGLINK}"; then \
+                ln -vs "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
+            fi; \
+        fi; \
 	fi

Modified: branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -49,7 +49,7 @@
         mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs \
         applications_dir frameworks_dir developer_dir universal_archs build_arch macosx_deployment_target \
         macportsuser proxy_override_env proxy_http proxy_https proxy_ftp proxy_rsync proxy_skip \
-        master_site_local patch_site_local archive_site_local"
+        master_site_local patch_site_local archive_site_local buildfromsource"
     variable user_options "submitter_name submitter_email submitter_key"
     variable portinterp_options "\
         portdbpath porturl portpath portbuildpath auto_path prefix prefix_frozen portsharepath \
@@ -687,6 +687,18 @@
             set macports::porttrace $macports::global_options(ports_trace)
         }
     }
+    # Check command line override for source/binary only mode
+    if {![info exists macports::global_options(ports_binary_only)]
+        && ![info exists macports::global_options(ports_source_only)]
+        && [info exists macports::buildfromsource]} {
+        if {${macports::buildfromsource} == "never"} {
+            set macports::global_options(ports_binary_only) yes
+        } elseif {${macports::buildfromsource} == "always"} {
+            set macports::global_options(ports_source_only) yes
+        } elseif {${macports::buildfromsource} != "ifneeded"} {
+            ui_warn "'buildfromsource' set to unknown value '${macports::buildfromsource}', using 'ifneeded' instead"
+        }
+    }
 
     # Duplicate prefix into prefix_frozen, so that port actions
     # can always get to the original prefix, even if a portfile overrides prefix
@@ -1173,9 +1185,8 @@
     set tarcmd [findBinary tar $macports::autoconf::tar_path]
     set tarflags [get_tar_flags [file extension $fetchfile]]
     set qflag ${macports::autoconf::tar_q}
-    set cmdline "$tarcmd ${tarflags}${qflag}xOf {$fetchfile} +CONTENTS"
+    set cmdline "$tarcmd ${tarflags}${qflag}xOf \"$fetchfile\" +CONTENTS"
     ui_debug "$cmdline"
-    set contents [eval exec $cmdline]
     if {![catch {set contents [eval exec $cmdline]}]} {
         set binary 1
         ui_debug "getting port name from binary archive"
@@ -1197,9 +1208,9 @@
     # extract the portfile (and possibly files dir if not a binary archive)
     ui_debug "extracting port archive to [pwd]"
     if {$binary} {
-        set cmdline "$tarcmd ${tarflags}${qflag}xOf {$fetchfile} +PORTFILE > Portfile"
+        set cmdline "$tarcmd ${tarflags}${qflag}xOf \"$fetchfile\" +PORTFILE > Portfile"
     } else {
-        set cmdline "$tarcmd ${tarflags}xf {$fetchfile}"
+        set cmdline "$tarcmd ${tarflags}xf \"$fetchfile\""
     }
     ui_debug "$cmdline"
     if {[catch {eval exec $cmdline} result]} {
@@ -1228,7 +1239,7 @@
     switch ${protocol} {
         file {
             set path [file normalize [string range $url [expr [string length $protocol] + 3] end]]
-            if {[file isdirectory $path]} {
+            if {![file isfile $path]} {
                 return $path
             } else {
                 # need to create a local dir for the exracted port, but only once
@@ -2993,7 +3004,7 @@
     }
 
     # check if we we need to rebuild base
-    set comp [rpm-vercomp $macports_version_new $macports::autoconf::macports_version]
+    set comp [vercmp $macports_version_new $macports::autoconf::macports_version]
     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)"
@@ -3226,9 +3237,9 @@
         set revision [lindex $i 2]
         set epoch [lindex $i 5]
         if { $version_installed == {} || ($epoch > $epoch_installed && $version != $version_installed) ||
-                ($epoch >= $epoch_installed && [rpm-vercomp $version $version_installed] > 0)
+                ($epoch >= $epoch_installed && [vercmp $version $version_installed] > 0)
                 || ($epoch >= $epoch_installed
-                    && [rpm-vercomp $version $version_installed] == 0
+                    && [vercmp $version $version_installed] == 0
                     && $revision > $revision_installed)} {
             set version_installed $version
             set revision_installed $revision
@@ -3360,9 +3371,9 @@
     set build_override 0
     set will_install yes
     # check installed version against version in ports
-    if { ( [rpm-vercomp $version_installed $version_in_tree] > 0
-            || ([rpm-vercomp $version_installed $version_in_tree] == 0
-                && [rpm-vercomp $revision_installed $revision_in_tree] >= 0 ))
+    if { ( [vercmp $version_installed $version_in_tree] > 0
+            || ([vercmp $version_installed $version_in_tree] == 0
+                && [vercmp $revision_installed $revision_in_tree] >= 0 ))
         && ![info exists options(ports_upgrade_force)] } {
         if {$portname != $newname} { 
             ui_debug "ignoring versions, installing replacement port"

Modified: branches/gsoc11-rev-upgrade/base/src/package1.0/portdpkg.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/package1.0/portdpkg.tcl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/package1.0/portdpkg.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -53,7 +53,7 @@
 set_ui_prefix
 
 proc portdpkg::main {args} {
-	global UI_PREFIX destpath os.arch os.platform
+	global UI_PREFIX destpath os.arch os.platform supported_archs configure.build_arch
     
 	ui_msg "$UI_PREFIX [format [msgcat::mc "Creating dpkg for %s-%s"] [option subport] [option version]]"
 
@@ -131,8 +131,9 @@
 	# sparc and sparc64. The operating system, os, is one of: linux, gnu,          
 	# freebsd and openbsd. Use of gnu in this string is reserved for the           
 	# GNU/Hurd operating system.
-	switch -regex ${os.arch} {
+	switch -regex ${configure.build_arch} {
 		i[3-9]86 { set pkg_arch "i386" }
+		x86_64 { set pkg_arch "x86_64" }
 		default { set pkg_arch ${os.arch} }
 	}
 
@@ -140,7 +141,14 @@
 	# the operating system name
 	if {${os.platform} != "linux"} {
 		set pkg_arch "${os.platform}-${pkg_arch}"
+	} elseif {${pkg_arch} == "x86_64"} {
+		set pkg_arch "amd64"
 	}
+	
+	# An architecture-independent package
+	if {$supported_archs == "noarch"} {
+		set pkg_arch "all"
+	}
 
 	puts $controlfd "Package: [option subport]"
 	puts $controlfd "Architecture: ${pkg_arch}"

Modified: branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Makefile
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Makefile	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Makefile	2011-08-12 16:35:06 UTC (rev 82305)
@@ -22,3 +22,4 @@
 	${TCLSH} tests/fs-traverse.tcl ./${SHLIB_NAME}
 	${TCLSH} tests/symlink.tcl ./${SHLIB_NAME}
 	${TCLSH} tests/unsetenv.tcl ./${SHLIB_NAME}
+	${TCLSH} tests/vercomp.tcl ./${SHLIB_NAME}

Modified: branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Pextlib.c
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Pextlib.c	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/pextlib1.0/Pextlib.c	2011-08-12 16:35:06 UTC (rev 82305)
@@ -572,34 +572,38 @@
     if (Tcl_InitStubs(interp, "8.4", 0) == NULL)
         return TCL_ERROR;
 
-    Tcl_CreateObjCommand(interp, "system", SystemCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "flock", FlockCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "readdir", ReaddirCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "strsed", StrsedCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "mkstemp", MkstempCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "mktemp", MktempCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "mkdtemp", MkdtempCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "existsuser", ExistsuserCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "existsgroup", ExistsgroupCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "nextuid", NextuidCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "nextgid", NextgidCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "md5", MD5Cmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "xinstall", InstallCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "fs-traverse", FsTraverseCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "filemap", FilemapCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "rpm-vercomp", RPMVercompCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "rmd160", RMD160Cmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "sha256", SHA256Cmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "base32encode", Base32EncodeCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "base32decode", Base32DecodeCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "sha1", SHA1Cmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "umask", UmaskCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "pipe", PipeCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "curl", CurlCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "symlink", CreateSymlinkCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "unsetenv", UnsetEnvCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "lchown", lchownCmd, NULL, NULL);
-    Tcl_CreateObjCommand(interp, "realpath", RealpathCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "system", SystemCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "flock", FlockCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "readdir", ReaddirCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "strsed", StrsedCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "mkstemp", MkstempCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "mktemp", MktempCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "mkdtemp", MkdtempCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "existsuser", ExistsuserCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "existsgroup", ExistsgroupCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "nextuid", NextuidCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "nextgid", NextgidCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "md5", MD5Cmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "xinstall", InstallCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "fs-traverse", FsTraverseCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "filemap", FilemapCmd, NULL, NULL);
+#if 1
+	/* the name "rpm-vercomp" is deprecated, use "vercmp" instead */
+	Tcl_CreateObjCommand(interp, "rpm-vercomp", VercompCmd, NULL, NULL);
+#endif
+	Tcl_CreateObjCommand(interp, "vercmp", VercompCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "rmd160", RMD160Cmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "sha256", SHA256Cmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "base32encode", Base32EncodeCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "base32decode", Base32DecodeCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "sha1", SHA1Cmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "umask", UmaskCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "pipe", PipeCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "curl", CurlCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "symlink", CreateSymlinkCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "unsetenv", UnsetEnvCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "lchown", lchownCmd, NULL, NULL);
+	Tcl_CreateObjCommand(interp, "realpath", RealpathCmd, NULL, NULL);
 #ifdef __MACH__
     Tcl_CreateObjCommand(interp, "fileIsBinary", fileIsBinaryCmd, NULL, NULL);
 #endif


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-81265
/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-82303
/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-81265
/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-82303
/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-81265
/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-82303
/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-81265
/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-82303
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.h:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.h:44044-44692

Copied: branches/gsoc11-rev-upgrade/base/src/pextlib1.0/tests/vercomp.tcl (from rev 82303, trunk/base/src/pextlib1.0/tests/vercomp.tcl)
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/pextlib1.0/tests/vercomp.tcl	                        (rev 0)
+++ branches/gsoc11-rev-upgrade/base/src/pextlib1.0/tests/vercomp.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -0,0 +1,47 @@
+# Test file for Pextlib's vercmp command.
+# Syntax:
+# tclsh vercomp.tcl <Pextlib name>
+
+proc main {pextlibname} {
+	load $pextlibname
+	
+	# 2.0 > 1.0
+	if {[vercmp 2.0 1.0] <= 0} {
+		puts {[vercmp 2.0 1.0] <= 0}
+		exit 1
+	}
+	# 1.0 = 1.0
+	if {[vercmp 1.0 1.0] != 0} {
+		puts {[vercmp 1.0 1.0] != 0}
+		exit 1
+	}
+	# 1.0 < 2.0
+	if {[vercmp 1.0 2.0] >= 0} {
+		puts {[vercmp 1.0 2.0] >= 0}
+		exit 1
+	}
+
+	# def > abc
+	if {[vercmp def abc] <= 0} {
+		puts {[vercmp def abc] <= 0}
+		exit 1
+	}
+	# abc = abc
+	if {[vercmp abc abc] != 0} {
+		puts {[vercmp abc abc] != 0}
+		exit 1
+	}
+	# abc < def
+	if {[vercmp abc def] >= 0} {
+		puts {[vercmp abc def] >= 0}
+		exit 1
+	}
+
+	# a < 1 (digits beats alpha)
+	if {[vercmp a 1] >= 0} {
+		puts {[vercmp a 1] >= 0}
+		exit 1
+	}
+}
+
+main $argv

Modified: branches/gsoc11-rev-upgrade/base/src/pextlib1.0/vercomp.c
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/pextlib1.0/vercomp.c	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/pextlib1.0/vercomp.c	2011-08-12 16:35:06 UTC (rev 82305)
@@ -1,7 +1,7 @@
 /*
  * vercomp.c
  * $Id$
- * RPM compatible version comparison
+ * version comparison
  *
  * Author: Landon Fuller <landonf at macports.org>
  *
@@ -48,10 +48,10 @@
 /*
  * If A is newer than B, return an integer > 0
  * If A and B are equal, return 0
- * If B is newer than A, retun an integer < 0
+ * If B is newer than A, return an integer < 0
  */
 
-static int rpm_vercomp (const char *versionA, const char *versionB) {
+static int vercmp (const char *versionA, const char *versionB) {
 	const char *ptrA, *ptrB;
 	const char *eptrA, *eptrB;
 
@@ -155,7 +155,7 @@
 		return -1;
 }
 
-int RPMVercompCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
+int VercompCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 {
 	Tcl_Obj *tcl_result;
 	const char *versionA, *versionB;
@@ -169,7 +169,7 @@
 	versionA = Tcl_GetString(objv[1]);
 	versionB = Tcl_GetString(objv[2]);
 
-	rval = rpm_vercomp(versionA, versionB);
+	rval = vercmp(versionA, versionB);
 
 	tcl_result = Tcl_NewIntObj(rval);
 	Tcl_SetObjResult(interp, tcl_result);

Modified: branches/gsoc11-rev-upgrade/base/src/pextlib1.0/vercomp.h
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/pextlib1.0/vercomp.h	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/pextlib1.0/vercomp.h	2011-08-12 16:35:06 UTC (rev 82305)
@@ -32,4 +32,4 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-int RPMVercompCmd(ClientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
+int VercompCmd(ClientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);

Modified: branches/gsoc11-rev-upgrade/base/src/port/port.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port/port.tcl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/port/port.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -482,9 +482,9 @@
     }
     set avr_ [split $a_(version) "_"]
     set bvr_ [split $b_(version) "_"]
-    set vercmp [rpm-vercomp [lindex $avr_ 0] [lindex $bvr_ 0]]
-    if {$vercmp != 0} {
-        return $vercmp
+    set versioncmp [vercmp [lindex $avr_ 0] [lindex $bvr_ 0]]
+    if {$versioncmp != 0} {
+        return $versioncmp
     }
     set ar_ [lindex $avr_ 1]
     set br_ [lindex $bvr_ 1]
@@ -855,7 +855,7 @@
             if {$installed_version != $latest_version} {
                 set comp_result [expr $installed_epoch - $latest_epoch]
                 if { $comp_result == 0 } {
-                    set comp_result [rpm-vercomp $installed_version $latest_version]
+                    set comp_result [vercmp $installed_version $latest_version]
                 }
             }
             if { $comp_result == 0 } {
@@ -1282,6 +1282,7 @@
         ^depends_run:       -
         ^depends_extract:   -
         ^depends_fetch:     -
+        ^replaced_by:       -
         ^revision:          -
         ^license:           { # Handle special port selectors
             advance
@@ -3082,7 +3083,7 @@
             
             # Compare versions, first checking epoch, then version, then revision
             set epoch_comp_result [expr $installed_epoch - $latest_epoch]
-            set comp_result [rpm-vercomp $installed_version $latest_version]
+            set comp_result [vercmp $installed_version $latest_version]
             if { $comp_result == 0 } {
                 set comp_result [expr $installed_revision - $latest_revision]
             }
@@ -4160,7 +4161,7 @@
                         foreach e $kopts {
                             lappend errlst "--[lindex $e 0]"
                         }
-                        return -code error "${action} --${key} is ambiguous: \n  [join $errlst "\n  "]"
+                        return -code error "\"port ${action} --${key}\" is ambiguous: \n  port ${action} [join $errlst "\n  port ${action} "]"
                     }
                     set key   [lindex [lindex $kopts 0] 0]
                     set kargc [lindex [lindex $kopts 0] 1]
@@ -4317,9 +4318,9 @@
             set action_proc [get_action_proc $action]
         } else {
             if {[llength $actions] > 1} {
-                puts "Ambiguous action \"$action\": could be any of {$actions}."
+                ui_error "\"port ${action}\" is ambiguous: \n  port [join $actions "\n  port "]"
             } else {
-                puts "Unrecognized action \"$action\""
+                ui_error "Unrecognized action \"port $action\""
             }
             set action_status 1
             break
@@ -4677,6 +4678,9 @@
 if { ($exit_status == 0 || [macports::ui_isset ports_processall]) && [info exists ui_options(ports_commandfiles)] } {
     set exit_status [process_command_files $ui_options(ports_commandfiles)]
 }
+if {$exit_status == -999} {
+    set exit_status 0
+}
 
 # shut down macports1.0
 mportshutdown

Modified: branches/gsoc11-rev-upgrade/base/src/port/portindex.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port/portindex.tcl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/port/portindex.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -146,6 +146,7 @@
                 incr stats(failed)
             } else {
                 set prefix $save_prefix
+                array unset portinfo
                 array set portinfo [mportinfo $interp]
                 mportclose $interp
                 set portinfo(portdir) $portdir

Modified: branches/gsoc11-rev-upgrade/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port1.0/portconfigure.tcl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/port1.0/portconfigure.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -355,10 +355,12 @@
 proc portconfigure::configure_get_default_compiler {args} {
     global xcodeversion macosx_deployment_target
     if {$xcodeversion == "none" || $xcodeversion == ""} {
-        return gcc
-    } elseif {[rpm-vercomp $xcodeversion 4.0] >= 0} {
+        return cc
+    } elseif {[vercmp $xcodeversion 4.2] >= 0} {
+        return clang
+    } elseif {[vercmp $xcodeversion 4.0] >= 0} {
         return llvm-gcc-4.2
-    } elseif {[rpm-vercomp $xcodeversion 3.2] >= 0 && $macosx_deployment_target != "10.4"} {
+    } elseif {[vercmp $xcodeversion 3.2] >= 0 && $macosx_deployment_target != "10.4"} {
         return gcc-4.2
     } else {
         return gcc-4.0

Modified: branches/gsoc11-rev-upgrade/base/src/port1.0/portextract.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port1.0/portextract.tcl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/port1.0/portextract.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -92,9 +92,9 @@
     if {[tbool use_bzip2]} {
         option extract.cmd [findBinary bzip2 ${portutil::autoconf::bzip2_path}]
     } elseif {[tbool use_lzma]} {
-        option extract.cmd [binaryInPath "lzma"]
+        option extract.cmd [findBinary lzma ${portutil::autoconf::lzma_path}]
     } elseif {[tbool use_xz]} {
-        option extract.cmd [binaryInPath "xz"]
+        option extract.cmd [findBinary xz ${portutil::autoconf::xz_path}]
     } elseif {[tbool use_zip]} {
         option extract.cmd [findBinary unzip ${portutil::autoconf::unzip_path}]
         option extract.pre_args -q

Modified: branches/gsoc11-rev-upgrade/base/src/port1.0/portlivecheck.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port1.0/portlivecheck.tcl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/port1.0/portlivecheck.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -175,7 +175,7 @@
                     while {[gets $chan line] >= 0} {
                         if {[regexp $the_re $line matched upver]} {
                             set foundmatch 1
-                            if {$updated_version == 0 || [rpm-vercomp $upver $updated_version] > 0} {
+                            if {$updated_version == 0 || [vercmp $upver $updated_version] > 0} {
                                 set updated_version $upver
                             }
                             ui_debug "The regex matched \"$matched\", extracted \"$upver\""

Modified: branches/gsoc11-rev-upgrade/base/src/port1.0/portutil.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port1.0/portutil.tcl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/port1.0/portutil.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -2075,6 +2075,7 @@
         return
     } elseif {[geteuid] != 0} {
         seteuid 0; setegid 0
+        set escalated 1
     }
 
     set passwd {*}
@@ -2096,10 +2097,20 @@
 
     if {${os.platform} eq "darwin"} {
         set dscl [findBinary dscl $portutil::autoconf::dscl_path]
+        exec $dscl . -create /Users/${name} UniqueID ${uid}
+
+        # These are implicitly added on Mac OSX Lion.  AuthenticationAuthority
+        # causes the user to be visible in the Users & Groups Preference Pane,
+        # and the others are just noise, so delete them.
+        # https://trac.macports.org/ticket/30168
+        exec $dscl . -delete /Users/${name} AuthenticationAuthority
+        exec $dscl . -delete /Users/${name} PasswordPolicyOptions
+        exec $dscl . -delete /Users/${name} dsAttrTypeNative:KerberosKeys
+        exec $dscl . -delete /Users/${name} dsAttrTypeNative:ShadowHashData
+
+        exec $dscl . -create /Users/${name} RealName ${realname}
         exec $dscl . -create /Users/${name} Password ${passwd}
-        exec $dscl . -create /Users/${name} UniqueID ${uid}
         exec $dscl . -create /Users/${name} PrimaryGroupID ${gid}
-        exec $dscl . -create /Users/${name} RealName ${realname}
         exec $dscl . -create /Users/${name} NFSHomeDirectory ${home}
         exec $dscl . -create /Users/${name} UserShell ${shell}
     } else {
@@ -2107,6 +2118,10 @@
         ui_warn "adduser is not implemented on ${os.platform}."
         ui_warn "The requested user '$name' was not created."
     }
+
+    if {[info exists escalated]} {
+        dropPrivileges
+    }
 }
 
 proc addgroup {name args} {
@@ -2118,6 +2133,7 @@
         return
     } elseif {[geteuid] != 0} {
         seteuid 0; setegid 0
+        set escalated 1
     }
 
     set gid [nextgid]
@@ -2148,6 +2164,10 @@
         ui_warn "addgroup is not implemented on ${os.platform}."
         ui_warn "The requested group was not created."
     }
+
+    if {[info exists escalated]} {
+        dropPrivileges
+    }
 }
 
 # proc to calculate size of a directory
@@ -2702,10 +2722,10 @@
         }
         if {$xcodeversion == "none"} {
             ui_warn "Xcode does not appear to be installed; most ports will likely fail to build."
-        } elseif {[rpm-vercomp $xcodeversion $min] < 0} {
+        } elseif {[vercmp $xcodeversion $min] < 0} {
             ui_error "The installed version of Xcode (${xcodeversion}) is too old to use on the installed OS version. Version $rec or later is recommended on Mac OS X ${macosx_version}."
             return 1
-        } elseif {[rpm-vercomp $xcodeversion $ok] < 0} {
+        } elseif {[vercmp $xcodeversion $ok] < 0} {
             ui_warn "The installed version of Xcode (${xcodeversion}) is known to cause problems. Version $rec or later is recommended on Mac OS X ${macosx_version}."
         }
     }

Modified: branches/gsoc11-rev-upgrade/base/src/programs/daemondo/Makefile.in
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/programs/daemondo/Makefile.in	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/programs/daemondo/Makefile.in	2011-08-12 16:35:06 UTC (rev 82305)
@@ -8,7 +8,7 @@
 mandir=		@mandir@
 mandircat8=	${mandir}/cat8
 
-CFLAGS_QUICHEEATERS	= -W -Wall
+CFLAGS_PEDANTIC	=
 CPPFLAGS	+= -I../..
 SRCS		= main.c
 OBJS		= main.o

Modified: branches/gsoc11-rev-upgrade/base/src/registry2.0/portimage.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/registry2.0/portimage.tcl	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/src/registry2.0/portimage.tcl	2011-08-12 16:35:06 UTC (rev 82305)
@@ -249,7 +249,17 @@
 ## @param [in] dstfile path to activate file to
 ## @return 1 if file needs to be explicitly deleted if we have to roll back, 0 otherwise
 proc _activate_file {srcfile dstfile} {
-    switch [::file type $srcfile] {
+    if {[catch {set filetype [::file type $srcfile]} result]} {
+        # this can happen if the archive was built on case-sensitive and we're case-insensitive
+        # we know any existing dstfile is ours because we checked for conflicts earlier
+        if {![catch {file type $dstfile}]} {
+            ui_debug "skipping case-conflicting file: $srcfile"
+            return 0
+        } else {
+            error $result
+        }
+    }
+    switch $filetype {
         directory {
             # Don't recursively copy directories
             ui_debug "activating directory: $dstfile"
@@ -294,7 +304,7 @@
         set unarchive.pre_args {}
         set unarchive.args {}
         set unarchive.pipe_cmd ""
-        set unarchive.type [::file tail $location]
+        set unarchive.type [::file extension $location]
         switch -regex ${unarchive.type} {
             cp(io|gz) {
                 set pax "pax"


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-81265
/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-82303
/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-rev-upgrade/base/tests/test/xcodeversion/Portfile
===================================================================
--- branches/gsoc11-rev-upgrade/base/tests/test/xcodeversion/Portfile	2011-08-12 16:12:27 UTC (rev 82304)
+++ branches/gsoc11-rev-upgrade/base/tests/test/xcodeversion/Portfile	2011-08-12 16:35:06 UTC (rev 82305)
@@ -19,6 +19,8 @@
 }
 
 test {
+	# rpm-vercomp is now deprecated, change it here too when removed
+	# from all ports and base (but keep this test here, meanwhile...)
 	if {$xcodeversion != "" && [rpm-vercomp $xcodeversion 2.1] >= 0} {
 		ui_msg "xcodeversion >= 2.1"
 	} else {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110812/34a38769/attachment-0001.html>


More information about the macports-changes mailing list