-
Notifications
You must be signed in to change notification settings - Fork 44
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
Improve error message when dashes are used in PROVIDES or REQUIRES entries #240
Comments
https://github.com/haikuports/haikuports/wiki/HaikuPorter-HandlingRequirements#requiring-a-command This is for REQUIRES instead of PROVIDES, but the same applies. |
This would mean that haikuporter cannot distinquish between underscores and dashes? |
Yes, but it never was a problem so far. |
Alright. That seems really strange to me, I'll assume it's a problem with using sh. |
I don't recall the exact reason but I believe it's to make parsing of package names/contents easier since a dash will always be a separator and not part of the package name or something. |
yes, this is not a bug but an intentional choice. The provides/requires can't have dashes so the dash always separates the package name and the package version and there is no risk of confusion. It seems unlikely we could have two different commands, one with underscores and the other with dashes. If that was the case, we would probably rename one to avoid the risof mixing them up? So this restriction is acceptable and solves a lot of other possible confusion cases. What do you want to be documented? "replace dashes with underscores"? |
the line that haikuporter gives " Error: dashes are not allowed in provides- or requires declarations" It wasn't obvious, atleast to me, that the solution is "replace with underscore", so i think haikuporter should simply suggest this when encountering it. |
I'm trying to package a command call diff-so-fancy.
The script is just a single perl script downloaded from github without external deps, hence a rather easy recipe.
I have in my recipe:
Now this gives me the error
What should be done instead? escaping does not work. Is it ment to not be possible to package command names with dashes in them?
The text was updated successfully, but these errors were encountered: