haikuports / haikuporter

The tool that builds HaikuPorts recipes.
MIT License
40 stars 44 forks source link

Explicitly state which dependency could not be satisfied (or why) #256

Closed OscarL closed 1 year ago

OscarL commented 1 year ago

While trying to build "opencolorio-2.0.1" on beta4, 32 bits (x86), I get:

Fetching package for devel:libboost_system_x86 >= 1.70.0 ...
Fetching package for devel:libglew_x86 >= 2.2 ...
Error: unable to resolve required packages for build for opencolorio_x86-2.0.1
Error:  dependency-infos:
Error:          /boot/home/SourceCode/haikuports/haikuports/repository/opencolorio_x86-2.0.1.DependencyInfo
Error:          /boot/home/SourceCode/haikuports/haikuports/repository/opencolorio_x86_devel-2.0.1.DependencyInfo
Error:  repositories:
Error:          ['/boot/home/SourceCode/haikuports/haikuports/packages', '/boot/system/packages']
Error: 

It would be nice if the package that failed to be found/install was more clearly stated, instead of having to do a manual pkgman search for each of the dependencies.

OscarL commented 1 year ago

Seems the issue was a conflict between "devel:libglew1" (that I had installed) and the "devel:libglew >= 2.2" requested by opencolorio.

A clearer/better error message would still be nice.

Begasus commented 1 year ago

pkgman already knows the (suggested) sollution, isn't there a way to pass this information through to haikuporter.

coolcoder613eb commented 1 year ago

I would like to contribute, can you help me get started?

Begasus commented 1 year ago

Not an export on the matter here, maybe @OscarL can give a more clear answer, but here it goes: If 2 packages conflict with each other pkgman (our package manager) knows about it and will give a suggestion on wether you like to uninstall the cnflicting package to be able to use the package you need (in the above example, remove devel:libglew1 and install devel:libglew >= 2.2, or quit. haikuporter, our tool to create the packages receive a request for a specific version for libglew, but doesn't know how to solve it, the idea here is now to tell haikuporter to somehow "find" the conflict and inform the user about that conflict instead of producing an output like: error: unable to resolve required packages for build for opencolorio_x86-2.0.1 which is rather useless as it doesn't say what the actual problem is.