nevra, pkg, archive);
#endif
- // Make the path where this archive should be stored
- r = pakfire_repo_make_path(repo, path, archive, pkg);
- if (r < 0)
- goto ERROR;
-
- // Set path
- r = pakfire_package_set_string(pkg, PAKFIRE_PKG_PATH, path);
- if (r < 0)
- goto ERROR;
-
// Set digest
switch (PAKFIRE_ARCHIVE_CHECKSUM) {
case PAKFIRE_DIGEST_SHA2_512:
if (r)
goto ERROR;
+ // Make the path where this archive should be stored
+ r = pakfire_repo_make_path(repo, path, archive, pkg);
+ if (r < 0)
+ goto ERROR;
+
+ // Set path
+ r = pakfire_package_set_string(pkg, PAKFIRE_PKG_PATH, path);
+ if (r < 0)
+ goto ERROR;
+
// Return the package (if requested)
if (package)
*package = pakfire_package_ref(pkg);