diff options
author | jnqnfe <jnqnfe@gmail.com> | 2015-01-06 03:46:37 +0000 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2020-03-05 22:09:20 +0000 |
commit | 055907592c851372000a9c12f14e04d299be859c (patch) | |
tree | ff2d213bae0de5d96237d43c8aeeea699ce285ec /functions | |
parent | c1dcc4dd898c2d6f214dcc7ea23de73ab37cef7b (diff) | |
download | vyos-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 'functions')
-rwxr-xr-x | functions/cache.sh | 8 | ||||
-rwxr-xr-x | functions/exit.sh | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/functions/cache.sh b/functions/cache.sh index 467a67491..313aa51ae 100755 --- a/functions/cache.sh +++ b/functions/cache.sh @@ -8,9 +8,9 @@ ## under certain conditions; see COPYING for details. -Restore_cache () +Restore_package_cache () { - DIRECTORY="${1}" + DIRECTORY="cache/packages.${1}" if [ "${LB_CACHE}" = "true" ] && [ "${LB_CACHE_PACKAGES}" = "true" ] then @@ -29,9 +29,9 @@ Restore_cache () fi } -Save_cache () +Save_package_cache () { - DIRECTORY="${1}" + DIRECTORY="cache/packages.${1}" if [ "${LB_CACHE}" = "true" ] && [ "${LB_CACHE_PACKAGES}" = "true" ] then diff --git a/functions/exit.sh b/functions/exit.sh index 0ba844ef3..31d82a14d 100755 --- a/functions/exit.sh +++ b/functions/exit.sh @@ -48,9 +48,9 @@ Exit () if ls .build/binary* > /dev/null 2>&1 then - Save_cache cache/packages.binary + Save_package_cache binary else - Save_cache cache/packages.chroot + Save_package_cache chroot fi return ${VALUE} |