[152661] branches/release_2_3/base

raimue at macports.org raimue at macports.org
Wed Sep 14 06:49:47 PDT 2016


Revision: 152661
          https://trac.macports.org/changeset/152661
Author:   raimue at macports.org
Date:     2016-09-14 06:49:47 -0700 (Wed, 14 Sep 2016)
Log Message:
-----------
merge r147347 from trunk:
 mportsync: fetch tar and signature at once
 
 Both ports.tar and ports.tar.rmd160 can be transferred in the same connection,
 removing the need for setting up another rsync process and its connection time.

 Conflicts with new try/catch vs. catch resolved.

Revision Links:
--------------
    https://trac.macports.org/changeset/147347

Modified Paths:
--------------
    branches/release_2_3/base/src/macports1.0/macports.tcl

Property Changed:
----------------
    branches/release_2_3/base/
    branches/release_2_3/base/src/


Property changes on: branches/release_2_3/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/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:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511,136965,137850,138461,138530,138749,139270,140693,140724,141134,141412,145037,145162,146644,147456,149529,150305,152447
/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/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/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:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511,136965,137850,138461,138530,138749,139270,140693,140724,141134,141412,145037,145162,146644,147347,147456,149529,150305,152447
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692


Property changes on: branches/release_2_3/base/src
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src:37343-46937
/branches/gsoc09-logging/base/src:51231-60371
/branches/gsoc11-rev-upgrade/base/src:78828-88375
/branches/gsoc11-statistics/base/src:79520,79666
/branches/gsoc13-tests/src:106692-111324
/branches/universal-sanity/base/src:51872-52323
/branches/variant-descs-14482/base/src:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511,135851,136965,137850,138461,138530,138749,139270,141134,141412,145037,145162,146644,147456,150305,152447
/users/perry/base-bugs_and_notes/src:45682-46060
/users/perry/base-select/src:44044-44692
   + /branches/gsoc08-privileges/base/src:37343-46937
/branches/gsoc09-logging/base/src:51231-60371
/branches/gsoc11-rev-upgrade/base/src:78828-88375
/branches/gsoc11-statistics/base/src:79520,79666
/branches/gsoc13-tests/src:106692-111324
/branches/universal-sanity/base/src:51872-52323
/branches/variant-descs-14482/base/src:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511,135851,136965,137850,138461,138530,138749,139270,141134,141412,145037,145162,146644,147347,147456,150305,152447
/users/perry/base-bugs_and_notes/src:45682-46060
/users/perry/base-select/src:44044-44692

Modified: branches/release_2_3/base/src/macports1.0/macports.tcl
===================================================================
--- branches/release_2_3/base/src/macports1.0/macports.tcl	2016-09-14 13:43:38 UTC (rev 152660)
+++ branches/release_2_3/base/src/macports1.0/macports.tcl	2016-09-14 13:49:47 UTC (rev 152661)
@@ -2214,12 +2214,16 @@
 # (private)
 #
 # @param url source URL to check
-# @return a list containing filename and extension or an empty list
-proc _source_is_snapshot {url {filename {}} {extension {}}} {
+# @param filename upvar variable name for filename
+# @param extension upvar variable name for extension
+# @param extension upvar variable name for URL excluding the filename
+proc _source_is_snapshot {url {filename {}} {extension {}} {rooturl {}}} {
+    upvar $rooturl myrooturl
     upvar $filename myfilename
     upvar $extension myextension
 
-    if {[regexp {^(?:https?|ftp|rsync)://.+/(.+\.(tar\.gz|tar\.bz2|tar))$} $url -> f e]} {
+    if {[regexp {^((?:https?|ftp|rsync)://.+/)(.+\.(tar\.gz|tar\.bz2|tar))$} $url -> u f e]} {
+        set myrooturl $u
         set myfilename $f
         set myextension $e
 
@@ -2350,13 +2354,15 @@
                 # Where to, boss?
                 set indexfile [macports::getindex $source]
                 set destdir [file dirname $indexfile]
-                set is_tarball [_source_is_snapshot $source]
+                set is_tarball [_source_is_snapshot $source filename extension rooturl]
                 file mkdir $destdir
 
                 if {$is_tarball} {
-                    set exclude_option {}
+                    set exclude_option "--exclude=*"
+                    set include_option "--include=/${filename} --include=/${filename}.rmd160"
                     # need to do a few things before replacing the ports tree in this case
                     set destdir [file dirname $destdir]
+                    set srcstr $rooturl
                 } else {
                     # Keep rsync happy with a trailing slash
                     if {[string index $source end] ne {/}} {
@@ -2364,9 +2370,11 @@
                     }
                     # don't sync PortIndex yet; we grab the platform specific one afterwards
                     set exclude_option '--exclude=/PortIndex*'
+                    set include_option {}
+                    set srcstr $source
                 }
                 # Do rsync fetch
-                set rsync_commandline "$macports::autoconf::rsync_path $rsync_options $exclude_option $source $destdir"
+                set rsync_commandline "$macports::autoconf::rsync_path $rsync_options $include_option $exclude_option $srcstr $destdir"
                 ui_debug $rsync_commandline
                 if {[catch {system $rsync_commandline}]} {
                     ui_error "Synchronization of the local ports tree failed doing rsync"
@@ -2377,13 +2385,6 @@
                 if {$is_tarball} {
                     # verify signature for tarball
                     global macports::archivefetch_pubkeys
-                    set rsync_commandline "$macports::autoconf::rsync_path $rsync_options $exclude_option ${source}.rmd160 $destdir"
-                    ui_debug $rsync_commandline
-                    if {[catch {system $rsync_commandline}]} {
-                        ui_error "Synchronization of the ports tree signature failed doing rsync"
-                        incr numfailed
-                        continue
-                    }
                     set tarball ${destdir}/[file tail $source]
                     set signature ${tarball}.rmd160
                     set openssl [macports::findBinary openssl $macports::autoconf::openssl_path]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160914/9b0e3e60/attachment.html>


More information about the macports-changes mailing list