aboutsummaryrefslogtreecommitdiff
path: root/cnf
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-10-14 15:52:28 -0700
committerZac Medico <zmedico@gentoo.org>2020-10-14 15:59:37 -0700
commit21e996f9d25ef578b4f4fc4f96c336383136c66f (patch)
tree759184c8da448548907211e16ed0ddbd8210832f /cnf
parentSimpleEmergeTestCase: fix TypeError: write() argument must be str, not int (diff)
downloadportage-21e996f9d25ef578b4f4fc4f96c336383136c66f.tar.gz
portage-21e996f9d25ef578b4f4fc4f96c336383136c66f.tar.bz2
portage-21e996f9d25ef578b4f4fc4f96c336383136c66f.zip
cnf/repo.postsync.d/example: Detect metadata/pkg_desc_index in repo
Detect when the repo includes a metadata/pkg_desc_index file and in that case skip the call to egencache --update-pkg-desc-index. Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'cnf')
-rw-r--r--cnf/repo.postsync.d/example3
1 files changed, 2 insertions, 1 deletions
diff --git a/cnf/repo.postsync.d/example b/cnf/repo.postsync.d/example
index f7c6f5092..72d91a60e 100644
--- a/cnf/repo.postsync.d/example
+++ b/cnf/repo.postsync.d/example
@@ -45,7 +45,8 @@ if [ -n "${repository_name}" ]; then
ret=1
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