[147033] branches/vcs-fetch/base/src/port1.0

raimue at macports.org raimue at macports.org
Wed Mar 23 18:15:51 PDT 2016


Revision: 147033
          https://trac.macports.org/changeset/147033
Author:   raimue at macports.org
Date:     2016-03-23 18:15:50 -0700 (Wed, 23 Mar 2016)
Log Message:
-----------
Run mirror phase for fetch.type git

Modified Paths:
--------------
    branches/vcs-fetch/base/src/port1.0/portfetch.tcl
    branches/vcs-fetch/base/src/port1.0/portmirror.tcl

Modified: branches/vcs-fetch/base/src/port1.0/portfetch.tcl
===================================================================
--- branches/vcs-fetch/base/src/port1.0/portfetch.tcl	2016-03-24 01:14:01 UTC (rev 147032)
+++ branches/vcs-fetch/base/src/port1.0/portfetch.tcl	2016-03-24 01:15:50 UTC (rev 147033)
@@ -421,6 +421,16 @@
     return 0
 }
 
+# Check if port can be mirrored
+proc portfetch::mirrorable {args} {
+    global fetch.type
+    switch -- "${fetch.type}" {
+        git     { return [git_tarballable] }
+        standard -
+        default { return yes }
+    }
+}
+
 # Check if a tarball can be produced for git
 proc portfetch::git_tarballable {args} {
     global git.branch

Modified: branches/vcs-fetch/base/src/port1.0/portmirror.tcl
===================================================================
--- branches/vcs-fetch/base/src/port1.0/portmirror.tcl	2016-03-24 01:14:01 UTC (rev 147032)
+++ branches/vcs-fetch/base/src/port1.0/portmirror.tcl	2016-03-24 01:15:50 UTC (rev 147033)
@@ -53,13 +53,13 @@
 # It also records the path in a database.
 
 proc portmirror::mirror_main {args} {
-    global fetch.type mirror_filemap portdbpath
+    global mirror_filemap portdbpath
 
     set mirror_filemap_path [file join $portdbpath distfiles_mirror.db]
     filemap open mirror_filemap $mirror_filemap_path
 
     # Check the distfiles if it's a regular fetch phase.
-    if {${fetch.type} eq "standard"} {
+    if {[portfetch::mirrorable]} {
         # fetch the files.
         portfetch::fetch_init $args
         portfetch::fetch_start $args
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160323/a471d43d/attachment.html>


More information about the macports-changes mailing list