public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian Dolbec <dolsen@gentoo.org>
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)
Date: Sun, 2 Aug 2020 18:37:29 -0700	[thread overview]
Message-ID: <20200802183729.433f9672@storm> (raw)
In-Reply-To: <20200802233806.14415-1-zmedico@gentoo.org>

On Sun,  2 Aug 2020 16:38:06 -0700
Zac Medico <zmedico@gentoo.org> 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 <zmedico@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..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 ;)


      reply	other threads:[~2020-08-03  1:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 23:38 [gentoo-portage-dev] [PATCH] cnf/repo.postsync.d/example: add egencache --update-pkg-desc-index (bug 735626) Zac Medico
2020-08-03  1:37 ` Brian Dolbec [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200802183729.433f9672@storm \
    --to=dolsen@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox