commit:     21e996f9d25ef578b4f4fc4f96c336383136c66f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 14 22:52:28 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Oct 14 22:59:37 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=21e996f9

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 <AT> gentoo.org>

 cnf/repo.postsync.d/example | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

Reply via email to