diff options
Diffstat (limited to 'repo.postsync.d')
-rw-r--r-- | repo.postsync.d/example | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/repo.postsync.d/example b/repo.postsync.d/example index 533bf71..72d91a6 100644 --- a/repo.postsync.d/example +++ b/repo.postsync.d/example @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Example /etc/portage/repo.postsync.d script. Make it executable (chmod +x) for # Portage to process it. # @@ -46,6 +46,19 @@ if [ -n "${repository_name}" ]; then fi fi fi +if [ -n "${repository_name}" ] && ! [ -e "${repository_path}/metadata/pkg_desc_index" ]; then + # 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. 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 # Return explicit status. exit "${ret}" |