[60369] branches/gsoc09-logging/base

blb at macports.org blb at macports.org
Tue Nov 10 00:41:09 PST 2009


Revision: 60369
          http://trac.macports.org/changeset/60369
Author:   blb at macports.org
Date:     2009-11-10 00:41:06 -0800 (Tue, 10 Nov 2009)
Log Message:
-----------
Merge from trunk

Modified Paths:
--------------
    branches/gsoc09-logging/base/configure
    branches/gsoc09-logging/base/configure.ac
    branches/gsoc09-logging/base/src/package1.0/portdmg.tcl
    branches/gsoc09-logging/base/src/package1.0/portmdmg.tcl
    branches/gsoc09-logging/base/src/port1.0/port_autoconf.tcl.in
    branches/gsoc09-logging/base/src/port1.0/portclean.tcl

Property Changed:
----------------
    branches/gsoc09-logging/base/


Property changes on: branches/gsoc09-logging/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/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:51231-60074
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/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:51231-60368
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/gsoc09-logging/base/configure
===================================================================
--- branches/gsoc09-logging/base/configure	2009-11-10 07:54:04 UTC (rev 60368)
+++ branches/gsoc09-logging/base/configure	2009-11-10 08:41:06 UTC (rev 60369)
@@ -694,7 +694,6 @@
 CVS
 FILE
 DSCL
-DITTO
 DIFF
 CPIO
 CP
@@ -4302,46 +4301,6 @@
 fi
 
 
-# Extract the first word of "ditto", so it can be a program name with args.
-set dummy ditto; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DITTO+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $DITTO in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_DITTO="$DITTO" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_DITTO="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-DITTO=$ac_cv_path_DITTO
-if test -n "$DITTO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DITTO" >&5
-$as_echo "$DITTO" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
 # Extract the first word of "dscl", so it can be a program name with args.
 set dummy dscl; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5

Modified: branches/gsoc09-logging/base/configure.ac
===================================================================
--- branches/gsoc09-logging/base/configure.ac	2009-11-10 07:54:04 UTC (rev 60368)
+++ branches/gsoc09-logging/base/configure.ac	2009-11-10 08:41:06 UTC (rev 60369)
@@ -91,7 +91,6 @@
 AC_PATH_PROG(CP, [cp], [])
 AC_PATH_PROG(CPIO, [cpio], [])
 AC_PATH_PROG(DIFF, [diff], [])
-AC_PATH_PROG(DITTO, [ditto], [])
 AC_PATH_PROG(DSCL, [dscl], [])
 AC_PATH_PROG(FILE, [file], [])
 AC_PATH_PROG(CVS, [cvs], [])

Modified: branches/gsoc09-logging/base/src/package1.0/portdmg.tcl
===================================================================
--- branches/gsoc09-logging/base/src/package1.0/portdmg.tcl	2009-11-10 07:54:04 UTC (rev 60368)
+++ branches/gsoc09-logging/base/src/package1.0/portdmg.tcl	2009-11-10 08:41:06 UTC (rev 60369)
@@ -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
 # portdmg.tcl
 # $Id$
 #
@@ -58,7 +58,7 @@
     if {[expr (${portrevision} > 0)]} {
         set imagename "${portname}-${portversion}-${portrevision}"
     } else {
-	set imagename "${portname}-${portversion}"
+        set imagename "${portname}-${portversion}"
     }
     
     set tmp_image ${package.destpath}/${imagename}.tmp.dmg
@@ -67,41 +67,22 @@
     
     if {[file readable $final_image] && ([file mtime ${final_image}] >= [file mtime ${portpath}/Portfile])} {
         ui_msg "$UI_PREFIX [format [msgcat::mc "Disk Image for %s-%s is up-to-date"] ${portname} ${portversion}]"
-	return 0
+        return 0
     }
-    
-    # size for .dmg
-    set size [dirSize ${pkgpath}]
-    if {[expr ($size < 4194304)]} {
-	# there is a minimum of 8292 512 blocks in a dmg
-        set blocks 8292
-    } else {
-	# this should later be replaced with hdiutil create -srcfolder
-        set blocks [expr ($size/512) + ((($size/512)*3)/100)]
-    }
-    
+
     # partition for .dmg
     if {${os.major} >= 9 && ${os.arch} == "i386"} {
-	# GUID_partition_scheme
+        # GUID_partition_scheme
         set subdev 1
     } else {
-	# Apple_partition_scheme (Apple_partition_map is at s1)
+        # Apple_partition_scheme (Apple_partition_map is at s1)
         set subdev 2
     }
     
     set hdiutil [findBinary hdiutil $portutil::autoconf::hdiutil_path]
