Some changes for the XBPS libfetch's frontend code.
1) Raise the cache connection settings to more sane defaults (8->6, 16->2). 2) Introduce xbps_fetch_unset_cache_connection() to drop the caches.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2009 Juan Romero Pardines
|
||||
* Copyright (c) 2009-2010 Juan Romero Pardines
|
||||
* Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -130,6 +130,7 @@ stat_display(struct xferstat *xsp)
|
||||
if (xsp->size > 0 && xsp->rcvd > 0 &&
|
||||
xsp->last.tv_sec >= xsp->start.tv_sec + 10)
|
||||
fprintf(stderr, " ETA: %s", stat_eta(xsp));
|
||||
fprintf(stderr, "\033[K");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -201,6 +202,12 @@ xbps_fetch_set_cache_connection(int global, int per_host)
|
||||
fetchConnectionCacheInit(global, per_host);
|
||||
}
|
||||
|
||||
void
|
||||
xbps_fetch_unset_cache_connection(void)
|
||||
{
|
||||
fetchConnectionCacheClose();
|
||||
}
|
||||
|
||||
int
|
||||
xbps_fetch_file(const char *uri, const char *outputdir, bool refetch,
|
||||
const char *flags)
|
||||
|
Reference in New Issue
Block a user