Draft: use pkgcore to read package updates
An idea that I'm exploring is replacing some of our codebase with components from pkgcore, an alternative to portage (implementing the same spec) which is much better suited for use as a library.
I don't really remember why I didn't decide to make use of pkgcore originally, it might have been due to the fact that using it in its entirety wasn't particularly feasible (bash not being very cross-platform, for example). In either case, I think there is a significant amount of code which we could share with pkgcore, which could be beneficial to both projects (we get features from the comparatively mature pkgcore codebase, they get an abnormal use case which may expose bugs, and the possibility of contributions going upstream from portmod to pkgcore) but at the very least I'd like to find out how well it would work on the packaging side of things (in the first place, does it even install on Windows and MacOS?). In some ways it's a little late to be taking advantage of it, as instead of providing implementations it's replacing them, but in the long run it will probably still be worth it.
Unfortunately it does introduce a small amount of import overhead (~20ms), which slows down the loader, but that might be mitigated in the long run by it replacing portions of portmod's code base.
The change I've made here is relatively simple just to test out the idea, and uses pkgcore.ebuild.pkg_updates:read_updates to replace the parsing in portmod.updates:parse_updates.