Comments (7)
If I remember correctly, @kallisti5 already investigated this, and there are some differences in behavior. In particular, the handling of pre-releases is completely different: we use ~ instead of . as a separator to mark pre-releases.
So, in our case:
2.0 > 2.0~1
2.0 < 2.0.1
2.0 > 2.0.alpha
2.0 < 2.0~alpha
Maybe it is possible to achieve this with existing Python modules, but you have to be careful of handling all these situations, and the behavior must be similar to the C++ implementation in Haiku's package kit
from haikuporter.
Good point. Where can I find any documentation about versioning in Haiku? It would be very helpful to investigate if packaging.version
can be used. I've found some hacks to use custom regex to parse the version but it looks like our own pattern should be created (original one is already strange and looks a bit odd).
from haikuporter.
Documentation is here: https://www.haiku-os.org/docs/develop/packages/BuildingPackages.html#version-strings but it is not complete, for example it does not specify how the strings in each component of the version are compared (it is some kind of "natural" order, so that numbers are sorted numerically and other strings are compared as strings)
from haikuporter.
Thanks for the link - I'll check if it's possible to adapt existing packaging
and if it's worth the effort.
from haikuporter.
I've created PoC for adapting packaging.version
to HaikuPorter (#261). I've checked the documentation and I think it should be easier to implement than I thought. If there are some differences between real world and the documentation for version strings please let me know - I will include such cases in unit tests for the new solution. Please let me know also what do you think about such change. I was planning to introduce it in two parts:
- Implement new versioning mechanism.
- Replace the old one with new one.
from haikuporter.
I don't know if we want to replace this class. Even if we can get 1:1 identical behavior with Haiku's specification, what's the point? We aren't packaging Python applications, so why would we use a class intended to deal with Python package version numbers? If the Python class's behavior changed in the future, we'd have to adapt things in HaikuPorter again, which just seems like needless work.
from haikuporter.
I agree with you. While I was digging deeper and looking at all of issues that pylint showed and many other things I came up with thought that this replacement is not needed at all. There are a lot more work to do now (UT for example or removing cyclic imports, etc.). I'm closing this discussion and PR.
from haikuporter.
Related Issues (20)
- [buildmaster] Only rename downloaded files from builder after all downloads succeed
- Skip creation of git repository if a recipe contains no patches or PATCH function HOT 5
- 'meson setup <builddir>' fails in recipes HOT 1
- Unable to build source packages after 5cecf6a0 HOT 7
- Using fixCMake doesn't work as expected. HOT 1
- Warning: POLICY ERROR: no matching self provides for "libart_lgpl_devel"
- Explicitly state which dependency could not be satisfied (or why) HOT 4
- buildmaster needs to leverage object storage HOT 23
- Changes committed to the master without PR HOT 1
- Cannot clone repository properly on MacOS HOT 16
- Using multiple underscores in recipe name/port name doesn't work for secondary architecture (32bit) HOT 3
- [enhancement] Add RSS/Atom feed for failed builds (skipped ones too?).
- Block builds from creating/deleting users/groups HOT 6
- pip3 install no longer adds executable to path HOT 6
- Reintroduce the lib:libstdc++ dependency in haikuporter
- can only concatenate str on --why
- Haikuporter makes too many assumptions about directories existing HOT 2
- When the PATCH function fails, haikuporter resets to ORIGIN, removing patchset commits
- Draft new tagged release? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haikuporter.