summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorjnqnfe <jnqnfe@gmail.com>2015-01-06 03:46:37 +0000
committerLuca Boccassi <bluca@debian.org>2020-03-05 22:09:20 +0000
commit055907592c851372000a9c12f14e04d299be859c (patch)
treeff2d213bae0de5d96237d43c8aeeea699ce285ec /scripts
parentc1dcc4dd898c2d6f214dcc7ea23de73ab37cef7b (diff)
downloadvyos-live-build-055907592c851372000a9c12f14e04d299be859c.tar.gz
vyos-live-build-055907592c851372000a9c12f14e04d299be859c.zip
cache: clarify and simplify package cache save/restore
These functions are specific to handling packages stored in the cache, not other files. They are also always used with the same `cache/packages.` prefix to the path. Gbp-Dch: Short Closes: #952916
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/binary_grub-efi4
-rwxr-xr-xscripts/build/binary_grub-legacy4
-rwxr-xr-xscripts/build/binary_grub-pc4
-rwxr-xr-xscripts/build/binary_hdd4
-rwxr-xr-xscripts/build/binary_iso4
-rwxr-xr-xscripts/build/binary_loadlin4
-rwxr-xr-xscripts/build/binary_memtest4
-rwxr-xr-xscripts/build/binary_package-lists4
-rwxr-xr-xscripts/build/binary_rootfs12
-rwxr-xr-xscripts/build/binary_syslinux4
-rwxr-xr-xscripts/build/binary_win32-loader4
-rwxr-xr-xscripts/build/binary_zsync4
-rwxr-xr-xscripts/build/bootstrap_archives4
-rwxr-xr-xscripts/build/chroot_archives4
-rwxr-xr-xscripts/build/chroot_hooks4
-rwxr-xr-xscripts/build/chroot_install-packages4
-rwxr-xr-xscripts/build/chroot_package-lists4
-rwxr-xr-xscripts/build/installer_debian-installer4
18 files changed, 40 insertions, 40 deletions
diff --git a/scripts/build/binary_grub-efi b/scripts/build/binary_grub-efi
index 01d2e48bf..d36b4abb4 100755
--- a/scripts/build/binary_grub-efi
+++ b/scripts/build/binary_grub-efi
@@ -119,7 +119,7 @@ case "${LIVE_IMAGE_TYPE}" in
esac
# Restoring cache
-Restore_cache cache/packages.binary
+Restore_package_cache binary
# Installing depends
Install_package
@@ -266,7 +266,7 @@ case "${LB_BUILD_WITH_CHROOT}" in
rm -f chroot/binary.sh
# Saving cache
- Save_cache cache/packages.binary
+ Save_package_cache binary
# Removing depends
Remove_package
diff --git a/scripts/build/binary_grub-legacy b/scripts/build/binary_grub-legacy
index de57aef36..fd08a7f84 100755
--- a/scripts/build/binary_grub-legacy
+++ b/scripts/build/binary_grub-legacy
@@ -48,7 +48,7 @@ Check_crossarchitectures
Check_package chroot /usr/sbin/grub grub-legacy
# Restoring cache
-Restore_cache cache/packages.binary
+Restore_package_cache binary
# Installing depends
Install_package
@@ -264,7 +264,7 @@ sed -i -e "s#LB_BOOTAPPEND_INSTALL#${LB_BOOTAPPEND_INSTALL}#" -e "s#LB_BOOTAPPEN
sed -i -e 's|\ $||g' binary/boot/grub/menu.lst
# Saving cache
-Save_cache cache/packages.binary
+Save_package_cache binary
# Removing depends
Remove_package
diff --git a/scripts/build/binary_grub-pc b/scripts/build/binary_grub-pc
index 563690bb9..bea8fae65 100755
--- a/scripts/build/binary_grub-pc
+++ b/scripts/build/binary_grub-pc
@@ -48,7 +48,7 @@ Check_crossarchitectures
Check_package chroot /usr/bin/grub-mkimage grub-pc
# Restoring cache
-Restore_cache cache/packages.binary
+Restore_package_cache binary
# Installing depends
Install_package
@@ -88,7 +88,7 @@ fi
cp ${FILES} binary/boot/grub/i386-pc
# Saving cache
-Save_cache cache/packages.binary
+Save_package_cache binary
# Removing depends
Remove_package
diff --git a/scripts/build/binary_hdd b/scripts/build/binary_hdd
index 71319942f..b631b8576 100755
--- a/scripts/build/binary_hdd
+++ b/scripts/build/binary_hdd
@@ -86,7 +86,7 @@ case ${LB_FIRST_BOOTLOADER} in
esac
# Restoring cache
-Restore_cache cache/packages.binary
+Restore_package_cache binary
# Installing depends
Install_package
@@ -352,7 +352,7 @@ fi
mv chroot/binary.img ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.img
# Saving cache
-Save_cache cache/packages.binary
+Save_package_cache binary
# Removing depends
Remove_package
diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso
index 5c016d33e..c6aec8dfb 100755
--- a/scripts/build/binary_iso
+++ b/scripts/build/binary_iso
@@ -57,7 +57,7 @@ Check_package chroot /usr/bin/xorriso xorriso
Check_package chroot /usr/lib/ISOLINUX/isohdpfx.bin isolinux
# Restoring cache
-Restore_cache cache/packages.binary
+Restore_package_cache binary
# Installing depends
Install_package
@@ -242,7 +242,7 @@ case "${LB_BUILD_WITH_CHROOT}" in
esac
# Saving cache
-Save_cache cache/packages.binary
+Save_package_cache binary
# Removing depends
Remove_package
diff --git a/scripts/build/binary_loadlin b/scripts/build/binary_loadlin
index d26549053..4c205f145 100755
--- a/scripts/build/binary_loadlin
+++ b/scripts/build/binary_loadlin
@@ -50,7 +50,7 @@ case "${LB_ARCHITECTURES}" in
Check_package chroot /usr/lib/loadlin/loadlin.exe.gz loadlin
# Restoring cache
- Restore_cache cache/packages.binary
+ Restore_package_cache binary
# Installing depends
Install_package
@@ -71,7 +71,7 @@ case "${LB_ARCHITECTURES}" in
gunzip -c "${_PREFIX}/usr/share/doc/loadlin/manual.txt.gz" > binary/tools/loadlin.txt
# Saving cache
- Save_cache cache/packages.binary
+ Save_package_cache binary
# Removing depends
Remove_package
diff --git a/scripts/build/binary_memtest b/scripts/build/binary_memtest
index 394bc308b..40628a9c5 100755
--- a/scripts/build/binary_memtest
+++ b/scripts/build/binary_memtest
@@ -73,7 +73,7 @@ case "${LB_MEMTEST}" in
esac
# Restoring cache
-Restore_cache cache/packages.binary
+Restore_package_cache binary
# Installing depends
Install_package
@@ -106,7 +106,7 @@ case "${LB_BUILD_WITH_CHROOT}" in
esac
# Saving cache
-Save_cache cache/packages.binary
+Save_package_cache binary
# Removing depends
Remove_package
diff --git a/scripts/build/binary_package-lists b/scripts/build/binary_package-lists
index cd6ac2414..6c888b0a3 100755
--- a/scripts/build/binary_package-lists
+++ b/scripts/build/binary_package-lists
@@ -58,7 +58,7 @@ then
Check_package chroot /usr/bin/grep-aptavail dctrl-tools
# Restoring cache
- Restore_cache cache/packages.chroot
+ Restore_package_cache chroot
# Installing depends
Install_package
@@ -177,7 +177,7 @@ then
Remove_package
# Saving cache
- Save_cache cache/packages.chroot
+ Save_package_cache chroot
# Creating stage file
Create_stagefile .build/binary_package-lists
diff --git a/scripts/build/binary_rootfs b/scripts/build/binary_rootfs
index ca831a9fe..51c3c5aba 100755
--- a/scripts/build/binary_rootfs
+++ b/scripts/build/binary_rootfs
@@ -84,7 +84,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
Check_package chroot /sbin/mkfs.${LB_CHROOT_FILESYSTEM} e2fsprogs
# Restoring cache
- Restore_cache cache/packages.binary
+ Restore_package_cache binary
# Installing depends
Install_package
@@ -196,7 +196,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
esac
# Saving cache
- Save_cache cache/packages.binary
+ Save_package_cache binary
;;
jffs2)
@@ -204,7 +204,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
Check_package chroot /usr/sbin/mkfs.jffs2 mtd-tools
# Restoring cache
- Restore_cache cache/packages.binary
+ Restore_package_cache binary
# Installing depends
Install_package
@@ -276,7 +276,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
esac
# Saving cache
- Save_cache cache/packages.binary
+ Save_package_cache binary
;;
plain)
@@ -301,7 +301,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
Check_package chroot /usr/share/doc/squashfs-tools squashfs-tools
# Restoring cache
- Restore_cache cache/packages.binary
+ Restore_package_cache binary
# Installing depends
Install_package
@@ -420,7 +420,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
chmod 0644 binary/${INITFS}/filesystem.squashfs
# Saving cache
- Save_cache cache/packages.binary
+ Save_package_cache binary
;;
none)
diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux
index 15993a6d5..27aea8182 100755
--- a/scripts/build/binary_syslinux
+++ b/scripts/build/binary_syslinux
@@ -126,7 +126,7 @@ then
fi
# Restoring cache
-Restore_cache cache/packages.binary
+Restore_package_cache binary
# Installing depends
Install_package
@@ -313,7 +313,7 @@ esac
case "${LB_BUILD_WITH_CHROOT}" in
true)
# Saving cache
- Save_cache cache/packages.binary
+ Save_package_cache binary
# Removing depends
Remove_package
diff --git a/scripts/build/binary_win32-loader b/scripts/build/binary_win32-loader
index b5a58f581..31a3dfe26 100755
--- a/scripts/build/binary_win32-loader
+++ b/scripts/build/binary_win32-loader
@@ -59,7 +59,7 @@ case "${LB_ARCHITECTURES}" in
Check_package chroot /usr/share/win32/win32-loader.exe win32-loader
# Restoring cache
- Restore_cache cache/packages.binary
+ Restore_package_cache binary
# Installing depends
Install_package
@@ -120,7 +120,7 @@ EOF
fi
# Saving cache
- Save_cache cache/packages.binary
+ Save_package_cache binary
# Removing depends
Remove_package
diff --git a/scripts/build/binary_zsync b/scripts/build/binary_zsync
index b39e16057..83b77dd15 100755
--- a/scripts/build/binary_zsync
+++ b/scripts/build/binary_zsync
@@ -52,7 +52,7 @@ Create_lockfile .lock
Check_package chroot /usr/bin/zsyncmake zsync
# Restoring cache
-Restore_cache cache/packages.binary
+Restore_package_cache binary
# Installing depends
Install_package
@@ -121,7 +121,7 @@ done
#CHECKSUMS
# Saving cache
-Save_cache cache/packages.binary
+Save_package_cache binary
# Removing depends
Remove_package
diff --git a/scripts/build/bootstrap_archives b/scripts/build/bootstrap_archives
index 1c1d3e1db..a004890a4 100755
--- a/scripts/build/bootstrap_archives
+++ b/scripts/build/bootstrap_archives
@@ -46,7 +46,7 @@ Check_lockfile .lock
Create_lockfile .lock
# Restoring cache
-Restore_cache cache/packages.chroot
+Restore_package_cache chroot
# Mount local repository
if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/'
@@ -158,7 +158,7 @@ Apt chroot "upgrade"
Apt chroot "dist-upgrade"
# Saving cache
-Save_cache cache/packages.chroot
+Save_package_cache chroot
# Creating stage file
Create_stagefile .build/bootstrap_archives
diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives
index 8fa82276f..8f83906f0 100755
--- a/scripts/build/chroot_archives
+++ b/scripts/build/chroot_archives
@@ -48,7 +48,7 @@ case "${1}" in
Create_lockfile .lock
# Restoring cache
- Restore_cache cache/packages.chroot
+ Restore_package_cache chroot
# Mount local repository
if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/'
@@ -315,7 +315,7 @@ case "${1}" in
fi
# Saving cache
- Save_cache cache/packages.chroot
+ Save_package_cache chroot
# Creating stage file
Create_stagefile .build/chroot_archives
diff --git a/scripts/build/chroot_hooks b/scripts/build/chroot_hooks
index 177244235..d6e86e45d 100755
--- a/scripts/build/chroot_hooks
+++ b/scripts/build/chroot_hooks
@@ -81,7 +81,7 @@ fi
if ls config/hooks/normal/*.chroot config/hooks/live/*.chroot > /dev/null 2>&1
then
# Restoring cache
- Restore_cache cache/packages.chroot
+ Restore_package_cache chroot
for HOOK in config/hooks/normal/*.chroot config/hooks/live/*.chroot
do
@@ -107,7 +107,7 @@ then
done
# Saving cache
- Save_cache cache/packages.chroot
+ Save_package_cache chroot
# Creating stage file
Create_stagefile .build/chroot_hooks
diff --git a/scripts/build/chroot_install-packages b/scripts/build/chroot_install-packages
index 98d016a22..5a618b3df 100755
--- a/scripts/build/chroot_install-packages
+++ b/scripts/build/chroot_install-packages
@@ -76,7 +76,7 @@ fi
if [ -e chroot/root/packages.chroot ] && [ -s chroot/root/packages.chroot ]
then
# Restoring cache
- Restore_cache cache/packages.chroot
+ Restore_package_cache chroot
# Installing packages
case "${LB_APT}" in
@@ -93,7 +93,7 @@ then
rm -f chroot/root/packages.chroot
# Saving cache
- Save_cache cache/packages.chroot
+ Save_package_cache chroot
fi
diff --git a/scripts/build/chroot_package-lists b/scripts/build/chroot_package-lists
index c26e0f511..2d9a9bdc6 100755
--- a/scripts/build/chroot_package-lists
+++ b/scripts/build/chroot_package-lists
@@ -53,7 +53,7 @@ fi
Check_package chroot /usr/bin/grep-aptavail dctrl-tools
# Restoring cache
-Restore_cache cache/packages.chroot
+Restore_package_cache chroot
# Installing depends
Install_package
@@ -93,7 +93,7 @@ rm -f chroot/bin/Packages
Remove_package
# Saving cache
-Save_cache cache/packages.chroot
+Save_package_cache chroot
# Creating stage file
Create_stagefile .build/chroot_package-lists.${_PASS}
diff --git a/scripts/build/installer_debian-installer b/scripts/build/installer_debian-installer
index 5aced7458..f4b272a9b 100755
--- a/scripts/build/installer_debian-installer
+++ b/scripts/build/installer_debian-installer
@@ -68,7 +68,7 @@ Check_package host /usr/bin/wget wget
Check_package chroot /usr/bin/apt-ftparchive apt-utils
# Restoring cache
-Restore_cache cache/packages.binary
+Restore_package_cache binary
# Installing depends
Install_package
@@ -834,7 +834,7 @@ case "${LB_MODE}" in
esac
# Saving cache
-Save_cache cache/packages.binary
+Save_package_cache binary
# Removing depends
Remove_package