From c313318d529a8358330febc35f09bb61f04da32b Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 29 Jan 2021 01:41:07 +0100 Subject: Upgrade on January 2021 (enabling python27 and minor things) --- repo.postsync.d/example | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'repo.postsync.d/example') 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}" -- cgit v1.2.3