if (r)
goto ERROR;
- // Add the package to the repository
- r = pakfire_repo_add_archive(build->repo, archive, NULL);
+ // Import the package into the repository
+ r = pakfire_repo_import_archive(build->repo, archive);
if (r < 0)
goto ERROR;
enum pakfire_repo_filesystem_layout {
PAKFIRE_REPO_UUID = (1 << 0),
PAKFIRE_REPO_FLAT = (1 << 1),
+ PAKFIRE_REPO_VIRT = (1 << 2),
} fs_layout;
// Markers
if (r < 0)
goto ERROR;
break;
+
+ // In virtual mode, we don't actually import the file
+ case PAKFIRE_REPO_VIRT:
+ goto END;
}
+ // Compose the path of the archive relative to the repository path
r = pakfire_repo_relpath(self, relpath, path);
if (r < 0)
goto ERROR;
goto ERROR;
ERROR:
+
// XXX REMOVE THE PACKAGE METDATA FROM THIS REPOSITORY
+END:
if (pkg)
pakfire_package_unref(pkg);
// Refresh Interval: Set to invalid
appdata->refresh = -1;
- // The local build repository will have a flat layout, but all other
- // local repositories will be using the UUID layout.
- if (pakfire_string_equals(self->repo->name, PAKFIRE_REPO_LOCAL))
+ // The command line repo is a virtual repository
+ if (pakfire_repo_is_commandline(self))
+ appdata->fs_layout = PAKFIRE_REPO_VIRT;
+
+ // The build result repository is virtual, too
+ else if (pakfire_string_equals(self->repo->name, PAKFIRE_REPO_RESULT))
+ appdata->fs_layout = PAKFIRE_REPO_VIRT;
+
+ // The local build repository will have a flat layout
+ else if (pakfire_string_equals(self->repo->name, PAKFIRE_REPO_LOCAL))
appdata->fs_layout = PAKFIRE_REPO_FLAT;
+
+ // All other repositories follow the UUID format
else
appdata->fs_layout = PAKFIRE_REPO_UUID;