pkgdb: some fixes for e545429fa1
.
This commit is contained in:
parent
4023c8115b
commit
e3d876ade0
@ -92,15 +92,17 @@ xbps_pkgdb_update(struct xbps_handle *xhp, bool flush)
|
|||||||
|
|
||||||
if (xhp->pkgdb && flush) {
|
if (xhp->pkgdb && flush) {
|
||||||
pkgdb_storage = prop_array_internalize_from_zfile(plist);
|
pkgdb_storage = prop_array_internalize_from_zfile(plist);
|
||||||
assert(pkgdb_storage);
|
if (pkgdb_storage == NULL ||
|
||||||
if (!prop_array_equals(xhp->pkgdb, pkgdb_storage)) {
|
!prop_array_equals(xhp->pkgdb, pkgdb_storage)) {
|
||||||
/* flush dictionary to storage */
|
/* flush dictionary to storage */
|
||||||
if (!prop_array_externalize_to_file(xhp->pkgdb, plist)) {
|
if (!prop_array_externalize_to_file(xhp->pkgdb, plist)) {
|
||||||
free(plist);
|
free(plist);
|
||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prop_object_release(pkgdb_storage);
|
if (pkgdb_storage)
|
||||||
|
prop_object_release(pkgdb_storage);
|
||||||
|
|
||||||
prop_object_release(xhp->pkgdb);
|
prop_object_release(xhp->pkgdb);
|
||||||
xhp->pkgdb = NULL;
|
xhp->pkgdb = NULL;
|
||||||
cached_rv = 0;
|
cached_rv = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user