Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Properly commit the update transaction in the database, that makes the pkg_annotation to really be committed.
Baptiste Daroussin committed 12 years ago
commit 12ff5072f1497aed3bd77ba5b7deea6f88599ddd
parent fb618f8
2 files changed +8 -2
modified libpkg/pkgdb_repo.c
@@ -775,6 +775,8 @@ upgrade_repo_schema(struct pkgdb *db, const char *database, int current_version)
	for (version = current_version;
	     version < REPO_SCHEMA_VERSION;
	     version = next_version)  {
+
		pkg_debug(1, "Upgrading remote database from %d to %d",
+
		    version, next_version);
		ret = apply_repo_change(db, database, repo_upgrades,
					"upgrade", version, &next_version);
		if (ret != EPKG_OK)
@@ -793,6 +795,8 @@ downgrade_repo_schema(struct pkgdb *db, const char *database, int current_versio
	for (version = current_version;
	     version > REPO_SCHEMA_VERSION;
	     version = next_version)  {
+
		pkg_debug(1, "Upgrading remote database from %d to %d",
+
		    version, next_version);
		ret = apply_repo_change(db, database, repo_downgrades,
					"downgrade", version, &next_version);
		if (ret != EPKG_OK)
modified libpkg/update.c
@@ -739,7 +739,7 @@ pkg_update_incremental(const char *name, struct pkg_repo *repo, time_t *mtime)
	pkg_emit_incremental_update(updated, removed, added, processed);

cleanup:
-
/*	if (pkg != NULL)
+
	if (pkg != NULL)
		pkg_free(pkg);
	if (it != NULL)
		pkgdb_it_free(it);
@@ -749,7 +749,9 @@ cleanup:
		fclose(fdigests);
	if (map != MAP_FAILED)
		munmap(map, len);
-
*/
+

+
	pkgdb_repo_close(sqlite, rc == EPKG_OK);
+

	return (rc);
}