Changeset 67207


Ignore:
Timestamp:
May 2, 2010, 7:04:35 PM (10 years ago)
Author:
jmr@…
Message:

rsync the PortIndex from a platform-specific subdir

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/macports1.0/macports.tcl

    r67051 r67207  
    18901890                # Keep rsync happy with a trailing slash
    18911891                if {[string index $source end] != "/"} {
    1892                     set source "${source}/"
    1893                 }
    1894                 # don't sync PortIndex unless it doesn't exist
    1895                 set exclude_option ""
    1896                 if {[file isfile $indexfile]} {
    1897                     set exclude_option " '--exclude=/PortIndex*'"
    1898                 }
     1892                    append source "/"
     1893                }
     1894                # don't sync PortIndex yet; we grab the platform specific one afterwards
     1895                set exclude_option "'--exclude=/PortIndex*'"
    18991896                # Do rsync fetch
    1900                 set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options}${exclude_option} ${source} ${destdir}"
     1897                set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options} ${exclude_option} ${source} ${destdir}"
    19011898                ui_debug $rsync_commandline
    19021899                if {[catch {system $rsync_commandline}]} {
     
    19041901                    incr numfailed
    19051902                    continue
     1903                }
     1904                # now sync the index if the local file is missing or older than a day
     1905                if {![file isfile $indexfile] || [expr [clock seconds] - [file mtime $indexfile]] > 86400} {
     1906                    set remote_indexfile "${source}PortIndex_${macports::os_platform}_${macports::os_major}_${macports::os_arch}/PortIndex"
     1907                    set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options} $remote_indexfile ${destdir}"
     1908                    ui_debug $rsync_commandline
     1909                    if {[catch {system $rsync_commandline}]} {
     1910                        ui_debug "Synchronization of the PortIndex failed doing rsync"
     1911                    }
    19061912                }
    19071913                if {[catch {system "chmod -R a+r \"$destdir\""}]} {
Note: See TracChangeset for help on using the changeset viewer.