* [gentoo-commits] proj/portage:master commit in: cnf/repo.postsync.d/
@ 2020-08-09 4:46 Zac Medico
0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2020-08-09 4:46 UTC (permalink / raw
To: gentoo-commits
commit: f5ffdbf201e784e1cf559ffe33d0da1c6935b687
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 2 23:33:05 2020 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> 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 <dolsen <AT> gentoo.org>
Signed-off-by: Zac Medico <zmedico <AT> 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.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/portage:master commit in: cnf/repo.postsync.d/
@ 2020-10-14 22:59 Zac Medico
0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2020-10-14 22:59 UTC (permalink / raw
To: gentoo-commits
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-14 22:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-09 4:46 [gentoo-commits] proj/portage:master commit in: cnf/repo.postsync.d/ Zac Medico
-- strict thread matches above, loose matches on Subject: below --
2020-10-14 22:59 Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox