core: add RPMOSTREE_USE_CACHED_METADATA
Being able to just reuse metadata is especially helpful when trying to debug things lower down that path, as well as cuts about 2 mins from the compose test. Closes: #561 Approved by: cgwalters
This commit is contained in:
parent
b68209b6d4
commit
0e431a8f83
@ -354,8 +354,10 @@ rpmostree_context_new_system (GCancellable *cancellable,
|
||||
dnf_context_set_http_proxy (self->hifctx, g_getenv ("http_proxy"));
|
||||
|
||||
dnf_context_set_repo_dir (self->hifctx, "/etc/yum.repos.d");
|
||||
/* Operating on stale metadata is too annoying */
|
||||
dnf_context_set_cache_age (self->hifctx, 0);
|
||||
/* Operating on stale metadata is too annoying -- but provide a way to
|
||||
* override this for testing. */
|
||||
if (g_getenv("RPMOSTREE_USE_CACHED_METADATA") == NULL)
|
||||
dnf_context_set_cache_age (self->hifctx, 0);
|
||||
dnf_context_set_cache_dir (self->hifctx, "/var/cache/rpm-ostree/" RPMOSTREE_DIR_CACHE_REPOMD);
|
||||
dnf_context_set_solv_dir (self->hifctx, "/var/cache/rpm-ostree/" RPMOSTREE_DIR_CACHE_SOLV);
|
||||
dnf_context_set_lock_dir (self->hifctx, "/run/rpm-ostree/" RPMOSTREE_DIR_LOCK);
|
||||
|
@ -1542,7 +1542,7 @@ mutate_os_release (const char *contents,
|
||||
continue;
|
||||
|
||||
/* NB: we don't mutate VERSION_ID because some libraries expect well-known
|
||||
* values there*/
|
||||
* values there */
|
||||
if (g_str_has_prefix (line, "VERSION=") || \
|
||||
g_str_has_prefix (line, "PRETTY_NAME="))
|
||||
{
|
||||
|
@ -5,6 +5,9 @@ dn=$(cd $(dirname $0) && pwd)
|
||||
|
||||
export topsrcdir=$(cd $dn/.. && pwd)
|
||||
|
||||
# avoid refetching yum metadata everytime
|
||||
export RPMOSTREE_USE_CACHED_METADATA=1
|
||||
|
||||
LOG=${LOG:-compose.log}
|
||||
date > ${LOG}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user