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

blb at macports.org blb at macports.org
Sun Jan 17 20:55:06 PST 2010


Revision: 62809
          http://trac.macports.org/changeset/62809
Author:   blb at macports.org
Date:     2010-01-17 20:55:05 -0800 (Sun, 17 Jan 2010)
Log Message:
-----------
Merge from trunk

Modified Paths:
--------------
    branches/images-and-archives/base/ChangeLog
    branches/images-and-archives/base/config/RELEASE_URL
    branches/images-and-archives/base/configure
    branches/images-and-archives/base/doc/port.1
    branches/images-and-archives/base/doc/portfile.7
    branches/images-and-archives/base/m4/tcl.m4
    branches/images-and-archives/base/portmgr/dmg/InstallationCheck
    branches/images-and-archives/base/portmgr/dmg/InstallationCheck.strings
    branches/images-and-archives/base/portmgr/freebsd/pkg-plist
    branches/images-and-archives/base/src/macports1.0/macports.tcl
    branches/images-and-archives/base/src/port/port.tcl
    branches/images-and-archives/base/src/port1.0/portconfigure.tcl
    branches/images-and-archives/base/src/port1.0/portdestroot.tcl
    branches/images-and-archives/base/src/port1.0/portstartupitem.tcl
    branches/images-and-archives/base/src/port1.0/portutil.tcl
    branches/images-and-archives/base/src/registry1.0/Makefile
    branches/images-and-archives/base/src/registry1.0/portuninstall.tcl
    branches/images-and-archives/base/src/registry1.0/registry.tcl

Removed Paths:
-------------
    branches/images-and-archives/base/src/registry1.0/receipt_sqlite.tcl

Property Changed:
----------------
    branches/images-and-archives/base/


Property changes on: branches/images-and-archives/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/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:50249-62022
/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:50249-62807
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/images-and-archives/base/ChangeLog
===================================================================
--- branches/images-and-archives/base/ChangeLog	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/ChangeLog	2010-01-18 04:55:05 UTC (rev 62809)
@@ -5,19 +5,27 @@
 
 Release 1.9.0 (unreleased):
 
+    - Allow gcc45 port to be used in configure.compiler (ryandesign in r62223)
+
     - svn checkouts now use peg revisions instead of operative revisions,
       so they'll continue to work if a repository gets reorganized
