Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isless problem on .7 and windows #138

Closed
RandomString123 opened this issue Feb 15, 2018 · 3 comments · Fixed by #139
Closed

isless problem on .7 and windows #138

RandomString123 opened this issue Feb 15, 2018 · 3 comments · Fixed by #139

Comments

@RandomString123
Copy link
Contributor

RandomString123 commented Feb 15, 2018

I get this error when trying to install gcc on .7.

I suspect that in .6 maximum() used < to do comparisons and now it uses isless(). I think the correct fix is to add an override for isless(RPMVersionNumber, RPMVersionNumber). But I wanted to open an issue to get feedback before doing so.

julia> WinRPM.install("gcc", yes=true)
INFO: Multiple package candidates found for mingw64-unistd-pthread-devel, picking newest.
ERROR: MethodError: no method matching isless(::WinRPM.RPMVersionNumber, ::WinRPM.RPMVersionNumber)
Closest candidates are:
  isless(::Missing, ::Any) at missing.jl:56
  isless(::Any, ::Missing) at missing.jl:57
Stacktrace:
 [1] max(::WinRPM.RPMVersionNumber, ::WinRPM.RPMVersionNumber) at .\operators.jl:365
 [2] mapreduce_empty at .\reduce.jl:345 [inlined]
 [3] _mapreduce at .\reduce.jl:337 [inlined]
 [4] mapreduce at .\reduce.jl:358 [inlined]
 [5] maximum at .\reduce.jl:521 [inlined]
 [6] select(::WinRPM.Packages{Array{LibExpat.ETree,1}}, ::String) at C:\Users\matth\.julia\v0.7\WinRPM\src\WinRPM.jl:257
 [7] rpm_provides(::Set{AbstractString}) at C:\Users\matth\.julia\v0.7\WinRPM\src\WinRPM.jl:290
 [8] deps(::WinRPM.Package) at C:\Users\matth\.julia\v0.7\WinRPM\src\WinRPM.jl:353
 [9] prepare_install(::WinRPM.Package) at C:\Users\matth\.julia\v0.7\WinRPM\src\WinRPM.jl:399
 [10] #install#21(::Bool, ::Function, ::WinRPM.Package) at C:\Users\matth\.julia\v0.7\WinRPM\src\WinRPM.jl:372
 [11] #install at .\<missing>:0 [inlined]
 [12] #install#19 at C:\Users\matth\.julia\v0.7\WinRPM\src\WinRPM.jl:361 [inlined]
 [13] #install at .\<missing>:0 [inlined] (repeats 2 times)
 [14] top-level scope
@nalimilan
Copy link
Member

You analysis sounds correct, given that ?isless says:

Non-numeric types with a canonical total order should implement this function.

AFAICT the < methods can just be changed to isless.

@RandomString123
Copy link
Contributor Author

RandomString123 commented Feb 15, 2018

I just added a mapping call for isless to <. While it is unlikely anything was using it I didn't want to break anything that might have been referencing <.
#139

Of course there were more breaking issues after this fix...I think another API has changed i'll work on that next ;)

INFO: Extracting: libgcc_s_seh1
┌ Warning: open(cmd) now returns only a Process<:IO object.
│ caller = next at deprecated.jl:193 [inlined]
└ @ Core deprecated.jl:193

ERROR: The system cannot find the file specified.
C:\Users\matth.julia\v0.7\WinRPM\cache\2\noarch%2Fmingw64-libgcc_s_seh1-7.2.0-3.1.noarch.cpio

@vinceblack99999
Copy link

vinceblack99999 commented Mar 8, 2018

https://github.com/JuliaPackaging/WinRPM.jl/pull/137/files/13f754fca0c2d3e13b4ead800db6ef1f62e7fc85

This works for me, solving problem with

ERROR: The system cannot find the file specified.
C:\Users\matth.julia\v0.7\WinRPM\cache\2\noarch%2Fmingw64-libgcc_s_seh1-7.2.0-3.1.noarch.cpio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants