Skip to content
Permalink
Browse files

Use a generic check if a port is tarballable

  • Loading branch information
raimue committed Mar 11, 2018
1 parent 0be6563 commit 8052d245d1e7ef1f5fc9a7bef0daa4042f7cf900
Showing with 22 additions and 11 deletions.
  1. +22 −11 src/port1.0/portfetch.tcl
@@ -441,6 +441,27 @@ proc portfetch::svnfetch {args} {
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
}
}

# Returns true if port is fetched from VCS and can be put into a tarball
proc portfetch::tarballable {args} {
global fetch.type
switch -- "${fetch.type}" {
git {
return [git_tarballable]
}
}
return no
}

# Returns true if port can be mirrored
proc portfetch::mirrorable {args} {
global fetch.type
@@ -450,7 +471,7 @@ proc portfetch::mirrorable {args} {
ui_debug "port cannot be mirrored, no checksums for ${fetch.type}"
return no
}
if {![git_tarballable]} {
if {![tarballable]} {
ui_debug "port cannot be mirrored, not tarballable for ${fetch.type}"
return no
}
@@ -463,16 +484,6 @@ proc portfetch::mirrorable {args} {
}
}

# 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 \

0 comments on commit 8052d24

Please sign in to comment.
You can’t perform that action at this time.