dmgk / modules2tuple

Generate GH_TUPLE/GL_TUPLE from modules.txt
BSD 2-Clause "Simplified" License
15 stars 2 forks source link

modules2tuple generates GH_TUPLE that breaks (cheat/cheat project) #6

Closed yurivict closed 5 years ago

yurivict commented 5 years ago

The GH_TUPLE below was generated by modules2tuple:

# $FreeBSD$

PORTNAME=       cheat
DISTVERSION=    3.0.6
CATEGORIES=     misc

MAINTAINER=     yuri@FreeBSD.org
COMMENT=        Create and view interactive cheatsheets on the command-line

LICENSE=        MIT
LICENSE_FILE=   ${WRKSRC}/LICENSE.txt

USES=           go:modules
USE_GITHUB=     yes
GH_TUPLE=       \
                alecthomas:chroma:v0.6.8:alecthomas_chroma/vendor/github.com/alecthomas/chroma \
                danwakefield:fnmatch:cbb64ac3d964:danwakefield_fnmatch/vendor/github.com/danwakefield/fnmatch \
                davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \
                dlclark:regexp2:v1.1.6:dlclark_regexp2/vendor/github.com/dlclark/regexp2 \
                docopt:docopt-go:ee0de3bc6815:docopt_docopt_go/vendor/github.com/docopt/docopt-go \
                go-yaml:yaml:9f9df34309c0:go_yaml_yaml/vendor/gopkg.in/yaml.v1 \
                go-yaml:yaml:v2.2.4:go_yaml_yaml/vendor/gopkg.in/yaml.v2 \
                golang:sys:543471e840be:golang_sys/vendor/golang.org/x/sys \
                mattn:go-colorable:v0.0.9:mattn_go_colorable/vendor/github.com/mattn/go-colorable \
                mattn:go-isatty:v0.0.10:mattn_go_isatty/vendor/github.com/mattn/go-isatty \
                mgutz:ansi:9520e82c474b:mgutz_ansi/vendor/github.com/mgutz/ansi \
                mitchellh:go-homedir:v1.1.0:mitchellh_go_homedir/vendor/github.com/mitchellh/go-homedir

PLIST_FILES=    bin/${PORTNAME}

.include <bsd.port.mk>

but it breaks:

mv: rename /usr/ports/misc/cheat/work/docopt-go-ee0de3bc6815 to /usr/ports/misc/cheat/work/cheat-3.0.6/vendor/github.com/docopt/docopt-go/docopt-go-ee0de3bc6815: No such file or directory
dmgk commented 5 years ago

@yurivict Can you post vendor/modules.txt from which it was generated?

dmgk commented 5 years ago

Ok, this is not a modules2tuple issue.

One of the dependencies - github.com/docopt/docopt-go - was renamed to github.com/docopt/docopt.go but go.mod still refers to it by the old name. Github does redirects so fetch works but downloaded archive contains docopt.go and not docopt-go directory as expected by GH_TUPLE machinery.

Renaming

docopt:docopt-go:ee0de3bc6815:...

to

docopt:docopt.go:ee0de3bc6815:..

fixes the issue.