base-resolver is a V2 component that implements the Component Resolver FIDL protocol fuchsia.component.resolution.Resolver and exposes this protocol as a resolver capability.
The responsibility of base-resolver is to resolve URLs to packages that are located in pkgfs and are part of the “base” set of packages.
The base-resolver component should be part of the core product configuration and be buildable by any fx set invocation.
This component is not packaged in the traditional way. Instead, its binary and manifest are included in the Zircon Boot Image (ZBI) and are accessible via bootfs.
To launch this component, include it as a child in the component topology using the URL fuchsia-boot:///#meta/base-resolver.cm, and include its exposed resolver capability in an environment.
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="src/sys/base-resolver/tests/meta/integration-test.cml" region_tag="environment"}
Unit tests for base-resolver are available in the base-resolver-unittests package.
$ fx test base-resolver-unittests
Integration tests for base-resolver are available in the base-resolver-tests package.
$ fx test base-resolver-tests
pkg-cache-resolver implements the Component Resolver FIDL protocol fuchsia.component.resolution.Resolver and exposes this protocol as a resolver capability.
The responsibility of pkg-cache-resolver is to resolve the URL “fuchsia-pkg-cache:///#meta/pkg-cache.cm”. It does this by:
The code for pkg-cache-resolver is in the same directory as the base-resolver because:
The pkg-cache-resolver component should be part of the core product configuration and be buildable by any fx set invocation.
This component is not packaged in the traditional way. Instead, its binary and manifest are included in the Zircon Boot Image (ZBI) and are accessible via bootfs.
To launch this component, include it as a child in the component topology using the URL fuchsia-boot:///#meta/pkg-cache-resolver.cm, and include its exposed resolver capability in an environment.
Unit tests for pkg-cache-resolver are included in the base-resolver-unittests package.
$ fx test base-resolver-unittests
Integration tests for pkg-cache-resolver are available in the base-resolver-tests package (which uses pkg-cache-resolver as a component resolver) and the base-resolver-integration-tests package, which uses RealmBuilder to fake the dependencies.
$ fx test base-resolver-tests base-resolver-integration-tests