[37620] branches/gsoc08-privileges/base

pmagrath at macports.org pmagrath at macports.org
Sun Jun 15 12:59:09 PDT 2008


Revision: 37620
          http://trac.macosforge.org/projects/macports/changeset/37620
Author:   pmagrath at macports.org
Date:     2008-06-15 12:59:08 -0700 (Sun, 15 Jun 2008)

Log Message:
-----------
Merged revisions 37349,37373,37386,37433,37442,37453,37501-37503,37526,37543,37552 via svnmerge from 
https://svn.macosforge.org/repository/macports/trunk/base

........
  r37349 | jmr at macports.org | 2008-06-04 09:32:15 +0100 (Wed, 04 Jun 2008) | 8 lines
  
  Try to be case-insensitive and case-preserving with port names as much as
  possible. Match names case-insensitively in the registry (previously this was
  not done when running on a case-sensitive FS), but return the name with its
  correct case. Additionally, make sure to use the correctly-cased name whenever
  possible, where previously the name as entered by the user was used. This
  changeset fixes the bug where giving the port name with incorrect case when
  deactivating would fail to delete the port's files from $prefix (#11759).
........
  r37373 | raimue at macports.org | 2008-06-05 01:08:35 +0100 (Thu, 05 Jun 2008) | 4 lines
  
  port/port.tcl:
  Add new option --depends to port info,
  which is a shorthand for --depends_bin --depends_lib --depends_build
........
  r37386 | raimue at macports.org | 2008-06-05 11:31:37 +0100 (Thu, 05 Jun 2008) | 3 lines
  
  port/port.tcl:
  port provides was broken by r37238, closes #15515.
........
  r37433 | jmr at macports.org | 2008-06-07 16:54:47 +0100 (Sat, 07 Jun 2008) | 7 lines
  
  upgrade: refactor handling of dependencies
   * depscache entries are now added by the callee instead of the caller
   * a 'port:' entry is always added if the port is installed
   * a 'port:' entry in the cache immediately satisfies other depspecs involving that port
   * factored out redundant code for different depends_* types
  Fixes #15520.
........
  r37442 | jmr at macports.org | 2008-06-08 00:28:20 +0100 (Sun, 08 Jun 2008) | 3 lines
  
  Make uninstalling the old version of a port during upgrade work without -f,
  whether due to -u, epoch override, or being in direct mode.
........
  r37453 | jmr at macports.org | 2008-06-08 13:39:45 +0100 (Sun, 08 Jun 2008) | 3 lines
  
  Check depends_build before configure phase, and check dependencies before
  alll packaging targets. This is a step towards fixing #15161.
........
  r37501 | afb at macports.org | 2008-06-10 10:31:54 +0100 (Tue, 10 Jun 2008) | 2 lines
  
  make missing sed extended regexp into a run-time error instead of configure-time
........
  r37502 | afb at macports.org | 2008-06-10 10:41:07 +0100 (Tue, 10 Jun 2008) | 2 lines
  
  update changelog, #15577/r37501
