From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C4038138359 for ; Sun, 9 Aug 2020 04:46:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8743E0919; Sun, 9 Aug 2020 04:46:21 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 42C61E0919 for ; Sun, 9 Aug 2020 04:46:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B48B034F239 for ; Sun, 9 Aug 2020 04:46:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2CF5F22B for ; Sun, 9 Aug 2020 04:46:18 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1596948232.f5ffdbf201e784e1cf559ffe33d0da1c6935b687.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: cnf/repo.postsync.d/ X-VCS-Repository: proj/portage X-VCS-Files: cnf/repo.postsync.d/example X-VCS-Directories: cnf/repo.postsync.d/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: f5ffdbf201e784e1cf559ffe33d0da1c6935b687 X-VCS-Branch: master Date: Sun, 9 Aug 2020 04:46:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4cbcc0c5-28cd-4364-94d1-4071ea3dfdf4 X-Archives-Hash: 513e9be362e81fc79c69606067a93316 commit: f5ffdbf201e784e1cf559ffe33d0da1c6935b687 Author: Zac Medico gentoo org> AuthorDate: Sun Aug 2 23:33:05 2020 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Aug 9 04:43:52 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f5ffdbf2 cnf/repo.postsync.d/example: add egencache --update-pkg-desc-index (bug 735626) Add an egencache --update-pkg-desc-index example for users of app-portage/esearch to migrate to. Bug: https://bugs.gentoo.org/735626 Reviewed-by: Brian Dolbec gentoo.org> Signed-off-by: Zac Medico gentoo.org> cnf/repo.postsync.d/example | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cnf/repo.postsync.d/example b/cnf/repo.postsync.d/example index 533bf719c..708c7c4b9 100644 --- a/cnf/repo.postsync.d/example +++ b/cnf/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. # @@ -45,6 +45,19 @@ if [ -n "${repository_name}" ]; then ret=1 fi fi + + # Regenerate the metadata/pkg_desc_index file if needed. It's not + # needed for https://gitweb.gentoo.org/repo/sync/gentoo.git which + # provides a freshly generated copy. + if [[ ! -e ${repository_path}/metadata/pkg_desc_index || ( + -d ${repository_path}/metadata/md5-cache && + -n $(find "${repository_path}/metadata/md5-cache" -type f -newer "${repository_path}/metadata/pkg_desc_index" -print -quit) ) ]]; then + if ! egencache --update-pkg-desc-index --repo="${repository_name}" + then + echo "!!! egencache failed!" + ret=1 + fi + fi fi # Return explicit status.