This refactors DefaultPackage into types.Package and gets rid of the
interface. This is a preceeding for a follow up where accessors will be
removed from the code.
It also does several cleanup, so we get rid also of some unneeded
dependencies.
It holds necessary state plus additional information relative to the
context which we are being run to (e.g. if we are in a terminal or not).
Besides in the future we can use it also as a contextual logger to
provide more smart logging capabilities.
This also replace the general global configuration instance that
previously was share between the core components.
Use debian to parse versions and selections.
This covers ordering of versions like -0,-1 in sequence plus many others
not available with semver. It is backward compatible as we do support
the same featureset as before as tests are passing (adding more actually
to cover interesting cases)
This is a breaking change as changes the way packages can be given as
arguments to luet.
From this change, the following applies:
- If a package string contains @, the right part is parsed as version
(e.g. foo/bar@1.1)
- If a package contains "/" and no "@", cat/name is applied (e.g.
foo/bar)
- If a package doesn't contain either, is implied its just a name
without category
- If a package contains "=" at the beginning, the gentoo parsing default
is being used ( e.g. =foo/bar-1.1 )
Fixes#154