[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 5a787a9 04/10: Merge centos package caches
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 5a787a9 04/10: Merge centos package caches |
Date: |
Fri, 26 Jun 2020 08:05:19 -0400 (EDT) |
branch: master
commit 5a787a937467223befb3bd8e25af16f92d3ae91c
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Merge centos package caches
By default, 'rinse' caches packages in an undocumented /var/cache/rinse
directory, which can be overridden with '--cache-dir'.
---
lmi_setup_00c.sh | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/lmi_setup_00c.sh b/lmi_setup_00c.sh
index 80a0c8b..3f8abe4 100755
--- a/lmi_setup_00c.sh
+++ b/lmi_setup_00c.sh
@@ -45,14 +45,27 @@ EOF
./lmi_setup_10c.sh
+# Use the same cache directory for all chroot package downloads.
+#
+# Packages ('.deb' as well as '.rpm') are uniquely named, so no
+# collision can occur.
+#
+# Actually, 'rinse' creates a subdirectory like 'centos-7.amd64/', and
+# updating the centos chroot using 'yum' creates subdirectories like
+# 'x86_64/7/...', so the files remain segregated. Some duplication of
+# '.rpm' files may occur, but that's harmless.
+
+CACHEDIR=/var/cache/centos_lmi
+mkdir -p "${CACHEDIR}"
+
rinse --arch amd64 --distribution centos-7 \
+ --cache-dir "${CACHEDIR}" \
--directory /srv/chroot/centos7lmi \
-mkdir -p /var/cache/centos_lmi
# There are probably a few directories here, with no regular files.
du -sb /srv/chroot/centos7lmi/var/cache/yum || echo "Oops: rinse didn't
create cache"
mkdir -p /srv/chroot/centos7lmi/var/cache/yum
-mount --bind /var/cache/centos_lmi /srv/chroot/centos7lmi/var/cache/yum
+mount --bind "${CACHEDIR}" /srv/chroot/centos7lmi/var/cache/yum
echo Installed centos chroot.
- [lmi-commits] [lmi] master updated (b745ce9 -> 6fe3ab7), Greg Chicares, 2020/06/26
- [lmi-commits] [lmi] master 5a787a9 04/10: Merge centos package caches,
Greg Chicares <=
- [lmi-commits] [lmi] master 5777e42 08/10: Don't mount /proc or /dev/pts if already mounted, Greg Chicares, 2020/06/26
- [lmi-commits] [lmi] master 5a42ec0 06/10: Fix defect introduced 20200528T1107Z: wrong dependency order, Greg Chicares, 2020/06/26
- [lmi-commits] [lmi] master 501ce73 05/10: Merge all chroot package caches, Greg Chicares, 2020/06/26
- [lmi-commits] [lmi] master ff91e9b 07/10: Use schroot 'directory' type instead of deprecated 'plain', Greg Chicares, 2020/06/26
- [lmi-commits] [lmi] master 13805c4 01/10: Make a command handier, Greg Chicares, 2020/06/26
- [lmi-commits] [lmi] master 2c31fee 09/10: Destroy chroots more carefully, Greg Chicares, 2020/06/26
- [lmi-commits] [lmi] master 026c587 02/10: Replace an improperly hardcoded value with a variable, Greg Chicares, 2020/06/26
- [lmi-commits] [lmi] master 6236aea 03/10: Rationalize order of unmounting, Greg Chicares, 2020/06/26
- [lmi-commits] [lmi] master 6fe3ab7 10/10: Customize /etc/schroot/lmi_profile/fstab, Greg Chicares, 2020/06/26