Search in sources :

Example 6 with CatalogContents

use of org.graalvm.component.installer.model.CatalogContents in project graal by oracle.

the class InstallTest method initCatalogIterable.

private void initCatalogIterable(URL u) {
    RemoteCatalogDownloader rcd = new RemoteCatalogDownloader(this, this, u);
    registry = new CatalogContents(this, rcd.getStorage(), localRegistry);
    componentIterable = new CatalogIterable(this, this);
}
Also used : CatalogContents(org.graalvm.component.installer.model.CatalogContents) RemoteCatalogDownloader(org.graalvm.component.installer.remote.RemoteCatalogDownloader) CatalogIterable(org.graalvm.component.installer.remote.CatalogIterable)

Example 7 with CatalogContents

use of org.graalvm.component.installer.model.CatalogContents in project graal by oracle.

the class UninstallTest method setupComponentsWithDeps.

private void setupComponentsWithDeps() throws Exception {
    storage.graalInfo.put(CommonConstants.CAP_GRAALVM_VERSION, "19.3-dev");
    Path catalogFile = dataFile("cataloginstallDeps.properties");
    RemoteCatalogDownloader downloader = new RemoteCatalogDownloader(this, this, catalogFile.toUri().toURL());
    componentCatalog = new CatalogContents(this, downloader.getStorage(), getLocalRegistry());
    ComponentInfo ruby = componentCatalog.findComponent("org.graalvm.ruby");
    ComponentInfo fastr = componentCatalog.findComponent("org.graalvm.r");
    Set<ComponentInfo> deps = new HashSet<>();
    componentCatalog.findDependencies(ruby, true, null, deps);
    componentCatalog.findDependencies(fastr, true, null, deps);
    deps.add(ruby);
    deps.add(fastr);
    storage.installed.addAll(deps);
    deps.forEach((ci) -> ci.setInfoPath(""));
}
Also used : Path(java.nio.file.Path) CatalogContents(org.graalvm.component.installer.model.CatalogContents) RemoteCatalogDownloader(org.graalvm.component.installer.remote.RemoteCatalogDownloader) ComponentInfo(org.graalvm.component.installer.model.ComponentInfo) HashSet(java.util.HashSet)

Example 8 with CatalogContents

use of org.graalvm.component.installer.model.CatalogContents in project graal by oracle.

the class UpgradeTest method initVersion.

private Version initVersion(String s, String catalogResource) throws IOException {
    Version v = Version.fromString(s);
    storage.graalInfo.put(BundleConstants.GRAAL_VERSION, s);
    Path catalogPath = dataFile(catalogResource);
    downloader = new RemoteCatalogDownloader(this, this, catalogPath.toUri().toURL());
    registry = new CatalogContents(this, downloader.getStorage(), localRegistry);
    paramIterable = new CatalogIterable(this, this);
    helper = new UpgradeProcess(this, this, registry);
    return v;
}
Also used : Path(java.nio.file.Path) Version(org.graalvm.component.installer.Version) CatalogContents(org.graalvm.component.installer.model.CatalogContents) RemoteCatalogDownloader(org.graalvm.component.installer.remote.RemoteCatalogDownloader) CatalogIterable(org.graalvm.component.installer.remote.CatalogIterable)

Example 9 with CatalogContents

use of org.graalvm.component.installer.model.CatalogContents in project graal by oracle.

the class DirectoryCatalogProviderTest method openCatalog.

ComponentCatalog openCatalog(SoftwareChannel ch, Version v) throws IOException {
    ComponentCatalog cc = new CatalogContents(this, ch.getStorage(), getLocalRegistry(), v);
    cc.getComponentIDs();
    return cc;
}
Also used : ComponentCatalog(org.graalvm.component.installer.ComponentCatalog) CatalogContents(org.graalvm.component.installer.model.CatalogContents)

Example 10 with CatalogContents

use of org.graalvm.component.installer.model.CatalogContents in project graal by oracle.

the class CatalogIterableTest method setupCatalog.

private void setupCatalog() throws Exception {
    this.storage.graalInfo.put(BundleConstants.GRAAL_VERSION, "19.3-dev");
    String relSpec = "commands/cataloginstallDeps.properties";
    URL u = getClass().getResource(relSpec);
    Handler.bind(TEST_CATALOG_URL, u);
    downloader = new RemoteCatalogDownloader(this, this, new URL(TEST_CATALOG_URL));
    this.registry = new CatalogContents(this, downloader.getStorage(), getLocalRegistry());
}
Also used : CatalogContents(org.graalvm.component.installer.model.CatalogContents) RemoteCatalogDownloader(org.graalvm.component.installer.remote.RemoteCatalogDownloader) URL(java.net.URL)

Aggregations

CatalogContents (org.graalvm.component.installer.model.CatalogContents)21 RemoteCatalogDownloader (org.graalvm.component.installer.remote.RemoteCatalogDownloader)11 Path (java.nio.file.Path)9 URL (java.net.URL)8 ComponentCatalog (org.graalvm.component.installer.ComponentCatalog)7 ComponentInfo (org.graalvm.component.installer.model.ComponentInfo)6 Version (org.graalvm.component.installer.Version)5 ComponentRegistry (org.graalvm.component.installer.model.ComponentRegistry)5 CatalogIterable (org.graalvm.component.installer.remote.CatalogIterable)5 Test (org.junit.Test)5 List (java.util.List)4 CommandInput (org.graalvm.component.installer.CommandInput)4 HashSet (java.util.HashSet)3 RemotePropertiesStorage (org.graalvm.component.installer.remote.RemotePropertiesStorage)2 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 ComponentParam (org.graalvm.component.installer.ComponentParam)1 FileIterable (org.graalvm.component.installer.FileIterable)1 SoftwareChannelSource (org.graalvm.component.installer.SoftwareChannelSource)1