Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#51607 closed defect (invalid)

github-1.0.tcl Expects directory to be unzipped & fails if directory not present

Reported by: jyergatian (Jon Yergatian) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port:

Description

Line 174-177 of github-1.0.tcl performs a glob search expecting a non-standardized format of author-project-*. Many of the Portfiles i've generated using this PortGroup fail because the extracted contents are simple binaries, with no author or suffix attached.

if {[file exists [glob ${workpath}/${github.author}-${github.project}-*]] && \
            [file isdirectory [glob ${workpath}/${github.author}-${github.project}-*]]} {
                move [glob ${workpath}/${github.author}-${github.project}-*] ${workpath}/${distname}
            }

Logic must be added to be more inclusive of ${workpath}/${github.project}

Change History (7)

comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Please give a specific example of a github project where this fails. To the best of my knowledge, this should work for all of github's automatically-generated tarballs.

comment:2 in reply to:  1 ; Changed 8 years ago by jyergatian (Jon Yergatian)

Replying to ryandesign@…:

Please give a specific example of a github project where this fails. To the best of my knowledge, this should work for all of github's automatically-generated tarballs.

https://github.com/digitalocean/doctl/releases is a good example.

I'm new to Portfiles and TCL so I wouldn't be surprised if I'm missing something. I can attach my Portfile if you'd find it helpful. I event went so far as editing github-1.0.tcl locally but so far my modifications have proven futile.

comment:3 in reply to:  2 Changed 8 years ago by jyergatian (Jon Yergatian)

Replying to sonofiron@…:

Replying to ryandesign@…:

Please give a specific example of a github project where this fails. To the best of my knowledge, this should work for all of github's automatically-generated tarballs.

https://github.com/digitalocean/doctl/releases is a good example.

I'm new to Portfiles and TCL so I wouldn't be surprised if I'm missing something. I can attach my Portfile if you'd find it helpful. I event went so far as editing github-1.0.tcl locally but so far my modifications have proven futile.

To specify, I've set distfiles to doctl-1.2.0-darwin-10.6-amd64.tar.gz - not the source bundle, perhaps that's my error?

comment:4 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

If you're going to use a release download, instead of an automatically generated tarball, set:

github.tarball_from releases

This and other instructions for using the github portgroup are at the top of the github portgroup file.

However, this particular file appears to be a pre-compiled binary for a specific version of OS X and a specific processor. MacPorts runs on many versions of OS X and many types of processor, so we would prefer ports that build from source.

comment:5 Changed 8 years ago by mf2k (Frank Schima)

Keywords: github-1.0.tcl removed

comment:6 Changed 7 years ago by Bo98 (Bo Anderson)

Not all GitHub projects rely on automatically generated tarballs for source distribution. There are projects which provide a separate tarball for the source as part of the release and tell you to use that, mostly because GitHub's automatically generated tarballs do not include git submodules. This is still an issue in those scenarios.

comment:7 Changed 7 years ago by Bo98 (Bo Anderson)

It would seem the post-extract stuff is only relevant if github.tarball_from is set to "tags" but there is no check for that.

Note: See TracTickets for help on using tickets.