diff options
author | André Erdmann <dywi@mailerd.de> | 2014-01-25 18:56:24 +0100 |
---|---|---|
committer | André Erdmann <dywi@mailerd.de> | 2014-01-25 18:56:24 +0100 |
commit | e22bb678775d90b90ca81aea22194ce000aff992 (patch) | |
tree | 5dd90c70eedb6292cac21b63d38f714ef5f879a7 /files | |
parent | hook environment: set PORTDIR (diff) | |
download | R_overlay-e22bb678775d90b90ca81aea22194ce000aff992.tar.gz R_overlay-e22bb678775d90b90ca81aea22194ce000aff992.tar.bz2 R_overlay-e22bb678775d90b90ca81aea22194ce000aff992.zip |
metadata-cache hook: --repositories-configuration
Pass --repositories-configuration instead of --portdir-overlay to egencache.
Diffstat (limited to 'files')
-rw-r--r-- | files/hooks/create-metadata-cache.sh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/files/hooks/create-metadata-cache.sh b/files/hooks/create-metadata-cache.sh index dbe7286..808f537 100644 --- a/files/hooks/create-metadata-cache.sh +++ b/files/hooks/create-metadata-cache.sh @@ -16,6 +16,9 @@ set -u : ${EGENCACHE:=egencache} #autodie qwhich "${EGENCACHE}" +# a valid PORTDIR is required +[ -d "${PORTDIR-}" ] || die "\$PORTDIR '${PORTDIR-}' does not exist." + # void cleanup() # cleanup() { @@ -28,8 +31,22 @@ MY_CACHE_DIR="${T}/egencache.$$" autodie dodir "${MY_CACHE_DIR}" trap cleanup INT TERM EXIT +# inlined repos.conf for egencache +MY_REPO_CONFIG=" +[DEFAULT] +main-repo = gentoo + +[gentoo] +location = ${PORTDIR} + +[${OVERLAY_NAME}] +location = ${OVERLAY}" + + # --portdir, --portdir-overlay? -# using --portdir-overlay +# using --repositories-configuration as +# --portdir-overlay is considered deprecated +# # --jobs=? # --rsync? # --tolerant? @@ -37,5 +54,6 @@ trap cleanup INT TERM EXIT # autodie ${EGENCACHE} --ignore-default-opts --update --tolerant \ --cache-dir="${MY_CACHE_DIR}" \ - --portdir-overlay="${OVERLAY}" --repo="${OVERLAY_NAME}" + --repositories-configuration="${MY_REPO_CONFIG}" \ + --repo="${OVERLAY_NAME}" autodie cleanup |