........
  r37503 | afb at macports.org | 2008-06-10 11:02:33 +0100 (Tue, 10 Jun 2008) | 2 lines
  
  stop abusing command_exec filter/redirect arguments for build nice/jobs, and improve debugging output (#15530)
........
  r37526 | raimue at macports.org | 2008-06-11 13:58:33 +0100 (Wed, 11 Jun 2008) | 4 lines
  
  port/port.tcl:
  If env(COLUMNS) is not available, do not wrap.
  See #15488.
........
  r37543 | jmr at macports.org | 2008-06-12 14:05:44 +0100 (Thu, 12 Jun 2008) | 2 lines
  
  Add new Internode SourceForge mirror
........
  r37552 | ryandesign at macports.org | 2008-06-13 09:11:24 +0100 (Fri, 13 Jun 2008) | 2 lines
  
  Properly detect Mac OS X versions earlier than Panther, where sw_vers doesn't accept any parameters
........

Modified Paths:
--------------
    branches/gsoc08-privileges/base/ChangeLog
    branches/gsoc08-privileges/base/aclocal.m4
    branches/gsoc08-privileges/base/configure
    branches/gsoc08-privileges/base/configure.ac
    branches/gsoc08-privileges/base/src/macports1.0/macports.tcl
    branches/gsoc08-privileges/base/src/port/port.tcl
    branches/gsoc08-privileges/base/src/port1.0/portbuild.tcl
    branches/gsoc08-privileges/base/src/port1.0/portutil.tcl
    branches/gsoc08-privileges/base/src/port1.0/resources/fetch/mirror_sites.tcl
    branches/gsoc08-privileges/base/src/registry1.0/portimage.tcl
    branches/gsoc08-privileges/base/src/registry1.0/portuninstall.tcl
    branches/gsoc08-privileges/base/src/registry1.0/receipt_flat.tcl

Property Changed:
----------------
    branches/gsoc08-privileges/base/


Property changes on: branches/gsoc08-privileges/base
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk/base:1-37342
   + /trunk/base:1-37618

Modified: branches/gsoc08-privileges/base/ChangeLog
===================================================================
--- branches/gsoc08-privileges/base/ChangeLog	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/ChangeLog	2008-06-15 19:59:08 UTC (rev 37620)
@@ -5,6 +5,9 @@
 
 
 Unreleased:
+    - Make missing sed extended regexp (for reinplace -E) into a runtime error.
+      (#15577, afb in r37501)
+
     - More helpful strings for 'port help' (needs more work #15467, raimue)
 
     - Command line options are checked if the command accepts it before

Modified: branches/gsoc08-privileges/base/aclocal.m4
===================================================================
--- branches/gsoc08-privileges/base/aclocal.m4	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/aclocal.m4	2008-06-15 19:59:08 UTC (rev 37620)
@@ -952,8 +952,8 @@
 		AC_MSG_RESULT([-r (GNU)])
 		SED_EXT=-r
 	else
-		AC_MSG_RESULT([no idea])
-		AC_MSG_ERROR([cannot determine flag to use for $SED])
+		AC_MSG_RESULT([not available])
+		SED_EXT='N/A'
 	fi
 	AC_SUBST(SED_EXT)
 ])

Modified: branches/gsoc08-privileges/base/configure
===================================================================
--- branches/gsoc08-privileges/base/configure	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/configure	2008-06-15 19:59:08 UTC (rev 37620)
@@ -2109,7 +2109,7 @@
 if test "x$SW_VERS" != "x"; then
   { echo "$as_me:$LINENO: checking Mac OS X version" >&5
 echo $ECHO_N "checking Mac OS X version... $ECHO_C" >&6; }
-  MACOSX_VERSION=`$SW_VERS -productVersion | cut -f 1-3 -d.`
+  MACOSX_VERSION=`$SW_VERS | sed -n "s/^ProductVersion:[[:space:]]//p" | cut -f 1-3 -d.`
   { echo "$as_me:$LINENO: result: $MACOSX_VERSION" >&5
 echo "${ECHO_T}$MACOSX_VERSION" >&6; }
 fi
@@ -4306,11 +4306,9 @@
 echo "${ECHO_T}-r (GNU)" >&6; }
 		SED_EXT=-r
 	else
-		{ echo "$as_me:$LINENO: result: no idea" >&5
-echo "${ECHO_T}no idea" >&6; }
-		{ { echo "$as_me:$LINENO: error: cannot determine flag to use for $SED" >&5
-echo "$as_me: error: cannot determine flag to use for $SED" >&2;}
-   { (exit 1); exit 1; }; }
+		{ echo "$as_me:$LINENO: result: not available" >&5
+echo "${ECHO_T}not available" >&6; }
+		SED_EXT='N/A'
 	fi
 
 

Modified: branches/gsoc08-privileges/base/configure.ac
===================================================================
--- branches/gsoc08-privileges/base/configure.ac	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/configure.ac	2008-06-15 19:59:08 UTC (rev 37620)
@@ -22,7 +22,7 @@
 AC_CHECK_PROGS(SW_VERS, sw_vers)
 if test "x$SW_VERS" != "x"; then
   AC_MSG_CHECKING(Mac OS X version)
