From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id F11D21381F3 for ; Fri, 5 Jul 2013 16:56:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 80679E0AD8; Fri, 5 Jul 2013 16:55:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F40F2E0AD8 for ; Fri, 5 Jul 2013 16:55:48 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 08EEA33E912 for ; Fri, 5 Jul 2013 16:55:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D70B0E5470 for ; Fri, 5 Jul 2013 16:55:44 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1373042844.8a0136e502f5a0ece821661b8027d06295b1ed18.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: files/hooks/ X-VCS-Repository: proj/R_overlay X-VCS-Files: files/hooks/create-metadata-cache.sh X-VCS-Directories: files/hooks/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 8a0136e502f5a0ece821661b8027d06295b1ed18 X-VCS-Branch: gsoc13/next Date: Fri, 5 Jul 2013 16:55:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: dd9d7154-c8ba-472a-acf0-992cd5bf9e82 X-Archives-Hash: 2b29498c78bc817cf0fc0408bd2e427e commit: 8a0136e502f5a0ece821661b8027d06295b1ed18 Author: André Erdmann mailerd de> AuthorDate: Fri Jul 5 16:46:25 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Fri Jul 5 16:47:24 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=8a0136e5 giles/hooks: create metadata cache (NOT TESTED) As suggested by heroxbd, it would be advantageous to add server-side support for metadata cache creation. This commit implements it as hook script (using egencache). Needs testing and would benefit from a ROVERLAY_ANYTHING_CHANGED variable (TODO). --- files/hooks/create-metadata-cache.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/files/hooks/create-metadata-cache.sh b/files/hooks/create-metadata-cache.sh new file mode 100644 index 0000000..ee3414c --- /dev/null +++ b/files/hooks/create-metadata-cache.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# -*- coding: utf-8 -*- +# roverlay hook that updates the metadata cache +# +# should be run before "exporting" the overlay (git-commit-overlay.sh etc.) +# +set -u + +## load core functions +. "${FUNCTIONS?}" || exit +#dont_run_as_root + +## load helper functions +#$lf ... + +: ${EGENCACHE:=egencache} +#autodie qwhich "${EGENCACHE}" + +# --portdir, --portdir-overlay? +# using --portdir-overlay +# --jobs=? +# --rsync? +# --tolerant? +# --update [...]? +# +autodie ${EGENCACHE} --ignore-default-opts --update --tolerant \ + --portdir-overlay="${OVERLAY}" --repo="${OVERLAY_NAME}"