Skip to content

Commit b1fe60c

Browse files
committed
Silence linprog output in Pkg.resolve
(except in case of errors)
1 parent a5c8977 commit b1fe60c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

base/pkgmetadata.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ module Metadata
55
using Base
66
using LinProgGLPK
77

8-
import Main
98
import Git
9+
import GLPK
1010
import Base.isequal, Base.isless
1111

1212
export parse_requires, Version, VersionSet
@@ -167,7 +167,9 @@ function resolve(reqs::Vector{VersionSet})
167167
W[r,rem(i-1,n)+1] = -1
168168
W[r,div(i-1,n)+1] = G[i]
169169
end
170-
w = iround(linprog_simplex(u,W,zeros(Int,length(I)),nothing,nothing,u,nothing)[2])
170+
lpopts = GLPK.SimplexParam()
171+
lpopts["msg_lev"] = GLPK.MSG_ERR
172+
w = iround(linprog_simplex(u,W,zeros(Int,length(I)),nothing,nothing,u,nothing,lpopts)[2])
171173

172174
V = [ p == v.package ? 1 : 0 for p=pkgs, v=vers ]
173175
R = [ contains(r,v) ? -1 : 0 for r=reqs, v=vers ]
@@ -176,7 +178,7 @@ function resolve(reqs::Vector{VersionSet})
176178
-ones(Int,length(reqs))
177179
zeros(Int,length(deps)) ]
178180

179-
x = linprog_simplex(w,[V;R;D],b,nothing,nothing,z,u)[2]
181+
x = linprog_simplex(w,[V;R;D],b,nothing,nothing,z,u,lpopts)[2]
180182
h = (String=>ASCIIString)[]
181183
for v in vers[x .> 0.5]
182184
h[v.package] = readchomp("METADATA/$(v.package)/versions/$(v.version)/sha1")

0 commit comments

Comments
 (0)