-  MACOSX_VERSION=`$SW_VERS -productVersion | cut -f 1-3 -d.`
+  MACOSX_VERSION=`$SW_VERS | sed -n "s/^ProductVersion:[[[:space:]]]//p" | cut -f 1-3 -d.`
   AC_MSG_RESULT([$MACOSX_VERSION])
 fi
 

Modified: branches/gsoc08-privileges/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc08-privileges/base/src/macports1.0/macports.tcl	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/src/macports1.0/macports.tcl	2008-06-15 19:59:08 UTC (rev 37620)
@@ -1236,8 +1236,10 @@
         || $target == "test"
         || $target == "destroot" || $target == "install"
         || $target == "archive"
+        || $target == "dmg" || $target == "mdmg"
         || $target == "pkg" || $target == "mpkg"
-        || $target == "rpm" || $target == "dpkg" } {
+        || $target == "rpm" || $target == "dpkg" 
+        || $target == "srpm" } {
 
         if {[mportdepends $mport $target] != 0} {
             return 1
@@ -1676,17 +1678,19 @@
         
     # Determine deptypes to look for based on target
     switch $target {
-        configure   { set deptypes "depends_lib" }
-        
+        configure   -
         build       { set deptypes "depends_lib depends_build" }
         
         test        -
         destroot    -
         install     -
         archive     -
+        dmg         -
         pkg         -
+        mdmg        -
         mpkg        -
         rpm         -
+        srpm        -
         dpkg        -
         ""          { set deptypes "depends_lib depends_build depends_run" }
     }
@@ -1894,6 +1898,8 @@
     }
     # fill array with information
     array set portinfo [lindex $result 1]
+    # set portname again since the one we were passed may not have had the correct case
+    set portname $portinfo(name)
 
     # set version_in_tree and revision_in_tree
     if {![info exists portinfo(version)]} {
@@ -1933,16 +1939,23 @@
                     ui_error "Unable to exec port: $result"
                     return 1
                 }
+                # we just installed it, so mark it done in the cache
+                set depscache(port:${portname}) 1
             } else {
                 # port installed outside MacPorts
                 ui_debug "$portname installed outside the MacPorts system"
                 set depflag 1
+                # mark this depspec as satisfied in the cache
+                set depscache($dspec) 1
             }
 
         } else {
             ui_error "Checking installed version failed: $result"
             exit 1
         }
+    } else {
+        # we'll now take care of upgrading it, so we can add it to the cache
+        set depscache(port:${portname}) 1
     }
     set anyactive no
     set version_installed {}
@@ -1952,6 +1965,7 @@
         # XXX  this sets $version_installed to $version_in_tree even if not installed!!
         set version_installed $version_in_tree
         set revision_installed $revision_in_tree
+        set iname $portname
         # That was a very dirty hack showing how ugly our depencendy and upgrade code is.
         # To get it working when user provides -f, we also need to set the variant to
         # avoid a future failure.
