diff options
author | 2020-09-12 16:09:56 -0700 | |
---|---|---|
committer | 2020-09-13 23:23:58 -0700 | |
commit | c783c57205107bfa75441b90a35f414163baad42 (patch) | |
tree | e43944b5dce2769d3a0dd4ebb508c859e09d007f /cnf | |
parent | get_mirror_url: urlquote only for ftp, http, and https (bug 741474) (diff) | |
download | portage-c783c57205107bfa75441b90a35f414163baad42.tar.gz portage-c783c57205107bfa75441b90a35f414163baad42.tar.bz2 portage-c783c57205107bfa75441b90a35f414163baad42.zip |
egencache: add --external-cache-only option (bug 737470)
The --external-cache-only option is useful for client-side
use cases where writing cache files inside the repository itself
may interfere with repository verification. This option is
currently supported for --update and --update-pkg-desc-index
actions, for which consumers of the corresponding cache or
index files are already capable of consuming files from the
external cache directory (/var/cache/edb/dep).
Bug: https://bugs.gentoo.org/737470
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'cnf')
-rw-r--r-- | cnf/repo.postsync.d/example | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/cnf/repo.postsync.d/example b/cnf/repo.postsync.d/example index d1e385c11..f7c6f5092 100644 --- a/cnf/repo.postsync.d/example +++ b/cnf/repo.postsync.d/example @@ -46,17 +46,16 @@ if [ -n "${repository_name}" ]; then fi fi - # Regenerate the metadata/pkg_desc_index file if needed. It's not + # Regenerate the metadata/pkg_desc_index file. This is not # needed for https://gitweb.gentoo.org/repo/sync/gentoo.git which - # provides a freshly generated copy. - if [[ ! -e ${repository_path}/metadata/pkg_desc_index || ( - -d ${repository_path}/metadata/md5-cache && - -n $(find "${repository_path}/metadata/md5-cache" -type f -newer "${repository_path}/metadata/pkg_desc_index" -print -quit) ) ]]; then - if ! egencache --update-pkg-desc-index --repo="${repository_name}" ${PORTAGE_VERBOSE+--verbose} - then - echo "!!! egencache failed!" - ret=1 - fi + # provides a freshly generated copy. The --external-cache-only + # option causes the metadata/pkg_desc_index file to be written under + # /var/cache/edb/dep instead of the repository itself, so that it + # does not interfere with repository verification. + if ! egencache --update-pkg-desc-index --external-cache-only --repo="${repository_name}" ${PORTAGE_VERBOSE+--verbose} + then + echo "!!! egencache failed!" + ret=1 fi fi |