1 |
On Sun, 2 Aug 2020 16:38:06 -0700 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> Add an egencache --update-pkg-desc-index example for users |
5 |
> of app-portage/esearch to migrate to. |
6 |
> |
7 |
> Bug: https://bugs.gentoo.org/735626 |
8 |
> Signed-off-by: Zac Medico <zmedico@g.o> |
9 |
> --- |
10 |
> cnf/repo.postsync.d/example | 15 ++++++++++++++- |
11 |
> 1 file changed, 14 insertions(+), 1 deletion(-) |
12 |
> |
13 |
> diff --git a/cnf/repo.postsync.d/example b/cnf/repo.postsync.d/example |
14 |
> index 533bf719c..6c349ab3c 100644 |
15 |
> --- a/cnf/repo.postsync.d/example |
16 |
> +++ b/cnf/repo.postsync.d/example |
17 |
> @@ -1,4 +1,4 @@ |
18 |
> -#!/bin/sh |
19 |
> +#!/bin/bash |
20 |
> # Example /etc/portage/repo.postsync.d script. Make it executable |
21 |
> (chmod +x) for # Portage to process it. |
22 |
> # |
23 |
> @@ -45,6 +45,19 @@ if [ -n "${repository_name}" ]; then |
24 |
> ret=1 |
25 |
> fi |
26 |
> fi |
27 |
> + |
28 |
> + # Regenerate the metadata/pkg_desc_index file if needed. |
29 |
> It's not |
30 |
> + # needed for https://gitweb.gentoo.org/repo/sync/gentoo.git |
31 |
> which |
32 |
> + # provides a freshly generated copy. |
33 |
> + if [[ ! -e ${repository_path}/metadata/pkg_desc_index || ( |
34 |
> + -d ${repository_path}/metadata/md5-cache && |
35 |
> + -n "$(find "${repository_path}/metadata/md5-cache" |
36 |
> -type f -newer "${repository_path}/metadata/pkg_desc_index" -print |
37 |
> -quit)" ) ]]; then |
38 |
> + if ! egencache --update-pkg-desc-index |
39 |
> --repo="${repository_name}" |
40 |
> + then |
41 |
> + echo "!!! egencache failed!" |
42 |
> + ret=1 |
43 |
> + fi |
44 |
> + fi |
45 |
> fi |
46 |
> |
47 |
> # Return explicit status. |
48 |
|
49 |
is good with me, but my bash skills suck... so if there is a mistake I |
50 |
wouldn't know ;) |