[146673] branches/vcs-fetch/base/src/port1.0/portfetch.tcl

raimue at macports.org raimue at macports.org
Tue Mar 15 05:11:29 PDT 2016


Revision: 146673
          https://trac.macports.org/changeset/146673
Author:   raimue at macports.org
Date:     2016-03-15 05:11:29 -0700 (Tue, 15 Mar 2016)
Log Message:
-----------
Check if a tarball can be produced in git_tarballable

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

Modified: branches/vcs-fetch/base/src/port1.0/portfetch.tcl
===================================================================
--- branches/vcs-fetch/base/src/port1.0/portfetch.tcl	2016-03-15 11:40:23 UTC (rev 146672)
+++ branches/vcs-fetch/base/src/port1.0/portfetch.tcl	2016-03-15 12:11:29 UTC (rev 146673)
@@ -418,6 +418,16 @@
     return 0
 }
 
+# Check if a tarball can be produced for git
+proc portfetch::git_tarballable {args} {
+    global git.branch
+    if {${git.branch} eq ""} {
+        return no
+    } else {
+        return yes
+    }
+}
+
 # Perform a git fetch
 proc portfetch::gitfetch {args} {
     global UI_PREFIX \
@@ -427,7 +437,7 @@
 
     set generatedfile "${distpath}/${git.file}"
 
-    if {${git.branch} ne "" && [file isfile "${generatedfile}"]} {
+    if {[git_tarballable] && [file isfile "${generatedfile}"]} {
         return 0
     }
 
@@ -448,7 +458,7 @@
         return -code error [msgcat::mc "Git clone failed"]
     }
 
-    if {${git.branch} eq ""} {
+    if {![git_tarballable]} {
         file rename ${generatedpath} ${worksrcpath}
         return 0
     }
@@ -608,7 +618,7 @@
 
     switch -- "${fetch.type}" {
         git {
-            if {${git.branch} ne ""} {
+            if {[git_tarballable]} {
                 lappend all_dist_files ${distname}.${fetch.type}.tar.xz
                 distfiles-append ${distname}.${fetch.type}.tar.xz
             }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160315/fd396c2a/attachment.html>


More information about the macports-changes mailing list