-
Notifications
You must be signed in to change notification settings - Fork 18
New Atom implementation #99
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
base: main
Are you sure you want to change the base?
Conversation
First off, that's awesome!! Thanks! I am going to take some time to carefully read through this, but at first glance it looks really nice. Reading through your description I noticed that you mention that now something like |
Take your time to check the code. You're probably right, you are having a good point here! I didn't think on the implication that we're writing to |
That would be awesome! Regarding the install. We won't have to touch |
I looked a little more into this. The point is, flaggie can't enable test FEATURE, it can only handle USE flag, KEYWORD and LICENSE settings. So it looks like we actually need the user to use a category within his atom. |
I updated the PR a little. Looks like we indeed need the user to specify a category to be on the safe side. So I changed the implementation to make the category non-optional. |
23a74f5
to
bbbedad
Compare
Based off of gentooPackage.py from =app-portage/tatt-0.5 package, see https://github.com/gentoo/tatt/blob/master/tatt/gentooPackage.py Add tests
Now it requires gentoopm from app-portage/gentoopm package, see https://github.com/mgorny/gentoopm/ Add tests Closes: nicolasbock#99
Now it requires gentoopm from app-portage/gentoopm package, see https://github.com/mgorny/gentoopm/ Add tests Closes: nicolasbock#99 Closes: nicolasbock#96
Now it requires gentoopm from app-portage/gentoopm package, see https://github.com/mgorny/gentoopm/ Add tests Closes: nicolasbock#99 Closes: nicolasbock#96
Now it requires gentoopm from app-portage/gentoopm package, see https://github.com/mgorny/gentoopm/ Add tests Closes: nicolasbock#99 Closes: nicolasbock#96
Closes: nicolasbock#99 Closes: nicolasbock#96
Closes: nicolasbock#99 Closes: nicolasbock#96
Closes: nicolasbock#99 Closes: nicolasbock#96
Closes: nicolasbock#99 Closes: nicolasbock#96
This PR is stale because it has been open for 90 days with no activity. |
Based off of gentooPackage.py from =app-portage/tatt-0.5 package,
see https://github.com/gentoo/tatt/blob/master/tatt/gentooPackage.py
Add tests
I played around a bit with how they implemented this in the tatt package. Feel free to use it, if you like it. I also added some tests for the new methods.
Feedback is welcome, if you like anything to be improved.
First tried their current implementation using portage magic, when I noticed this won't build the package on travis, due to missing portage. So I went back to the implementation that's used in ther current tatt-0.5 package.
Note, this implementation doesn't currently need / use the AtomException. As you can see from the tests, it should now support almost all atoms which are to be accepted by portage, a category is no longer needed, thus
=package-1.0
is a valid atom, like in portage.On the other hand, due to just omitting a leading
=
sign, a user might also give atoms, which would be incorrect in portage, likecategory/package-1.0
. This could be a source to add exception handling, but, as the=
get's removed anyway, I didn't see this necessary.