The main changes here are to leverage PackageError and PackageName more.
I also fixed a bug I introduced by misunderstanding code in auto_deps. auto_deps should return PackageNames instead of Strings, but I converted the Strings too early.
This deduplicates code as well as forces names to be sanitized. The API
for both redox-pkg and cookbook need some reimagining due to the
reshuffling, but this patch is not concerned with that as yet.
Before it was not check if the shared dependencies of a package had been
built. This resulted in the installer panicking as it tried to install
a non-built package. This commit fixes that issue.
Signed-off-by: Anhad Singh <andypython@protonmail.com>
This makes the source section of recipe.toml optional, so that one can
simply create a recipe with a build recipe and a source folder and not
have to worry about git at all just to get a program running in redox.
I also ran into a situation where a source directory without a git
repository in it caused cookbook to reset it's own origin URL to the URL
specified in the recipe for that source directory. I added a check to
prevent that happening to anybody else.