From 234af71b896e0377c94762625c0762fddb113607 Mon Sep 17 00:00:00 2001 From: Nicolas Mailhot Date: May 28 2019 19:38:02 +0000 Subject: make use of golist --with-tests in dynamic buildrequires --- diff --git a/rpm/macros.d/macros.go-rpm b/rpm/macros.d/macros.go-rpm index 7d919ac..392b56b 100644 --- a/rpm/macros.d/macros.go-rpm +++ b/rpm/macros.d/macros.go-rpm @@ -184,16 +184,11 @@ elseif forcedgoipath ~= "" then else golistargs = "--package-path %{goipath" .. rpm.expand("%{?-z*}") .. "}" end -local golistcmd = rpm.expand('GOPATH="%{?gobuilddir:%{gobuilddir}:}${GOPATH:+${GOPATH}:}%{?gopath}" ' .. - 'GO111MODULE=off ' .. - "golist --imported " .. golistargs .. - " --template 'golang({{.}})\\\\n'" .. - " --skip-self") --- https://pagure.io/golist/issue/3 -print('(\\n' .. - ' ' .. golistcmd .. '\\n' .. - ' ' .. golistcmd .. ' --tests\\n' .. - ') | sort -u\\n') +print(rpm.expand('GOPATH="%{?gobuilddir:%{gobuilddir}:}${GOPATH:+${GOPATH}:}%{?gopath}" ' .. + 'GO111MODULE=off ' .. + "golist --imported " .. golistargs .. + " --template 'golang({{.}})\\\\n'" .. + " --with-tests --skip-self\\n")) } # Try to install Go package files in sensible locations, with strict directory