Changeset 60369


Ignore:
Timestamp:
Nov 10, 2009, 8:41:06 AM (11 years ago)
Author:
blb@…
Message:

Merge from trunk

Location:
branches/gsoc09-logging/base
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc09-logging/base

  • branches/gsoc09-logging/base/configure

    r59527 r60369  
    695695FILE
    696696DSCL
    697 DITTO
    698697DIFF
    699698CPIO
     
    43034302
    43044303
    4305 # Extract the first word of "ditto", so it can be a program name with args.
    4306 set dummy ditto; ac_word=$2
    4307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    4308 $as_echo_n "checking for $ac_word... " >&6; }
    4309 if test "${ac_cv_path_DITTO+set}" = set; then :
    4310   $as_echo_n "(cached) " >&6
    4311 else
    4312   case $DITTO in
    4313   [\\/]* | ?:[\\/]*)
    4314   ac_cv_path_DITTO="$DITTO" # Let the user override the test with a path.
    4315   ;;
    4316   *)
    4317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    4318 for as_dir in $PATH
    4319 do
    4320   IFS=$as_save_IFS
    4321   test -z "$as_dir" && as_dir=.
    4322     for ac_exec_ext in '' $ac_executable_extensions; do
    4323   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    4324     ac_cv_path_DITTO="$as_dir/$ac_word$ac_exec_ext"
    4325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    4326     break 2
    4327   fi
    4328 done
    4329   done
    4330 IFS=$as_save_IFS
    4331 
    4332   ;;
    4333 esac
    4334 fi
    4335 DITTO=$ac_cv_path_DITTO
    4336 if test -n "$DITTO"; then
    4337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DITTO" >&5
    4338 $as_echo "$DITTO" >&6; }
    4339 else
    4340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    4341 $as_echo "no" >&6; }
    4342 fi
    4343 
    4344 
    43454304# Extract the first word of "dscl", so it can be a program name with args.
    43464305set dummy dscl; ac_word=$2
  • branches/gsoc09-logging/base/configure.ac

    r59527 r60369  
    9292AC_PATH_PROG(CPIO, [cpio], [])
    9393AC_PATH_PROG(DIFF, [diff], [])
    94 AC_PATH_PROG(DITTO, [ditto], [])
    9594AC_PATH_PROG(DSCL, [dscl], [])
    9695AC_PATH_PROG(FILE, [file], [])
  • branches/gsoc09-logging/base/src/package1.0/portdmg.tcl

    r52218 r60369  
    1 # et:ts=4
     1# -*- 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
    22# portdmg.tcl
    33# $Id$
     
    5959        set imagename "${portname}-${portversion}-${portrevision}"
    6060    } else {
    61         set imagename "${portname}-${portversion}"
     61        set imagename "${portname}-${portversion}"
    6262    }
    6363   
     
    6868    if {[file readable $final_image] && ([file mtime ${final_image}] >= [file mtime ${portpath}/Portfile])} {
    6969        ui_msg "$UI_PREFIX [format [msgcat::mc "Disk Image for %s-%s is up-to-date"] ${portname} ${portversion}]"
    70         return 0
     70        return 0
    7171    }
    72    
    73     # size for .dmg
    74     set size [dirSize ${pkgpath}]
    75     if {[expr ($size < 4194304)]} {
    76         # there is a minimum of 8292 512 blocks in a dmg
    77         set blocks 8292
    78     } else {
    79         # this should later be replaced with hdiutil create -srcfolder
    80         set blocks [expr ($size/512) + ((($size/512)*3)/100)]
    81     }
    82    
     72
    8373    # partition for .dmg
    8474    if {${os.major} >= 9 && ${os.arch} == "i386"} {
    85         # GUID_partition_scheme
     75        # GUID_partition_scheme
    8676        set subdev 1
    8777    } else {
    88         # Apple_partition_scheme (Apple_partition_map is at s1)
     78        # Apple_partition_scheme (Apple_partition_map is at s1)
    8979        set subdev 2
    9080    }
    9181   
    9282    set hdiutil [findBinary hdiutil $portutil::autoconf::hdiutil_path]
    93     if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -size ${blocks}b ${tmp_image}"] != ""} {
     83    if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -srcfolder ${pkgpath} ${tmp_image}"] != ""} {
    9484        return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
    9585    }
    96     if {[catch {set attach_output [exec $hdiutil attach -puppetstrings ${tmp_image} | grep s${subdev}]} error]} {
    97         return -code error [format [msgcat::mc "Failed to attach temporary image: %s"] ${error}]
    98     }
    99     set attach_output [split $attach_output "\t"]
    100     set devicename [string trim [lindex $attach_output 0]]
    101     set mount_point [string trim [lindex $attach_output 2]]
    102     regexp {(\/Volumes/[A-Za-z0-9\-\_\s].+)\s\(} $mount_point code mount_point
    103     system "[findBinary ditto $portutil::autoconf::ditto_path] -rsrcFork ${pkgpath} '${mount_point}/${portname}-${portversion}.pkg'"
    104     system "$hdiutil detach ${devicename} -quiet"
    10586    if {[system "$hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] != ""} {
    10687        return -code error [format [msgcat::mc "Failed to convert to final image: %s"] ${final_image}]
  • branches/gsoc09-logging/base/src/package1.0/portmdmg.tcl

    r52218 r60369  
    1 # et:ts=4
     1# -*- 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
    22# portmdmg.tcl
    33# $Id$
     
    5959        set imagename "${portname}-${portversion}-${portrevision}"
    6060    } else {
    61         set imagename "${portname}-${portversion}"
     61        set imagename "${portname}-${portversion}"
    6262    }
    6363   
     
    6868    if {[file readable $final_image] && ([file mtime ${final_image}] >= [file mtime ${portpath}/Portfile])} {
    6969        ui_msg "$UI_PREFIX [format [msgcat::mc "Disk Image for %s-%s is up-to-date"] ${portname} ${portversion}]"
    70         return 0
     70        return 0
    7171    }
    72    
    73     # size for .dmg
    74     set size [dirSize ${mpkgpath}]
    75     if {[expr ($size < 4194304)]} {
    76         # there is a minimum of 8292 512 blocks in a dmg
    77         set blocks 8292
    78     } else {
    79         # this is now replaced with hdiutil create -srcfolder
    80         set blocks [expr ($size/512) + ((($size/512)*3)/100)]
    81     }
    82    
     72
    8373    # partition for .dmg
    8474    if {${os.major} >= 9 && ${os.arch} == "i386"} {
    85         # GUID_partition_scheme
     75        # GUID_partition_scheme
    8676        set subdev 1
    8777    } else {
    88         # Apple_partition_scheme (Apple_partition_map is at s1)
     78        # Apple_partition_scheme (Apple_partition_map is at s1)
    8979        set subdev 2
    9080    }
    9181
    92   set hdiutil [findBinary hdiutil $portutil::autoconf::hdiutil_path]
    93   if {false} {
    94     if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -size ${blocks}b ${tmp_image}"] != ""} {
    95         return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
    96     }
    97     if {[catch {set attach_output [exec $hdiutil attach -puppetstrings ${tmp_image} | grep s${subdev}]} error]} {
    98         return -code error [format [msgcat::mc "Failed to attach temporary image: %s"] ${error}]
    99     }
    100     set attach_output [split $attach_output "\t"]
    101     set devicename [string trim [lindex $attach_output 0]]
    102     set mount_point [string trim [lindex $attach_output 2]]
    103     regexp {(\/Volumes/[A-Za-z0-9\-\_\s].+)\s\(} $mount_point code mount_point
    104     system "[findBinary ditto $portutil::autoconf::ditto_path] -rsrcFork ${mpkgpath} '${mount_point}/${portname}-${portversion}.mpkg'"
    105     system "$hdiutil detach ${devicename} -quiet"
    106   } else {
     82    set hdiutil [findBinary hdiutil $portutil::autoconf::hdiutil_path]
    10783    if {[system "$hdiutil create -quiet -fs HFS+ -volname ${imagename} -srcfolder ${mpkgpath} ${tmp_image}"] != ""} {
    10884        return -code error [format [msgcat::mc "Failed to create temporary image: %s"] ${imagename}]
    10985    }
    110   }
    11186    if {[system "$hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] != ""} {
    11287        return -code error [format [msgcat::mc "Failed to convert to final image: %s"] ${final_image}]
  • branches/gsoc09-logging/base/src/port1.0/port_autoconf.tcl.in

    r59527 r60369  
    3636        variable cpio_path "@CPIO@"
    3737        variable diff_path "@DIFF@"
    38         variable ditto_path "@DITTO@"
    3938        variable dscl_path "@DSCL@"
    4039        variable file_path "@FILE@"
  • branches/gsoc09-logging/base/src/port1.0/portclean.tcl

    r59535 r60369  
    219219proc portclean::clean_archive {args} {
    220220    global workpath portarchivepath name version ports_version_glob
    221     global configure.build_arch
    222 
    223     # Define archive destination directory and target filename
     221    global configure.build_arch configure.universal_archs
     222
     223    # Define archive destination directory, target filename, regex for archive name,
     224    # and universal arch string
    224225    if {$portarchivepath ne $workpath && $portarchivepath ne ""} {
    225         set archivepath [file join $portarchivepath [option os.platform] ${configure.build_arch}]
     226        if {[variant_exists universal] && [variant_isset universal]} {
     227            set archstring [join [lsort -ascii ${configure.universal_archs}] -]
     228            set archivepath [file join $portarchivepath [option os.platform] "universal"]
     229            set regexstring "^$name-\[-_a-zA-Z0-9\.\]+_\[0-9\]*\[+-_a-zA-Z0-9\]*\[\.\]${archstring}\[\.\]\[a-z2\]+\$"
     230        } else {
     231            set archivepath [file join $portarchivepath [option os.platform] ${configure.build_arch}]
     232            set regexstring "^$name-\[-_a-zA-Z0-9\.\]+_\[0-9\]*\[+-_a-zA-Z0-9\]*\[\.\]${configure.build_arch}\[\.\]\[a-z2\]+\$"
     233        }
    226234    }
    227235
    228236    if {[info exists ports_version_glob]} {
    229         # Match all possible archive variatns that match the version
     237        # Match all possible archive variants that match the version
    230238        # glob specified by the user for this OS.
    231         set fileglob "$name-[option ports_version_glob]*.${configure.build_arch}.*"
     239        if {[variant_exists universal] && [variant_isset universal]} {
     240            set fileglob "$name-[option ports_version_glob]*+universal.${archstring}.*"
     241        } else {
     242            set fileglob "$name-[option ports_version_glob]*.${configure.build_arch}.*"
     243        }
    232244    } else {
    233245        # Match all possible archive variants for the current version on
     
    236248        #
    237249        # We do this because if we don't, then ports that match the
    238         # first part of the name (e.g. trying to remove foo-*, it will
     250        # first part of the name (e.g. trying to remove foo-* will
    239251        # pick up anything foo-bar-* as well, which is undesirable).
    240         set fileglob "$name-$version*.${configure.build_arch}.*"
     252        if {[variant_exists universal] && [variant_isset universal]} {
     253            set fileglob "$name-$version*+universal.${archstring}.*"
     254        } else {
     255            set fileglob "$name-$version*.${configure.build_arch}.*"
     256        }
    241257    }
    242258
     
    247263            set file [file tail $path]
    248264            # Make sure file is truly a port archive file, and not
    249             # and accidental match with some other file that might exist.
    250             if {[regexp "^$name-\[-_a-zA-Z0-9\.\]+_\[0-9\]*\[+-_a-zA-Z0-9\]*\[\.\]${configure.build_arch}\[\.\]\[a-z2\]+\$" $file]} {
     265            # an accidental match with some other file that might exist.
     266            if {[regexp $regexstring $file]} {
    251267                if {[file isfile $path]} {
    252268                    ui_debug "Removing archive: $path"
Note: See TracChangeset for help on using the changeset viewer.