From 654c77df25deca83c2bfc593d6884d73a4976c54 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 24 Oct 2014 10:15:41 +0200 Subject: [PATCH] Switch back to uncompressed plists. There's no point in slowing down read performance just to save a few bytes. --- NEWS | 2 -- lib/package_unpack.c | 2 +- lib/pkgdb.c | 4 ++-- lib/repo.c | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 961a4fa6..45c690a0 100644 --- a/NEWS +++ b/NEWS @@ -7,8 +7,6 @@ xbps-0.42 (???): Packages that don't have "provides" obj but were declared as virtual packages, 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 https://github.com/voidlinux/xbps/issues/62 diff --git a/lib/package_unpack.c b/lib/package_unpack.c index 9ee970b1..a32f15e7 100644 --- a/lib/package_unpack.c +++ b/lib/package_unpack.c @@ -487,7 +487,7 @@ unpack_archive(struct xbps_handle *xhp, */ if (xbps_dictionary_count(binpkg_filesd)) { 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; free(buf); xbps_set_cb_state(xhp, XBPS_STATE_UNPACK_FAIL, diff --git a/lib/pkgdb.c b/lib/pkgdb.c index 9f4c1ae8..210d6652 100644 --- a/lib/pkgdb.c +++ b/lib/pkgdb.c @@ -82,7 +82,7 @@ xbps_pkgdb_lock(struct xbps_handle *xhp) } /* if pkgdb is unexistent, create it with an empty dictionary */ 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; xbps_dbg_printf(xhp, "[pkgdb] failed to create pkgdb " "%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 || !xbps_dictionary_equals(xhp->pkgdb, pkgdb_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; } if (pkgdb_storage) diff --git a/lib/repo.c b/lib/repo.c index 9ce6d177..e432e52e 100644 --- a/lib/repo.c +++ b/lib/repo.c @@ -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_cstring_nocopy(repokeyd, "signature-by", signedby); - if (!xbps_dictionary_externalize_to_zfile(repokeyd, rkeyfile)) { + if (!xbps_dictionary_externalize_to_file(repokeyd, rkeyfile)) { rv = errno; xbps_dbg_printf(repo->xhp, "[repo] `%s' failed to externalize %s: %s\n",