Switch back to uncompressed plists.

There's no point in slowing down read performance just to save a few bytes.
This commit is contained in:
Juan RP 2014-10-24 10:15:41 +02:00
parent a81413a3e2
commit 654c77df25
4 changed files with 4 additions and 6 deletions

2
NEWS
View File

@ -7,8 +7,6 @@ xbps-0.42 (???):
Packages that don't have "provides" obj but were declared as virtual packages, Packages that don't have "provides" obj but were declared as virtual packages,
were not detected correctly and lead me to rewrite this code. were not detected correctly and lead me to rewrite this code.
* pkgdb: switch to zplists by default.
* Fixed issue #62 (Dup replaced pkgs in transaction); see * Fixed issue #62 (Dup replaced pkgs in transaction); see
https://github.com/voidlinux/xbps/issues/62 https://github.com/voidlinux/xbps/issues/62

View File

@ -487,7 +487,7 @@ unpack_archive(struct xbps_handle *xhp,
*/ */
if (xbps_dictionary_count(binpkg_filesd)) { if (xbps_dictionary_count(binpkg_filesd)) {
buf = xbps_xasprintf("%s/.%s-files.plist", xhp->metadir, pkgname); buf = xbps_xasprintf("%s/.%s-files.plist", xhp->metadir, pkgname);
if (!xbps_dictionary_externalize_to_zfile(binpkg_filesd, buf)) { if (!xbps_dictionary_externalize_to_file(binpkg_filesd, buf)) {
rv = errno; rv = errno;
free(buf); free(buf);
xbps_set_cb_state(xhp, XBPS_STATE_UNPACK_FAIL, xbps_set_cb_state(xhp, XBPS_STATE_UNPACK_FAIL,

View File

@ -82,7 +82,7 @@ xbps_pkgdb_lock(struct xbps_handle *xhp)
} }
/* if pkgdb is unexistent, create it with an empty dictionary */ /* if pkgdb is unexistent, create it with an empty dictionary */
xhp->pkgdb = xbps_dictionary_create(); xhp->pkgdb = xbps_dictionary_create();
if (!xbps_dictionary_externalize_to_zfile(xhp->pkgdb, xhp->pkgdb_plist)) { if (!xbps_dictionary_externalize_to_file(xhp->pkgdb, xhp->pkgdb_plist)) {
rv = errno; rv = errno;
xbps_dbg_printf(xhp, "[pkgdb] failed to create pkgdb " xbps_dbg_printf(xhp, "[pkgdb] failed to create pkgdb "
"%s: %s\n", xhp->pkgdb_plist, strerror(rv)); "%s: %s\n", xhp->pkgdb_plist, strerror(rv));
@ -159,7 +159,7 @@ xbps_pkgdb_update(struct xbps_handle *xhp, bool flush)
if (pkgdb_storage == NULL || if (pkgdb_storage == NULL ||
!xbps_dictionary_equals(xhp->pkgdb, pkgdb_storage)) { !xbps_dictionary_equals(xhp->pkgdb, pkgdb_storage)) {
/* flush dictionary to storage */ /* flush dictionary to storage */
if (!xbps_dictionary_externalize_to_zfile(xhp->pkgdb, xhp->pkgdb_plist)) if (!xbps_dictionary_externalize_to_file(xhp->pkgdb, xhp->pkgdb_plist))
return errno; return errno;
} }
if (pkgdb_storage) if (pkgdb_storage)

View File

@ -527,7 +527,7 @@ xbps_repo_key_import(struct xbps_repo *repo)
xbps_dictionary_set_uint16(repokeyd, "public-key-size", pubkey_size); xbps_dictionary_set_uint16(repokeyd, "public-key-size", pubkey_size);
xbps_dictionary_set_cstring_nocopy(repokeyd, "signature-by", signedby); xbps_dictionary_set_cstring_nocopy(repokeyd, "signature-by", signedby);
if (!xbps_dictionary_externalize_to_zfile(repokeyd, rkeyfile)) { if (!xbps_dictionary_externalize_to_file(repokeyd, rkeyfile)) {
rv = errno; rv = errno;
xbps_dbg_printf(repo->xhp, xbps_dbg_printf(repo->xhp,
"[repo] `%s' failed to externalize %s: %s\n", "[repo] `%s' failed to externalize %s: %s\n",