summaryrefslogtreecommitdiffstats
path: root/repo.postsync.d
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2021-01-29 01:41:07 +0100
committerSuren A. Chilingaryan <csa@suren.me>2021-01-29 01:41:07 +0100
commitc313318d529a8358330febc35f09bb61f04da32b (patch)
tree37fbb284dfafb2afc7b5f905d242cc0dbccfad16 /repo.postsync.d
parent97980271effe1bdec41207c69f3ed3831c0c515f (diff)
downloadgentoo-master.tar.gz
gentoo-master.tar.bz2
gentoo-master.tar.xz
gentoo-master.zip
Upgrade on January 2021 (enabling python27 and minor things)HEADmaster
Diffstat (limited to 'repo.postsync.d')
-rw-r--r--repo.postsync.d/example15
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}"