Get rid of repodata index-files; the archive is now 8x smaller.

See the NEWS file for more information.
This commit is contained in:
Juan RP
2014-11-13 17:09:43 +01:00
parent e1bdeb83a1
commit 3afb9d709d
12 changed files with 65 additions and 271 deletions

View File

@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2013 Juan Romero Pardines.
* Copyright (c) 2013-2014 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,8 +39,7 @@
bool
repodata_flush(struct xbps_handle *xhp, const char *repodir,
xbps_dictionary_t idx, xbps_dictionary_t idxfiles,
xbps_dictionary_t meta)
xbps_dictionary_t idx, xbps_dictionary_t meta)
{
struct archive *ar;
char *repofile, *tname, *buf;
@@ -82,15 +81,6 @@ repodata_flush(struct xbps_handle *xhp, const char *repodir,
if (rv != 0)
return false;
/* XBPS_REPOIDX_FILES */
buf = xbps_dictionary_externalize(idxfiles);
assert(buf);
rv = xbps_archive_append_buf(ar, buf, strlen(buf),
XBPS_REPOIDX_FILES, 0644, "root", "root");
free(buf);
if (rv != 0)
return false;
/* Write data to tempfile and rename */
archive_write_finish(ar);
fdatasync(repofd);