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 3ED6A138359 for ; Mon, 3 Aug 2020 01:37:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5522BE09B4; Mon, 3 Aug 2020 01:37:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 00EB3E09B4 for ; Mon, 3 Aug 2020 01:37:34 +0000 (UTC) Date: Sun, 2 Aug 2020 18:37:29 -0700 From: Brian Dolbec To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] cnf/repo.postsync.d/example: add egencache --update-pkg-desc-index (bug 735626) Message-ID: <20200802183729.433f9672@storm> In-Reply-To: <20200802233806.14415-1-zmedico@gentoo.org> References: <20200802233806.14415-1-zmedico@gentoo.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 9140e519-8b6b-4bd2-b28b-b5b4779148bc X-Archives-Hash: 58e6a0c0de505269c176b7bed4599bb8 On Sun, 2 Aug 2020 16:38:06 -0700 Zac Medico wrote: > Add an egencache --update-pkg-desc-index example for users > of app-portage/esearch to migrate to. > > Bug: https://bugs.gentoo.org/735626 > Signed-off-by: Zac Medico > --- > 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..6c349ab3c 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. is good with me, but my bash skills suck... so if there is a mistake I wouldn't know ;)