-      (#20777, ryandesign)
+      (#20777, ryandesign in r60573)
 
-    - Use CommonCrypto/CommonDigest instead of OpenSSL libcrypto. (toby)
+    - Print the location of the log file when a target fails (jmr in r60769)
 
-    - Add SHA256 checksums in addition to MD5, SHA1 and RIPEMD160. (afb)
+    - Use CommonCrypto/CommonDigest instead of OpenSSL libcrypto.
+      (toby in r58131, jberry in r59715)
 
+    - Add SHA256 checksums in addition to MD5, SHA1 and RIPEMD160.
+      (afb in r57888, r57913)
+
     - New "patch.type gnu" for GNU patch, similar to "build.type gnu"
       for GNU make. Only makes a difference for BSD patch and BSD make.
+      (afb in r58020)
 
     - Update the FreeBSD package, drop the old Fedora/Ubuntu packages.
       (MacPorts now requires BSD, but objc/Foundation is now optional)
+      (afb in r57858, r57889)
 
     - Don't use "make -j1" for build.jobs=1, but prefer "make" instead.
       (afb in r57998)
@@ -32,6 +40,46 @@
     - Add new log command and keeping of debug output for easy access
       after port has run (GSoC 2009 logging project by enl, merged in r60372)
 
+Release 1.8.3 (unreleased):
+
+    - Some of the build_arch flags now appear in LDFLAGS as well, fixing
+      several ports when building for a different architecture (jeremyhu in
+      r60662, jmr in r60680)
+
+    - Fixed 'merge' proc for paths with spaces, and for symlinks on Snow
+      Leopard, and added an error message for when 'merge' is not called
+      correctly (ryandesign in r58776, r58777, r58778)
+
+Release 1.8.2 (2010-01-01 by jmr):
+
+    - Fixed 'port load' for non-root installations (#21713, jmr in r60774)
+
+    - Fixed a bug that could cause port to hit the open file limit
+      (#22959, jmr in r61770)
+
+    - Fixed an error when installing from source or selfupdating on Tiger with
+      an svn-based ports tree (#20760, jmr in r61302)
+
+    - Fixed an error when selfupdating as root with a prefix that is not owned
+      by root (#21010, jmr in r60798)
+
+    - Stopped uninstall from failing when files in the port image have already
+      been deleted (#22001, jmr in r59318, r59654)
+
+    - Stopped printing command output multiple times on failure (#21084,
+      jmr in r60770)
+
+    - Started showing bug reporting instructions on failure (jmr in r60770)
+
+    - Fixed a bug where 'port dmg' could create too small an image and run out
+      of space (#22404, jmr in r60260)
+
+    - Fixed a bug where reinplace could fail when running port without root
+      privileges (#20896, jmr in r59597)
+
+    - Started setting our own umask since Snow Leopard makes us inherit
+      the user's even when using sudo (#21389, jmr in r59585)
+
 Release 1.8.1 (2009-09-28 by jmr):
 
     - Installer error messages now display properly even from the Snow Leopard

Modified: branches/images-and-archives/base/config/RELEASE_URL
===================================================================
--- branches/images-and-archives/base/config/RELEASE_URL	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/config/RELEASE_URL	2010-01-18 04:55:05 UTC (rev 62809)
@@ -1 +1 @@
-http://svn.macports.org/repository/macports/tags/release_1_8_1/base
+http://svn.macports.org/repository/macports/tags/release_1_8_2/base

Modified: branches/images-and-archives/base/configure
===================================================================
--- branches/images-and-archives/base/configure	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/configure	2010-01-18 04:55:05 UTC (rev 62809)
@@ -8614,15 +8614,14 @@
 	    # check in a few common install locations
 	    if test x"${ac_cv_c_tclconfig}" = x ; then
 		for i in `ls -d ${libdir} 2>/dev/null` \
+			`ls -d /usr/lib 2>/dev/null` \
 			`ls -d /usr/local/lib 2>/dev/null` \
 			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
 			`ls -d /usr/pkg/lib 2>/dev/null` \
-			`ls -d /System/Library/Tcl/8.3 2>/dev/null` \
+			`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl8.4 2>/dev/null` \
-			`ls -d /usr/local/lib/tcl8.3 2>/dev/null` \
+			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
 			`ls -d /usr/lib/tcl8.4 2>/dev/null` \
-			`ls -d /usr/lib/tcl8.3 2>/dev/null` \
 			; do
 		    if test -f "$i/tclConfig.sh" ; then
 			ac_cv_c_tclconfig=`(cd $i; pwd)`
@@ -8745,7 +8744,7 @@
 		# check some other possible local system locations.
 
 		for i in \
-			/usr/local/include /usr/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
+			/usr/include /usr/local/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
 		    if test -f "$i/tcl.h" ; then
 			ac_cv_c_tclh=$i
 			break

Modified: branches/images-and-archives/base/doc/port.1
===================================================================
--- branches/images-and-archives/base/doc/port.1	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/doc/port.1	2010-01-18 04:55:05 UTC (rev 62809)
@@ -278,6 +278,10 @@
 .Dl "port info --line --category --name all"
 .Dl "port info --pretty --fullname --depends gtk2"
 .Dl "port info --index python24"
+.Ss notes
+Displays notes for 
+.Ar portname
+(useful information concerning setup and use of the port).
 .Ss variants
 Lists the build variants available for
 .Ar portname .
@@ -311,7 +315,11 @@
 Deactivate the installed
 .Ar portname .
 .Ss installed
-List all installed ports.
+Show the installed versions and variants for
+.Ar portname .
+If no
+.Ar portname
+is given, all installed ports are shown.
 .Ss contents
 Lists the files installed by
 .Ar portname .

Modified: branches/images-and-archives/base/doc/portfile.7
===================================================================
--- branches/images-and-archives/base/doc/portfile.7	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/doc/portfile.7	2010-01-18 04:55:05 UTC (rev 62809)
@@ -129,6 +129,37 @@
 
     painting, processing, and rendering tools.
 .Ed
+.It Ic notes
+Notes for setup and use of the port.  This is shown after the port is
+activated and anytime the
+.Ic notes
+command is used; for example:
+.Pp
+.Dl "port notes python26"
+.Pp
+The advantage to using
+.Ic notes
+instead of
+.Ic ui_msg
+is that it can be queried after a port is installed but
+.Ic ui_msg
+is only printed during an install.  Therefore
+.Ic notes
+is good for any information which may be needed anytime after an install.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Example:
+.Bd -literal -offset indent -compact
+notes To fully complete your installation and make python \e\
+
+   ${branch} the default, please run: \e\
+
+   sudo port install python_select \e\
+
+   sudo python_select ${name}
+.Ed
 .It Ic revision
 Local revision number of
 .Nm .

Modified: branches/images-and-archives/base/m4/tcl.m4
===================================================================
--- branches/images-and-archives/base/m4/tcl.m4	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/m4/tcl.m4	2010-01-18 04:55:05 UTC (rev 62809)
@@ -106,15 +106,14 @@
 	    # check in a few common install locations
 	    if test x"${ac_cv_c_tclconfig}" = x ; then
 		for i in `ls -d ${libdir} 2>/dev/null` \
+			`ls -d /usr/lib 2>/dev/null` \
 			`ls -d /usr/local/lib 2>/dev/null` \
 			`ls -d /usr/contrib/lib 2>/dev/null` \
-			`ls -d /usr/lib 2>/dev/null` \
 			`ls -d /usr/pkg/lib 2>/dev/null` \
-			`ls -d /System/Library/Tcl/8.3 2>/dev/null` \
+			`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl8.4 2>/dev/null` \
-			`ls -d /usr/local/lib/tcl8.3 2>/dev/null` \
+			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
 			`ls -d /usr/lib/tcl8.4 2>/dev/null` \
-			`ls -d /usr/lib/tcl8.3 2>/dev/null` \
 			; do
 		    if test -f "$i/tclConfig.sh" ; then
 			ac_cv_c_tclconfig=`(cd $i; pwd)`
@@ -2545,7 +2544,7 @@
 		# check some other possible local system locations.
 
 		for i in \
-			/usr/local/include /usr/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
+			/usr/include /usr/local/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
 		    if test -f "$i/tcl.h" ; then
 			ac_cv_c_tclh=$i
 			break

Modified: branches/images-and-archives/base/portmgr/dmg/InstallationCheck
===================================================================
--- branches/images-and-archives/base/portmgr/dmg/InstallationCheck	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/portmgr/dmg/InstallationCheck	2010-01-18 04:55:05 UTC (rev 62809)
@@ -6,18 +6,23 @@
 # MacPorts port which replaces __DARWINVERS__ with the version of Darwin
 # needed).
 
+# error out if uname or sed can't be found
+if ! which uname > /dev/null || ! which sed > /dev/null; then
+    # message 16 in InstallationCheck.strings
+    exit 112
+fi
+
 base_version=`uname -r | sed 's/\..*//'`
 if [[ ${base_version} != __DARWINVERS__ ]]; then
-   # This maps to message 16 in InstallationCheck.strings (Apple allows
+   # This maps to message 17 in InstallationCheck.strings (Apple allows
    # 16-31 for custom messages); that message should also be customized
    # like this script
-   exit 112
+   exit 113
 fi
 
 if [[ -f /opt/local/etc/ports/dp_version ]]; then
-   # message 17 in InstallationCheck.strings
-   exit 113
+   # message 18 in InstallationCheck.strings
+   exit 114
 fi
 
 exit 0
-

Modified: branches/images-and-archives/base/portmgr/dmg/InstallationCheck.strings
===================================================================
--- branches/images-and-archives/base/portmgr/dmg/InstallationCheck.strings	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/portmgr/dmg/InstallationCheck.strings	2010-01-18 04:55:05 UTC (rev 62809)
@@ -1,2 +1,3 @@
-"16" = "This package is meant to be installed on Mac OS X __XVERS__.";
-"17" = "Your existing MacPorts or DarwinPorts installation is too old to be upgraded by this installer. Please install MacPorts 1.7.1 first.";
+"16" = "Either uname or sed could not be found in PATH. Your system appears to be incomplete or misconfigured.";
+"17" = "This package is meant to be installed on Mac OS X __XVERS__.";
+"18" = "Your existing MacPorts or DarwinPorts installation is too old to be upgraded by this installer. Please install MacPorts 1.7.1 first.";

Modified: branches/images-and-archives/base/portmgr/freebsd/pkg-plist
===================================================================
--- branches/images-and-archives/base/portmgr/freebsd/pkg-plist	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/portmgr/freebsd/pkg-plist	2010-01-18 04:55:05 UTC (rev 62809)
@@ -53,7 +53,6 @@
 share/macports/Tcl/registry1.0/portimage.tcl
 share/macports/Tcl/registry1.0/portuninstall.tcl
 share/macports/Tcl/registry1.0/receipt_flat.tcl
-share/macports/Tcl/registry1.0/receipt_sqlite.tcl
 share/macports/Tcl/registry1.0/registry.tcl
 share/macports/Tcl/registry1.0/registry_autoconf.tcl
 var/macports/.tclpackage

Modified: branches/images-and-archives/base/src/macports1.0/macports.tcl
===================================================================
--- branches/images-and-archives/base/src/macports1.0/macports.tcl	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/src/macports1.0/macports.tcl	2010-01-18 04:55:05 UTC (rev 62809)
@@ -1747,14 +1747,18 @@
                     ui_debug $svn_commandline
                     if {
                         [catch {
-                            set euid [geteuid]
-                            set egid [getegid]
-                            ui_debug "changing euid/egid - current euid: $euid - current egid: $egid"
-                            setegid [name_to_gid [file attributes $portdir -group]]
-                            seteuid [name_to_uid [file attributes $portdir -owner]]
+                            if {[getuid] == 0} {
+                                set euid [geteuid]
+                                set egid [getegid]
+                                ui_debug "changing euid/egid - current euid: $euid - current egid: $egid"
+                                setegid [name_to_gid [file attributes $portdir -group]]
+                                seteuid [name_to_uid [file attributes $portdir -owner]]
+                            }
                             system $svn_commandline
-                            seteuid $euid
-                            setegid $egid
+                            if {[getuid] == 0} {
+                                seteuid $euid
+                                setegid $egid
+                            }
                         }]
                     } {
                         ui_debug "$::errorInfo"
@@ -2358,10 +2362,16 @@
 }
 
 # selfupdate procedure
-proc macports::selfupdate {{optionslist {}}} {
+proc macports::selfupdate {{optionslist {}} {updatestatusvar ""}} {
     global macports::prefix macports::portdbpath macports::libpath macports::rsync_server macports::rsync_dir macports::rsync_options
     global macports::autoconf::macports_version macports::autoconf::rsync_path tcl_platform
     array set options $optionslist
+    
+    # variable that indicates whether we actually updated base
+    if {$updatestatusvar != ""} {
+        upvar $updatestatusvar updatestatus
+        set updatestatus no
+    }
 
     # syncing ports tree.
     if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
@@ -2449,6 +2459,9 @@
             if { [catch { system "cd $mp_source_path && ./configure $configure_args && make && make install" } result] } {
                 return -code error "Error installing new MacPorts base: $result"
             }
+            if {[info exists updatestatus]} {
+                set updatestatus yes
+            }
         }
     } elseif {$comp < 0} {
         ui_msg "--->  MacPorts base is probably trunk or a release candidate"

Modified: branches/images-and-archives/base/src/port/port.tcl
===================================================================
--- branches/images-and-archives/base/src/port/port.tcl	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/src/port/port.tcl	2010-01-18 04:55:05 UTC (rev 62809)
@@ -2089,13 +2089,18 @@
 
 proc action_selfupdate { action portlist opts } {
     global global_options
-    if { [catch {macports::selfupdate [array get global_options]} result ] } {
+    if { [catch {macports::selfupdate [array get global_options] base_updated} result ] } {
         global errorInfo
         ui_debug "$errorInfo"
         fatal "port selfupdate failed: $result"
     }
     
-    return 0
+    if {$base_updated} {
+        # exit immediately if in batch/interactive mode
+        return -999
+    } else {
+        return 0
+    }
 }
 
 
@@ -2249,11 +2254,15 @@
             }
         }
     } elseif { $restrictedList } {
-        puts "None of the specified ports are installed."
+        if {![macports::ui_isset ports_quiet]} {
+            puts "None of the specified ports are installed."
+        }
     } else {
-        puts "No ports are installed."
+        if {![macports::ui_isset ports_quiet]} {
+            puts "No ports are installed."
+        }
     }
-    
+
     return $status
 }
 

Modified: branches/images-and-archives/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portconfigure.tcl	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/src/port1.0/portconfigure.tcl	2010-01-18 04:55:05 UTC (rev 62809)
@@ -208,6 +208,7 @@
         macports-gcc-4.2 { set name "MacPorts gcc 4.2" }
         macports-gcc-4.3 { set name "MacPorts gcc 4.3" }
         macports-gcc-4.4 { set name "MacPorts gcc 4.4" }
+        macports-gcc-4.5 { set name "MacPorts gcc 4.5" }
         default { return -code error "Invalid value for configure.compiler" }
     }
     ui_debug "Using compiler '$name'"
@@ -240,7 +241,7 @@
 proc portconfigure::configure_get_ld_archflags {args} {
     global configure.build_arch
     if {${configure.build_arch} != "" && [arch_flag_supported]} {
-        set flags "-arch ${configure.build_arch}"
+        return "-arch ${configure.build_arch}"
     } else {
         return ""
     }
@@ -466,6 +467,17 @@
                 f90  { set ret ${prefix}/bin/gfortran-mp-4.4 }
             }
         }
+        macports-gcc-4.5 {
+            switch -exact ${type} {
+                cc   { set ret ${prefix}/bin/gcc-mp-4.5 }
+                objc { set ret ${prefix}/bin/gcc-mp-4.5 }
+                cxx  { set ret ${prefix}/bin/g++-mp-4.5 }
+                cpp  { set ret ${prefix}/bin/cpp-mp-4.5 }
+                fc   { set ret ${prefix}/bin/gfortran-mp-4.5 }
+                f77  { set ret ${prefix}/bin/gfortran-mp-4.5 }
+                f90  { set ret ${prefix}/bin/gfortran-mp-4.5 }
+            }
+        }
     }
     return $ret
 }

Modified: branches/images-and-archives/base/src/port1.0/portdestroot.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portdestroot.tcl	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/src/port1.0/portdestroot.tcl	2010-01-18 04:55:05 UTC (rev 62809)
@@ -121,11 +121,11 @@
     file mkdir "${destroot}"
     if { ${os.platform} == "darwin" } {
         system "cd \"${destroot}\" && ${mtree} -e -U -f [file join ${portsharepath} install macosx.mtree]"
-        file mkdir "${destroot}/${applications_dir}"
-        file mkdir "${destroot}/${frameworks_dir}"
+        file mkdir "${destroot}${applications_dir}"
+        file mkdir "${destroot}${frameworks_dir}"
     }
-    file mkdir "${destroot}/${prefix}"
-    system "cd \"${destroot}/${prefix}\" && ${mtree} -e -U -f [file join ${portsharepath} install prefix.mtree]"
+    file mkdir "${destroot}${prefix}"
+    system "cd \"${destroot}${prefix}\" && ${mtree} -e -U -f [file join ${portsharepath} install prefix.mtree]"
 }
 
 proc portdestroot::destroot_main {args} {

Modified: branches/images-and-archives/base/src/port1.0/portstartupitem.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portstartupitem.tcl	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/src/port1.0/portstartupitem.tcl	2010-01-18 04:55:05 UTC (rev 62809)
@@ -79,7 +79,7 @@
     global startupitem.start startupitem.stop startupitem.restart
     global startupitem.type
 
-    set scriptdir ${destroot}/${prefix}/etc/rc.d
+    set scriptdir ${destroot}${prefix}/etc/rc.d
 
     if { ![exists startupitem.requires] } {
         set startupitem.requires ""

Modified: branches/images-and-archives/base/src/port1.0/portutil.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portutil.tcl	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/src/port1.0/portutil.tcl	2010-01-18 04:55:05 UTC (rev 62809)
@@ -1803,6 +1803,9 @@
     # Assume we do not need the statefile
     set statereq 0
     set ditems [dlist_search $targets provides $target]
+    if {[llength $ditems] > 0} {
+        set ditems [dlist_append_dependents $targets [lindex $ditems 0] [list]]
+    }
     foreach d $ditems {
         if {[ditem_key $d state] != "no"} {
             # At least one matching target requires the state file

Modified: branches/images-and-archives/base/src/registry1.0/Makefile
===================================================================
--- branches/images-and-archives/base/src/registry1.0/Makefile	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/src/registry1.0/Makefile	2010-01-18 04:55:05 UTC (rev 62809)
@@ -1,6 +1,6 @@
 INSTALLDIR=	${DESTDIR}${datadir}/macports/Tcl/registry1.0
 
-SRCS= registry.tcl registry_autoconf.tcl receipt_flat.tcl receipt_sqlite.tcl portuninstall.tcl
+SRCS= registry.tcl registry_autoconf.tcl receipt_flat.tcl portuninstall.tcl
 
 include ../../Mk/macports.autoconf.mk
 

Modified: branches/images-and-archives/base/src/registry1.0/portuninstall.tcl
===================================================================
--- branches/images-and-archives/base/src/registry1.0/portuninstall.tcl	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/src/registry1.0/portuninstall.tcl	2010-01-18 04:55:05 UTC (rev 62809)
@@ -1,4 +1,4 @@
-# et:ts=4
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # portuninstall.tcl
 # $Id$
 #
@@ -16,7 +16,7 @@
 # 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
 #    may be used to endorse or promote products derived from this software
 #    without specific prior written permission.
-# 
+#
 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -40,80 +40,80 @@
 namespace eval portuninstall {
 
 proc uninstall {portname {v ""} optionslist} {
-	global uninstall.force uninstall.nochecksum UI_PREFIX
-	global macports::portimagefilepath
-	array set options $optionslist
+    global uninstall.force uninstall.nochecksum UI_PREFIX
+    global macports::portimagefilepath
+    array set options $optionslist
 
-	set ilist [registry::installed $portname $v]
-	if { [llength $ilist] > 1 } {
-	    set portname [lindex [lindex $ilist 0] 0]
-		ui_msg "$UI_PREFIX [msgcat::mc "The following versions of $portname are currently installed:"]"
-		foreach i [portlist_sortint $ilist] { 
-			set iname [lindex $i 0]
-			set iversion [lindex $i 1]
-			set irevision [lindex $i 2]
-			set ivariants [lindex $i 3]
-			set iactive [lindex $i 4]
-			if { $iactive == 0 } {
-				ui_msg "$UI_PREFIX [format [msgcat::mc "	%s @%s_%s%s"] $iname $iversion $irevision $ivariants]"
-			} elseif { $iactive == 1 } {
-				ui_msg "$UI_PREFIX [format [msgcat::mc "	%s @%s_%s%s (active)"] $iname $iversion $irevision $ivariants]"
-			}
-		}
-		return -code error "Registry error: Please specify the full version as recorded in the port registry."
-	} else {
-	    # set portname again since the one we were passed may not have had the correct case
-	    set portname [lindex [lindex $ilist 0] 0]
-		set version [lindex [lindex $ilist 0] 1]
-		set revision [lindex [lindex $ilist 0] 2]
-		set variants [lindex [lindex $ilist 0] 3]
-		set active [lindex [lindex $ilist 0] 4]
-		set epoch [lindex [lindex $ilist 0] 5]
-	}
+    set ilist [registry::installed $portname $v]
+    if { [llength $ilist] > 1 } {
+        set portname [lindex [lindex $ilist 0] 0]
+        ui_msg "$UI_PREFIX [msgcat::mc "The following versions of $portname are currently installed:"]"
+        foreach i [portlist_sortint $ilist] { 
+            set iname [lindex $i 0]
+            set iversion [lindex $i 1]
+            set irevision [lindex $i 2]
+            set ivariants [lindex $i 3]
+            set iactive [lindex $i 4]
+            if { $iactive == 0 } {
+                ui_msg "$UI_PREFIX [format [msgcat::mc "	%s @%s_%s%s"] $iname $iversion $irevision $ivariants]"
+            } elseif { $iactive == 1 } {
+                ui_msg "$UI_PREFIX [format [msgcat::mc "	%s @%s_%s%s (active)"] $iname $iversion $irevision $ivariants]"
+            }
+        }
+        return -code error "Registry error: Please specify the full version as recorded in the port registry."
+    } else {
+        # set portname again since the one we were passed may not have had the correct case
+        set portname [lindex [lindex $ilist 0] 0]
+        set version [lindex [lindex $ilist 0] 1]
+        set revision [lindex [lindex $ilist 0] 2]
+        set variants [lindex [lindex $ilist 0] 3]
+        set active [lindex [lindex $ilist 0] 4]
+        set epoch [lindex [lindex $ilist 0] 5]
+    }
 
-	# determine if it's the only installed port with that name or not.
-	if {$v == ""} {
-		set nb_versions_installed 1
-	} else {
-		set ilist [registry::installed $portname ""]
-		set nb_versions_installed [llength $ilist]
-	}
+    # determine if it's the only installed port with that name or not.
+    if {$v == ""} {
+        set nb_versions_installed 1
+    } else {
+        set ilist [registry::installed $portname ""]
+        set nb_versions_installed [llength $ilist]
+    }
 
-	set ref [registry::open_entry $portname $version $revision $variants]
+    set ref [registry::open_entry $portname $version $revision $variants]
 
-	# If global forcing is on, make it the same as a local force flag.
-	if {[info exists options(ports_force)] && [string equal -nocase $options(ports_force) "yes"] } {
-		set uninstall.force "yes"
-	}
+    # If global forcing is on, make it the same as a local force flag.
+    if {[info exists options(ports_force)] && [string equal -nocase $options(ports_force) "yes"] } {
+        set uninstall.force "yes"
+    }
 
-	# Check and make sure no ports depend on this one
-	registry::open_dep_map	
-	set deplist [registry::list_dependents $portname]
-	if { [llength $deplist] > 0 } {
-		set dl [list]
-		# Check the deps first
-		foreach dep $deplist { 
-			set depport [lindex $dep 2]
-			ui_debug "$depport depends on this port"
-			if {[registry::entry_exists_for_name $depport]} {
-				lappend dl $depport
-			}
-		}
-		# Now see if we need to error
-		if { [llength $dl] > 0 } {
-			if {[info exists options(ports_uninstall_follow-dependents)] && $options(ports_uninstall_follow-dependents) eq "yes"} {
-				foreach depport $dl {
-					# make sure it's still installed, since a previous dep uninstall may have removed it
-					if {[registry::entry_exists_for_name $depport]} {
-						portuninstall::uninstall $depport "" [array get options]
-					}
-				}
-			} else {
+    # Check and make sure no ports depend on this one
+    registry::open_dep_map  
+    set deplist [registry::list_dependents $portname]
+    if { [llength $deplist] > 0 } {
+        set dl [list]
+        # Check the deps first
+        foreach dep $deplist { 
+            set depport [lindex $dep 2]
+            ui_debug "$depport depends on this port"
+            if {[registry::entry_exists_for_name $depport]} {
+                lappend dl $depport
+            }
+        }
+        # Now see if we need to error
+        if { [llength $dl] > 0 } {
+            if {[info exists options(ports_uninstall_follow-dependents)] && $options(ports_uninstall_follow-dependents) eq "yes"} {
+                foreach depport $dl {
+                    # make sure it's still installed, since a previous dep uninstall may have removed it
+                    if {[registry::entry_exists_for_name $depport]} {
+                        portuninstall::uninstall $depport "" [array get options]
+                    }
+                }
+            } else {
                 # will need to change this when we get version/variant dependencies
                 if {$nb_versions_installed == 1 || $active == 1} {
                     ui_msg "$UI_PREFIX [format [msgcat::mc "Unable to uninstall %s %s_%s%s, the following ports depend on it:"] $portname $version $revision $variants]"
                     foreach depport $dl {
-                        ui_msg "$UI_PREFIX [format [msgcat::mc "	%s"] $depport]"
+                        ui_msg "$UI_PREFIX [format [msgcat::mc "    %s"] $depport]"
                     }
                     if { [info exists uninstall.force] && [string equal ${uninstall.force} "yes"] } {
                         ui_warn "Uninstall forced.  Proceeding despite dependencies."
@@ -121,54 +121,54 @@
                         return -code error "Please uninstall the ports that depend on $portname first."
                     }
                 }
-			}
-		}
-	}
+            }
+        }
+    }
 
-	if {[registry::property_retrieve $ref active] == 1} {
-		if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
-			ui_msg "For $portname @${version}_${revision}${variants}: skipping deactivate (dry run)"
-		} else {
-			registry::deactivate $portname ${version}_${revision}${variants} $optionslist
-		}
-	}
+    if {[registry::property_retrieve $ref active] == 1} {
+        if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
+            ui_msg "For $portname @${version}_${revision}${variants}: skipping deactivate (dry run)"
+        } else {
+            registry::deactivate $portname ${version}_${revision}${variants} $optionslist
+        }
+    }
 
-	if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
-		ui_msg "For $portname @${version}_${revision}${variants}: skipping uninstall (dry run)"
-		return 0
-	}
-	
-	ui_msg "$UI_PREFIX [format [msgcat::mc "Uninstalling %s @%s_%s%s"] $portname $version $revision $variants]"
+    if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
+        ui_msg "For $portname @${version}_${revision}${variants}: skipping uninstall (dry run)"
+        return 0
+    }
+    
+    ui_msg "$UI_PREFIX [format [msgcat::mc "Uninstalling %s @%s_%s%s"] $portname $version $revision $variants]"
 
-	# Look to see if the port has registered an uninstall procedure
-	set uninstall [registry::property_retrieve $ref pkg_uninstall] 
-	if { $uninstall != 0 } {
-		if {![catch {eval $uninstall} err]} {
-			pkg_uninstall $portname ${version}_${revision}${variants}
-		} else {
-			global errorInfo
-			ui_debug "$errorInfo"
-			ui_error [format [msgcat::mc "Could not evaluate pkg_uninstall procedure: %s"] $err]
-		}
-	}
+    # Look to see if the port has registered an uninstall procedure
+    set uninstall [registry::property_retrieve $ref pkg_uninstall] 
+    if { $uninstall != 0 } {
+        if {![catch {eval $uninstall} err]} {
+            pkg_uninstall $portname ${version}_${revision}${variants}
+        } else {
+            global errorInfo
+            ui_debug "$errorInfo"
+            ui_error [format [msgcat::mc "Could not evaluate pkg_uninstall procedure: %s"] $err]
+        }
+    }
 
-	# Remove the port from the deps_map if only one version was installed.
-	# This is a temporary fix for a deeper problem that is that the dependency
-	# map doesn't take the port version into account (but should).
-	# Fixing it means transitionning to a new dependency map format.
-	if {$nb_versions_installed == 1} {
-		registry::unregister_dependencies $portname
-	}
+    # Remove the port from the deps_map if only one version was installed.
+    # This is a temporary fix for a deeper problem that is that the dependency
+    # map doesn't take the port version into account (but should).
+    # Fixing it means transitionning to a new dependency map format.
+    if {$nb_versions_installed == 1} {
+        registry::unregister_dependencies $portname
+    }
 
-	set macport_filename [macports::getportimagename_from_port_info $portname $epoch $version $revision $variants]
-	set portimagedir [file join ${macports::portimagefilepath} $portname]
-	set macport_file [file join $portimagedir $macport_filename]
-	file delete $macport_file
-	# Try to delete the port's image dir; will fail if there are more image
-	# files so just ignore the failure
-	catch {file delete $portimagedir} ignorederr
-	ui_info "$UI_PREFIX [format [msgcat::mc "Uninstall is removing %s from the port registry."] $portname]"
-	registry::delete_entry $ref
+    set macport_filename [macports::getportimagename_from_port_info $portname $epoch $version $revision $variants]
+    set portimagedir [file join ${macports::portimagefilepath} $portname]
+    set macport_file [file join $portimagedir $macport_filename]
+    file delete $macport_file
+    # Try to delete the port's image dir; will fail if there are more image
+    # files so just ignore the failure
+    catch {file delete $portimagedir} ignorederr
+    ui_info "$UI_PREFIX [format [msgcat::mc "Uninstall is removing %s from the port registry."] $portname]"
+    registry::delete_entry $ref
 }
 
 # End of portuninstall namespace

Deleted: branches/images-and-archives/base/src/registry1.0/receipt_sqlite.tcl
===================================================================
--- branches/images-and-archives/base/src/registry1.0/receipt_sqlite.tcl	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/src/registry1.0/receipt_sqlite.tcl	2010-01-18 04:55:05 UTC (rev 62809)
@@ -1,93 +0,0 @@
-# receipt_sqlite.tcl
-# $Id$
-#
-# Copyright (c) 2004 Will Barton <wbb4 at opendarwin.org>
-# Copyright (c) 2002 Apple Computer, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Apple Computer, Inc. nor the names of its contributors
-#    may be used to endorse or promote products derived from this software
-#    without specific prior written permission.
-# 
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-package provide receipt_sqlite 1.0
-
-package require macports 1.0
-
-##
-# Receipts Code supporting flat-files
-##
-namespace eval receipt_sqlite {
-
-# receipt_list will hold a reference to each "receipt" that is currently open
-variable receipt_list
-namespace export receipt_list
-
-# Create a new entry and place it in the receipt_list
-proc new_entry {} {
-	return -1
-}
-
-# Open an existing entry and place it in the receipt_list
-proc open_entry {name {version ""} {revision 0} {variants ""}} {
-	return -1
-}
-
-# Write an entry from the receipt_list
-proc write_entry {ref name version {revision 0} {variants ""}} {
-	return -1
-}
-
-# Check to see if an entry exists
-proc entry_exists {name version {revision 0} {variants ""}} {
-	return -1
-}
-
-# Store a property to a receipt current in the receipt_list
-proc property_store {ref property value} {
-	return -1
-}
-
-# Retrieve a property from a receipt currently in the receipt_list
-proc property_retrieve {ref property} {
-	return -1
-}
-
-# Delete an entry
-proc delete_entry {name version {revision 0} {variants ""}} {
-	return -1
-}
-
-# Return all installed ports
-proc installed {{name ""} {version ""}} {
-	return -1
-}
-
-# Return whether a file is registered to a port
-proc file_registered {file} {
-	return -1
-}
-
-# End of receipt_flat namespace
-}
-

Modified: branches/images-and-archives/base/src/registry1.0/registry.tcl
===================================================================
--- branches/images-and-archives/base/src/registry1.0/registry.tcl	2010-01-18 04:54:42 UTC (rev 62808)
+++ branches/images-and-archives/base/src/registry1.0/registry.tcl	2010-01-18 04:55:05 UTC (rev 62809)
@@ -33,7 +33,6 @@
 
 package require macports 1.0
 package require receipt_flat 1.0
-package require receipt_sqlite 1.0
 package require portuninstall 1.0
 package require msgcat
 package require Pextlib 1.0
@@ -664,7 +663,7 @@
             if { $port != 0 } {
                 set bakport [registry::file_registered $file]
                 registry::unregister_file $file
-                if {[file exists $file]} {
+                if {[file exists $bakfile]} {
                     registry::register_file $bakfile $bakport
                 }
             }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100117/46f46789/attachment-0001.html>


More information about the macports-changes mailing list