@@ -1969,16 +1983,18 @@
                     [rpm-vercomp $version $version_installed] > 0
                     || ([rpm-vercomp $version $version_installed] == 0
                         && [rpm-vercomp $revision $revision_installed] > 0)} {
+                set iname [lindex $i 0]
                 set version_installed $version
                 set revision_installed $revision
                 set variant_installed $variant
-                set epoch_installed [registry::property_retrieve [registry::open_entry $portname [lindex $i 1] [lindex $i 2] $variant] epoch]
+                set epoch_installed [registry::property_retrieve [registry::open_entry $iname [lindex $i 1] [lindex $i 2] $variant] epoch]
                 set num $i
             }
 
             set isactive [lindex $i 4]
             if {$isactive == 1} {
                 set anyactive yes
+                set active_name [lindex $i 0]
                 set version_active $version
                 set revision_active $revision
                 set variant_active $variant
@@ -1988,19 +2004,19 @@
                             || [rpm-vercomp $revision_installed $revision_active] != 0
                             || [string compare $variant_installed $variant_active] != 0)} {
             # deactivate version
-            if {[catch {portimage::deactivate $portname ${version_active}_${revision_active}${variant_active} $optionslist} result]} {
+            if {[catch {portimage::deactivate $active_name ${version_active}_${revision_active}${variant_active} $optionslist} result]} {
                 global errorInfo
                 ui_debug "$errorInfo"
-                ui_error "Deactivating $portname @${version_active}_${revision_active} failed: $result"
+                ui_error "Deactivating $active_name @${version_active}_${revision_active} failed: $result"
                 return 1
             }
         }
         if { [lindex $num 4] == 0 && 0 == [string compare "image" ${macports::registry.installtype}] } {
             # activate the latest installed version
-            if {[catch {portimage::activate $portname ${version_installed}_${revision_installed}$variant $optionslist} result]} {
+            if {[catch {portimage::activate $iname ${version_installed}_${revision_installed}$variant $optionslist} result]} {
                 global errorInfo
                 ui_debug "$errorInfo"
-                ui_error "Activating $portname @${version_installed}_${revision_installed} failed: $result"
+                ui_error "Activating $iname @${version_installed}_${revision_installed} failed: $result"
                 return 1
             }
         }
@@ -2009,7 +2025,7 @@
     # output version numbers
     ui_debug "epoch: in tree: $epoch_in_tree installed: $epoch_installed"
     ui_debug "$portname ${version_in_tree}_$revision_in_tree exists in the ports tree"
-    ui_debug "$portname ${version_installed}_$revision_installed is installed"
+    ui_debug "$iname ${version_installed}_$revision_installed is installed"
 
     # set the nodeps option  
     if {![info exists options(ports_nodeps)]} {
@@ -2034,36 +2050,17 @@
         set saved_do_dependents [info exists options(ports_do_dependents)]
         unset -nocomplain options(ports_do_dependents)
         
-        # build depends is upgraded
-        if {[info exists portinfo(depends_build)]} {
-            foreach i $portinfo(depends_build) {
-                if {![llength [array get depscache $i]]} {
-                set d [lindex [split $i :] end]
-                    set depscache($i) 1
-                    upgrade $d $i $variationslist [array get options] depscache
-                } 
+        # each dep type is upgraded
+        foreach dtype {depends_build depends_lib depends_run} {
+            if {[info exists portinfo($dtype)]} {
+                foreach i $portinfo($dtype) {
+                    set d [lindex [split $i :] end]
+                    if {![llength [array get depscache port:${d}]] && ![llength [array get depscache $i]]} {
+                        upgrade $d $i $variationslist [array get options] depscache
+                    } 
+                }
             }
         }
-        # library depends is upgraded
-        if {[info exists portinfo(depends_lib)]} {
-            foreach i $portinfo(depends_lib) {
-                if {![llength [array get depscache $i]]} {
-                set d [lindex [split $i :] end]
-                    set depscache($i) 1
-                    upgrade $d $i $variationslist [array get options] depscache
-                } 
-            }
-        }
-        # runtime depends is upgraded
-        if {[info exists portinfo(depends_run)]} {
-            foreach i $portinfo(depends_run) {
-                if {![llength [array get depscache $i]]} {
-                set d [lindex [split $i :] end]
-                    set depscache($i) 1
-                    upgrade $d $i $variationslist [array get options] depscache
-                } 
-            }
-        }
         
         # restore dependent-following to its former value
         if {$saved_do_dependents} {
@@ -2076,7 +2073,7 @@
             || ([rpm-vercomp $version_installed $version_in_tree] == 0
                 && [rpm-vercomp $revision_installed $revision_in_tree] >= 0 ))
         && ![info exists options(ports_force)] } {
-        ui_debug "No need to upgrade! $portname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_$revision_in_tree"
+        ui_debug "No need to upgrade! $iname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_$revision_in_tree"
         if { $epoch_installed >= $epoch_in_tree } {
             # Check if we have to do dependents
             if {[info exists options(ports_do_dependents)]} {
@@ -2084,13 +2081,12 @@
                 set options(ports_nodeps) 1
 
                 registry::open_dep_map
-                set deplist [registry::list_dependents $portname]
+                set deplist [registry::list_dependents $iname]
 
                 if { [llength deplist] > 0 } {
                     foreach dep $deplist {
                         set mpname [lindex $dep 2]
                         if {![llength [array get depscache port:${mpname}]]} {
-                            set depscache(port:${mpname}) 1
                             macports::upgrade $mpname port:${mpname} [array get variations] [array get options] depscache
                         }
                     }
@@ -2151,23 +2147,34 @@
     }
 
     # uninstall old ports
-    if {[info exists options(port_uninstall_old)] || $epoch_override == 1 || [info exists options(ports_force)] || 0 != [string compare "image" ${macports::registry.installtype}] } {
+    if { $epoch_override == 1 || [info exists options(ports_force)] || 0 != [string compare "image" ${macports::registry.installtype}] } {
         # uninstall old
-        ui_debug "Uninstalling $portname ${version_installed}_$revision_installed$oldvariant"
-        if {[catch {portuninstall::uninstall $portname ${version_installed}_$revision_installed$oldvariant $optionslist} result]} {
+        ui_debug "Uninstalling $iname ${version_installed}_$revision_installed$oldvariant"
+        # we have to force the uninstall in case of dependents
+        set force_cur [info exists options(ports_force)]
+        set options(ports_force) yes
+        if {[catch {portuninstall::uninstall $iname ${version_installed}_$revision_installed$oldvariant [array get options]} result]} {
             global errorInfo
             ui_debug "$errorInfo"
-            ui_error "Uninstall $portname ${version_installed}_$revision_installed$oldvariant failed: $result"
+            ui_error "Uninstall $iname ${version_installed}_$revision_installed$oldvariant failed: $result"
             return 1
         }
+        if {!$force_cur} {
+            unset options(ports_force)
+        }
     } else {
         # XXX deactivate version_installed
-        if {[catch {portimage::deactivate $portname ${version_installed}_$revision_installed$oldvariant $optionslist} result]} {
+        if {[catch {portimage::deactivate $iname ${version_installed}_$revision_installed$oldvariant $optionslist} result]} {
             global errorInfo
             ui_debug "$errorInfo"
-            ui_error "Deactivating $portname ${version_installed}_$revision_installed failed: $result"
+            ui_error "Deactivating $iname ${version_installed}_$revision_installed failed: $result"
             return 1
         }
+        if { [info exists options(port_uninstall_old)] } {
+            # uninstalling now could fail due to dependents when not forced,
+            # because the new version is not installed
+            set uninstall_later yes
+        }
     }
 
     if {[catch {set result [mportexec $workername install]} result]} {
@@ -2176,6 +2183,16 @@
         ui_error "Couldn't activate $portname ${version_in_tree}_$revision_in_tree$oldvariant: $result"
         return 1
     }
+    
+    if { [info exists uninstall_later] && $uninstall_later == yes } {
+        ui_debug "Uninstalling $iname ${version_installed}_$revision_installed$oldvariant"
+        if {[catch {portuninstall::uninstall $iname ${version_installed}_$revision_installed$oldvariant $optionslist} result]} {
+            global errorInfo
+            ui_debug "$errorInfo"
+            ui_error "Uninstall $iname ${version_installed}_$revision_installed$oldvariant failed: $result"
+            return 1
+        }
+    }
 
     # Check if we have to do dependents
     if {[info exists options(ports_do_dependents)]} {
@@ -2189,7 +2206,6 @@
             foreach dep $deplist {
                 set mpname [lindex $dep 2]
                 if {![llength [array get depscache port:${mpname}]]} {
-                    set depscache(port:${mpname}) 1
                     macports::upgrade $mpname port:${mpname} [array get variations] [array get options] depscache
                 }
             }

Modified: branches/gsoc08-privileges/base/src/port/port.tcl
===================================================================
--- branches/gsoc08-privileges/base/src/port/port.tcl	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/src/port/port.tcl	2008-06-15 19:59:08 UTC (rev 37620)
@@ -209,6 +209,8 @@
 proc registry_installed {portname {portversion ""}} {
     set ilist [registry::installed $portname $portversion]
     if { [llength $ilist] > 1 } {
+        # set portname again since the one we were passed may not have had the correct case
+        set portname [lindex [lindex $ilist 0] 0]
         puts "The following versions of $portname are currently installed:"
         foreach i [portlist_sortint $ilist] { 
             set iname [lindex $i 0]
@@ -406,10 +408,6 @@
             regexp {(\d+) (\d+)} $err -> rows cols
             set env(COLUMNS) $cols
             set env(LINES) $rows
-        } else {
-            puts stderr "Warning: Unable to get terminal size, using 80x24!"
-            set cols 80
-            set rows 24
         }
     }
 }
@@ -427,6 +425,10 @@
     global env
 
     if {$maxlen == 0} {
+        if {![info exists env(COLUMNS)]} {
+            # no width for wrapping
+            return $string
+        }
         set maxlen $env(COLUMNS)
     }
 
@@ -450,6 +452,10 @@
     global env
 
     if {$maxlen == 0} {
+        if {![info exists env(COLUMNS)]} {
+            # no width for wrapping
+            return $string
+        }
         set maxlen $env(COLUMNS)
     }
 
@@ -1345,6 +1351,13 @@
             platforms       1
             variants        1
         "
+
+        if {[info exists options(ports_info_depends)] && $options(ports_info_depends) == "yes"} {
+            array unset options ports_info_depends
+            set options(ports_info_depends_build) yes
+            set options(ports_info_depends_lib) yes
+            set options(ports_info_depends_run) yes
+        }
                 
         # Set up our field separators
         set show_label 1
@@ -1499,6 +1512,8 @@
             ui_debug "$errorInfo"
             break_softcontinue "port location failed: $result" 1 status
         } else {
+            # set portname again since the one we were passed may not have had the correct case
+            set portname [lindex $ilist 0]
             set version [lindex $ilist 1]
             set revision [lindex $ilist 2]
             set variants [lindex $ilist 3]
@@ -1526,11 +1541,11 @@
         ui_error "Please specify a filename to check which port provides that file."
         return 1
     }
-    foreachport $portlist {
-        set file [compat filenormalize $portname]
+    foreach filename $portlist {
+        set file [compat filenormalize $filename]
         if {[file exists $file]} {
             if {![file isdirectory $file]} {
-                set port [registry::file_registered $file] 
+                set port [registry::file_registered $file]
                 if { $port != 0 } {
                     puts "$file is provided by: $port"
                 } else {
@@ -1683,6 +1698,9 @@
             global errorInfo
             ui_debug "$errorInfo"
             break_softcontinue "$result" 1 status
+        } 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 deplist [registry::list_dependents $portname]
@@ -1913,6 +1931,10 @@
         return 1
     }
     foreachport $portlist {
+        if { ![catch {set ilist [registry::installed $portname]} result] } {
+            # set portname again since the one we were passed may not have had the correct case
+            set portname [lindex [lindex $ilist 0] 0]
+        }
         set files [registry::port_registered $portname]
         if { $files != 0 } {
             if { [llength $files] > 0 } {
@@ -1951,6 +1973,8 @@
 
         array unset portinfo
         array set portinfo [lindex $result 1]
+        # set portname again since the one we were passed may not have had the correct case
+        set portname $portinfo(name)
 
         set depstypes {depends_build depends_lib depends_run}
         set depstypes_descr {"build" "library" "runtime"}
@@ -1999,6 +2023,8 @@
     
         array unset portinfo
         array set portinfo [lindex $result 1]
+        # set portname again since the one we were passed may not have had the correct case
+        set portname $portinfo(name)
         set porturl $portinfo(porturl)
         set portdir $portinfo(portdir)
 
@@ -2598,10 +2624,11 @@
 global cmd_args_array
 array set cmd_args_array {
     info        {{category 0} {categories 0} {depends_build 0} {depends_lib 0}
-                {depends_run 0} {description 0} {epoch 0} {homepage 0}
-                {index 0} {line 0} {long_description 0} {maintainer 0}
-                {maintainers 0} {name 0} {platform 0} {platforms 0} {portdir 0}
-                {revision 0} {variant 0} {variants 0} {version 0}}
+                {depends_run 0} {depends 0} {description 0} {epoch 0}
+                {homepage 0} {index 0} {line 0} {long_description 0}
+                {maintainer 0} {maintainers 0} {name 0} {platform 0}
+                {platforms 0} {portdir 0} {revision 0} {variant 0} {variants 0}
+                {version 0}}
     search      {{line 0}}
     selfupdate  {{nosync 0} {pretend 0}}
     uninstall   {{follow-dependents 0}}

Modified: branches/gsoc08-privileges/base/src/port1.0/portbuild.tcl
===================================================================
--- branches/gsoc08-privileges/base/src/port1.0/portbuild.tcl	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/src/port1.0/portbuild.tcl	2008-06-15 19:59:08 UTC (rev 37620)
@@ -45,7 +45,7 @@
 commands build parallel_build
 # defaults
 default build.dir {${workpath}/${worksrcdir}}
-default build.cmd {[build_getnicevalue][build_getmaketype]}
+default build.cmd {[build_getmaketype]}
 default build.nice {${buildnicevalue}}
 default build.jobs {${buildmakejobs}}
 default build.pre_args {${build.target}}
@@ -143,6 +143,14 @@
 }
 
 proc build_main {args} {
-    command_exec build "" [build_getmakejobs]
+    global build.cmd
+
+    set nice_prefix [build_getnicevalue]
+    set jobs_suffix [build_getmakejobs]
+
+    set realcmd ${build.cmd}
+    set build.cmd "$nice_prefix${build.cmd}$jobs_suffix"
+    command_exec build
+    set build.cmd ${realcmd}
     return 0
 }

Modified: branches/gsoc08-privileges/base/src/port1.0/portutil.tcl
===================================================================
--- branches/gsoc08-privileges/base/src/port1.0/portutil.tcl	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/src/port1.0/portutil.tcl	2008-06-15 19:59:08 UTC (rev 37620)
@@ -758,6 +758,10 @@
     
         set cmdline $portutil::autoconf::sed_command
         if {$extended} {
+            if {$portutil::autoconf::sed_ext_flag == "N/A"} {
+                ui_debug "sed extended regexp not available"
+                return -code error "reinplace sed(1) too old"
+            }
             lappend cmdline $portutil::autoconf::sed_ext_flag
         }
         set cmdline [concat $cmdline [list $pattern < $file >@ $tmpfd]]
@@ -1188,19 +1192,20 @@
                     
                         # Determine deptypes to look for based on target
                         switch $target {
-                            configure   { set deptypes "depends_lib depends_build" }
-                            
+                            configure   -
                             build       { set deptypes "depends_lib depends_build" }
                         
                             test        -
                             destroot    -
                             install     -
                             archive     -
+                            dmg         -
                             pkg         -
                             mpkg        -
                             rpm         -
                             srpm        -
                             dpkg        -
+                            mdmg        -
                             activate    -
                             ""          { set deptypes "depends_lib depends_build depends_run" }
                         }

Modified: branches/gsoc08-privileges/base/src/port1.0/resources/fetch/mirror_sites.tcl
===================================================================
--- branches/gsoc08-privileges/base/src/port1.0/resources/fetch/mirror_sites.tcl	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/src/port1.0/resources/fetch/mirror_sites.tcl	2008-06-15 19:59:08 UTC (rev 37620)
@@ -258,6 +258,7 @@
 
 set portfetch::mirror_sites::sites(sourceforge) {
     http://downloads.sourceforge.net/
+    http://internode.dl.sourceforge.net/
     http://easynews.dl.sourceforge.net/
     http://ufpr.dl.sourceforge.net/
     http://kent.dl.sourceforge.net/

Modified: branches/gsoc08-privileges/base/src/registry1.0/portimage.tcl
===================================================================
--- branches/gsoc08-privileges/base/src/registry1.0/portimage.tcl	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/src/registry1.0/portimage.tcl	2008-06-15 19:59:08 UTC (rev 37620)
@@ -79,16 +79,18 @@
 		set force 0
 	}
 
-        if {$v != ""} {
-        	ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s @%s"] $name $v]"
-        } else {
-        	ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s"] $name]"
-        }
-
 	set ilist [_check_registry $name $v]
+	# set name again since the one we were passed may not have had the correct case
+	set name [lindex $ilist 0]
 	set version [lindex $ilist 1]
 	set revision [lindex $ilist 2]
 	set	variants [lindex $ilist 3]
+	
+    if {$v != ""} {
+        ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s @%s"] $name $v]"
+    } else {
+        ui_msg "$UI_PREFIX [format [msgcat::mc "Activating %s"] $name]"
+    }
 
 	set ilist [registry::installed $name]
 	if { [llength $ilist] > 1 } {
@@ -146,23 +148,25 @@
 		set force 0
 	}
 
-        if {$v != ""} {
-        	ui_msg "$UI_PREFIX [format [msgcat::mc "Deactivating %s @%s"] $name $v]"
-        } else {
-        	ui_msg "$UI_PREFIX [format [msgcat::mc "Deactivating %s"] $name]"
-        }
-
 	set ilist [registry::active $name]
 	if { [llength $ilist] > 1 } {
 		return -code error "Registry error: Please specify the name of the port."
 	} else {
 		set ilist [lindex $ilist 0]
 	}
+	# set name again since the one we were passed may not have had the correct case
+	set name [lindex $ilist 0]
 	set version [lindex $ilist 1]
 	set revision [lindex $ilist 2]
 	set	variants [lindex $ilist 3]
 	set fqversion ${version}_${revision}${variants}
 	
+    if {$v != ""} {
+        ui_msg "$UI_PREFIX [format [msgcat::mc "Deactivating %s @%s"] $name $v]"
+    } else {
+        ui_msg "$UI_PREFIX [format [msgcat::mc "Deactivating %s"] $name]"
+    }
+	
 	if { $v != "" && ![string equal ${fqversion} $v] } {
 		return -code error "Active version of $name is not $v but ${fqversion}."
 	}
@@ -217,6 +221,8 @@
 	set ilist [registry::installed $name $v]
 	if { [string equal $v ""] } {
 		if { [llength $ilist] > 1 } {
+		    # set name again since the one we were passed may not have had the correct case
+		    set name [lindex [lindex $ilist 0] 0]
 			ui_msg "$UI_PREFIX [msgcat::mc "The following versions of $name are currently installed:"]"
 			foreach i $ilist { 
 				set iname [lindex $i 0]

Modified: branches/gsoc08-privileges/base/src/registry1.0/portuninstall.tcl
===================================================================
--- branches/gsoc08-privileges/base/src/registry1.0/portuninstall.tcl	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/src/registry1.0/portuninstall.tcl	2008-06-15 19:59:08 UTC (rev 37620)
@@ -44,6 +44,7 @@
 
 	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 $ilist { 
 			set iname [lindex $i 0]
@@ -59,6 +60,8 @@
 		}
 		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]

Modified: branches/gsoc08-privileges/base/src/registry1.0/receipt_flat.tcl
===================================================================
--- branches/gsoc08-privileges/base/src/registry1.0/receipt_flat.tcl	2008-06-15 19:51:22 UTC (rev 37619)
+++ branches/gsoc08-privileges/base/src/registry1.0/receipt_flat.tcl	2008-06-15 19:59:08 UTC (rev 37620)
@@ -426,6 +426,19 @@
 		}
 		# [PG] Huh?
 	} else {
+	    # We want to be case-insensitive but case-preserving, so the name gets
+	    # returned with the correct case even if it's wrong when given. To get the
+	    # correct case on a case-insensitive FS, we have to list the directory and
+	    # compare against each entry.
+	    set name_path [file join ${query_path} *]
+	    set name_entries [glob -nocomplain -types d ${name_path}]
+	    foreach entry $name_entries {
+	        set basename [file tail $entry]
+	        if {[string equal -nocase $basename $name]} {
+	            set name $basename
+	            break
+	        }
+	    }
 		set query_path [file join ${query_path} ${name}]
 		if { $version != "" } {
 			set query_path [file join ${query_path} ${version}]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080615/fb66afec/attachment-0001.htm 


More information about the macports-changes mailing list