From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D2A6B1396D0 for ; Sun, 3 Sep 2017 05:19:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 077921FC018; Sun, 3 Sep 2017 05:19:46 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C93C81FC018 for ; Sun, 3 Sep 2017 05:19:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5F17834167D for ; Sun, 3 Sep 2017 05:19:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 198EE8C20 for ; Sun, 3 Sep 2017 05:19:42 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1504415972.03753887d6ea4d9cc7c511d36ff74876a70c0dba.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_determineargs.sh gen_funcs.sh X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 03753887d6ea4d9cc7c511d36ff74876a70c0dba X-VCS-Branch: master Date: Sun, 3 Sep 2017 05:19:42 +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: 91b76d4e-cff4-43a7-9219-7a2f24663b84 X-Archives-Hash: 031800a643da5172e7f84e23f62574b7 commit: 03753887d6ea4d9cc7c511d36ff74876a70c0dba Author: Robin H. Johnson gentoo org> AuthorDate: Sun Sep 3 05:19:32 2017 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sun Sep 3 05:19:32 2017 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=03753887 bincache: use genkernel version as cache key, to ensure rebuilding initramfs parts on new GK versions. Signed-off-by: Robin H. Johnson gentoo.org> gen_determineargs.sh | 37 +++++++++++++++---------------------- gen_funcs.sh | 6 +++--- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 41fbe63..fe9f85b 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -152,28 +152,21 @@ determine_real_args() { BOOTDIR=${BOOTDIR%/} # Remove any trailing slash MODPROBEDIR=${MODPROBEDIR%/} # Remove any trailing slash - CACHE_DIR=`arch_replace "${CACHE_DIR}"` - BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"` - LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"` - MDADM_BINCACHE=`cache_replace "${MDADM_BINCACHE}"` - DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"` - ISCSI_BINCACHE=`cache_replace "${ISCSI_BINCACHE}"` - BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"` - FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"` - UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"` - GPG_BINCACHE=`cache_replace "${GPG_BINCACHE}"` - - DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"` - BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"` - BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"` - LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"` - MDADM_BINCACHE=`arch_replace "${MDADM_BINCACHE}"` - DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"` - ISCSI_BINCACHE=`arch_replace "${ISCSI_BINCACHE}"` - BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"` - FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"` - UNIONFS_FUSE_BINCACHE=`arch_replace "${UNIONFS_FUSE_BINCACHE}"` - GPG_BINCACHE=`arch_replace "${GPG_BINCACHE}"` + __VARS_BINCACHE=( + BLKID_BINCACHE + BUSYBOX_BINCACHE + DMRAID_BINCACHE + FUSE_BINCACHE + GPG_BINCACHE + ISCSI_BINCACHE + LVM_BINCACHE + MDADM_BINCACHE + UNIONFS_FUSE_BINCACHE + ) + for v in CACHE_DIR BUSYBOX_CONFIG DEFAULT_KERNEL_CONFIG "${__VARS_BINCACHE[@]}"; do + eval "$v='$(arch_replace "${!v}")'" + eval "$v='$(cache_replace "${!v}")'" + done if [ -n "${CMD_BOOTLOADER}" ] then diff --git a/gen_funcs.sh b/gen_funcs.sh index 6234189..9c9d3d6 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -184,7 +184,7 @@ arch_replace() { } cache_replace() { - var_replace "CACHE" "${CACHE_DIR}" "${1}" + var_replace "CACHE" "${CACHE_DIR}/${GK_V}" "${1}" } clear_log() { @@ -239,7 +239,7 @@ isBootRO() setup_cache_dir() { -[ ! -d "${CACHE_DIR}" ] && mkdir -p "${CACHE_DIR}" +[ ! -d "${CACHE_DIR}" ] && mkdir -p "${CACHE_DIR}/${GK_V}" if [ "${CLEAR_CACHE_DIR}" == 'yes' ] then @@ -248,7 +248,7 @@ then do print_info 1 " >> removing ${i}" rm "${i}" - done < <(find "${CACHE_DIR}" -maxdepth 1 -type f -name '*.tar.*' -o -name '*.bz2') + done < <(find "${CACHE_DIR}" -maxdepth 2 -type f -name '*.tar.*' -o -name '*.bz2') fi }