Skip to content

Commit

Permalink
Merge pull request #1 from tboerger/feature/remove-go-version
Browse files Browse the repository at this point in the history
Remove runtime dependency for Go API
  • Loading branch information
flavio committed Apr 15, 2016
2 parents 6c37d31 + 60200ba commit 71c2a60
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions golang.req
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ buildroot = RpmSysinfo.get_buildroot
contribdir = RpmSysinfo.get_go_contribdir
importpath = RpmSysinfo.get_go_importpath

def go_get_version()
IO.popen("go version") do |process|
process.each_line do |l|
version_re = /^go version go(\S+)\s+([^\/]+)\/(.*)$/
md = version_re.match(l.chomp)
# 1:"1.6" 2:"linux" 3:"amd64"
return md[1] if md
end
end
end

# read stdin for filelist rpm feeds us for a (sub) package
filelist = []
ARGF.each do |l|
Expand All @@ -32,9 +21,6 @@ end
requires = []

unless filelist.empty? then

requires << "golang(API) = " + go_get_version()

filelist.each do |f|
# unarchive .a
system("ar -x #{f} __.PKGDEF")
Expand All @@ -60,7 +46,7 @@ unless filelist.empty? then
end

requires.each do |p|
puts p
puts p
end

end

0 comments on commit 71c2a60

Please sign in to comment.