-    if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -size ${blocks}b ${tmp_image}"] != ""} {
+    if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -srcfolder ${pkgpath} ${tmp_image}"] != ""} {
         return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
     }
-    if {[catch {set attach_output [exec $hdiutil attach -puppetstrings ${tmp_image} | grep s${subdev}]} error]} {
-        return -code error [format [msgcat::mc "Failed to attach temporary image: %s"] ${error}]
-    }
-    set attach_output [split $attach_output "\t"]
-    set devicename [string trim [lindex $attach_output 0]]
-    set mount_point [string trim [lindex $attach_output 2]]
-    regexp {(\/Volumes/[A-Za-z0-9\-\_\s].+)\s\(} $mount_point code mount_point
-    system "[findBinary ditto $portutil::autoconf::ditto_path] -rsrcFork ${pkgpath} '${mount_point}/${portname}-${portversion}.pkg'"
-    system "$hdiutil detach ${devicename} -quiet"
     if {[system "$hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] != ""} {
         return -code error [format [msgcat::mc "Failed to convert to final image: %s"] ${final_image}]
     }

Modified: branches/gsoc09-logging/base/src/package1.0/portmdmg.tcl
===================================================================
--- branches/gsoc09-logging/base/src/package1.0/portmdmg.tcl	2009-11-10 07:54:04 UTC (rev 60368)
+++ branches/gsoc09-logging/base/src/package1.0/portmdmg.tcl	2009-11-10 08:41:06 UTC (rev 60369)
@@ -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
 # portmdmg.tcl
 # $Id$
 #
@@ -58,7 +58,7 @@
     if {[expr (${portrevision} > 0)]} {
         set imagename "${portname}-${portversion}-${portrevision}"
     } else {
-	set imagename "${portname}-${portversion}"
+        set imagename "${portname}-${portversion}"
     }
     
     set tmp_image ${package.destpath}/${imagename}.tmp.dmg
@@ -67,47 +67,22 @@
     
     if {[file readable $final_image] && ([file mtime ${final_image}] >= [file mtime ${portpath}/Portfile])} {
         ui_msg "$UI_PREFIX [format [msgcat::mc "Disk Image for %s-%s is up-to-date"] ${portname} ${portversion}]"
-	return 0
+        return 0
     }
-    
-    # size for .dmg
-    set size [dirSize ${mpkgpath}]
-    if {[expr ($size < 4194304)]} {
-	# there is a minimum of 8292 512 blocks in a dmg
-        set blocks 8292
-    } else {
-	# this is now replaced with hdiutil create -srcfolder
-        set blocks [expr ($size/512) + ((($size/512)*3)/100)]
-    }
-    
+
     # partition for .dmg
     if {${os.major} >= 9 && ${os.arch} == "i386"} {
-	# GUID_partition_scheme
+        # GUID_partition_scheme
         set subdev 1
     } else {
-	# Apple_partition_scheme (Apple_partition_map is at s1)
+        # Apple_partition_scheme (Apple_partition_map is at s1)
         set subdev 2
     }
 
-  set hdiutil [findBinary hdiutil $portutil::autoconf::hdiutil_path]
-  if {false} {
-    if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -size ${blocks}b ${tmp_image}"] != ""} {
-        return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
-    }
-    if {[catch {set attach_output [exec $hdiutil attach -puppetstrings ${tmp_image} | grep s${subdev}]} error]} {
-        return -code error [format [msgcat::mc "Failed to attach temporary image: %s"] ${error}]
-    }
-    set attach_output [split $attach_output "\t"]
-    set devicename [string trim [lindex $attach_output 0]]
-    set mount_point [string trim [lindex $attach_output 2]]
-    regexp {(\/Volumes/[A-Za-z0-9\-\_\s].+)\s\(} $mount_point code mount_point
-    system "[findBinary ditto $portutil::autoconf::ditto_path] -rsrcFork ${mpkgpath} '${mount_point}/${portname}-${portversion}.mpkg'"
-    system "$hdiutil detach ${devicename} -quiet"
-  } else {
+    set hdiutil [findBinary hdiutil $portutil::autoconf::hdiutil_path]
     if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -srcfolder ${mpkgpath} ${tmp_image}"] != ""} {
         return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
     }
-  }
     if {[system "$hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] != ""} {
         return -code error [format [msgcat::mc "Failed to convert to final image: %s"] ${final_image}]
     }

Modified: branches/gsoc09-logging/base/src/port1.0/port_autoconf.tcl.in
===================================================================
--- branches/gsoc09-logging/base/src/port1.0/port_autoconf.tcl.in	2009-11-10 07:54:04 UTC (rev 60368)
+++ branches/gsoc09-logging/base/src/port1.0/port_autoconf.tcl.in	2009-11-10 08:41:06 UTC (rev 60369)
@@ -35,7 +35,6 @@
 	variable cp_path "@CP@"
 	variable cpio_path "@CPIO@"
 	variable diff_path "@DIFF@"
-	variable ditto_path "@DITTO@"
 	variable dscl_path "@DSCL@"
 	variable file_path "@FILE@"
 	variable cvs_path "@CVS@"

Modified: branches/gsoc09-logging/base/src/port1.0/portclean.tcl
===================================================================
--- branches/gsoc09-logging/base/src/port1.0/portclean.tcl	2009-11-10 07:54:04 UTC (rev 60368)
+++ branches/gsoc09-logging/base/src/port1.0/portclean.tcl	2009-11-10 08:41:06 UTC (rev 60369)
@@ -218,26 +218,42 @@
 
 proc portclean::clean_archive {args} {
     global workpath portarchivepath name version ports_version_glob
-    global configure.build_arch
+    global configure.build_arch configure.universal_archs
 
-    # Define archive destination directory and target filename
+    # Define archive destination directory, target filename, regex for archive name,
+    # and universal arch string
     if {$portarchivepath ne $workpath && $portarchivepath ne ""} {
-        set archivepath [file join $portarchivepath [option os.platform] ${configure.build_arch}]
+        if {[variant_exists universal] && [variant_isset universal]} {
+            set archstring [join [lsort -ascii ${configure.universal_archs}] -]
+            set archivepath [file join $portarchivepath [option os.platform] "universal"]
+            set regexstring "^$name-\[-_a-zA-Z0-9\.\]+_\[0-9\]*\[+-_a-zA-Z0-9\]*\[\.\]${archstring}\[\.\]\[a-z2\]+\$"
+        } else {
+            set archivepath [file join $portarchivepath [option os.platform] ${configure.build_arch}]
+            set regexstring "^$name-\[-_a-zA-Z0-9\.\]+_\[0-9\]*\[+-_a-zA-Z0-9\]*\[\.\]${configure.build_arch}\[\.\]\[a-z2\]+\$"
+        }
     }
 
     if {[info exists ports_version_glob]} {
-        # Match all possible archive variatns that match the version
+        # Match all possible archive variants that match the version
         # glob specified by the user for this OS.
-        set fileglob "$name-[option ports_version_glob]*.${configure.build_arch}.*"
+        if {[variant_exists universal] && [variant_isset universal]} {
+            set fileglob "$name-[option ports_version_glob]*+universal.${archstring}.*"
+        } else {
+            set fileglob "$name-[option ports_version_glob]*.${configure.build_arch}.*"
+        }
     } else {
         # Match all possible archive variants for the current version on
         # this OS. If you want to delete previous versions, use the
         # version glob argument to clean.
         #
         # We do this because if we don't, then ports that match the
-        # first part of the name (e.g. trying to remove foo-*, it will
+        # first part of the name (e.g. trying to remove foo-* will
         # pick up anything foo-bar-* as well, which is undesirable).
-        set fileglob "$name-$version*.${configure.build_arch}.*"
+        if {[variant_exists universal] && [variant_isset universal]} {
+            set fileglob "$name-$version*+universal.${archstring}.*"
+        } else {
+            set fileglob "$name-$version*.${configure.build_arch}.*"
+        }
     }
 
     # Remove the archive files
@@ -246,8 +262,8 @@
         foreach path $archivelist {
             set file [file tail $path]
             # Make sure file is truly a port archive file, and not
-            # and accidental match with some other file that might exist.
-            if {[regexp "^$name-\[-_a-zA-Z0-9\.\]+_\[0-9\]*\[+-_a-zA-Z0-9\]*\[\.\]${configure.build_arch}\[\.\]\[a-z2\]+\$" $file]} {
+            # an accidental match with some other file that might exist.
+            if {[regexp $regexstring $file]} {
                 if {[file isfile $path]} {
                     ui_debug "Removing archive: $path"
                     if {[catch {delete $path} result]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091110/ba6f1491/attachment.html>


More information about the macports-changes mailing list