On Fri, 2023-01-20 at 08:31 +0100, Uladzimir Bely wrote:
> Currently, apt cache (e.g. `var/cache/apt/archives`) import and
> export
> functions are not optimal. Multiple files are copied from global
> DL_DIR to package WORKDIR, increasing disk IO and space needed.
>
> Also, various chroots (bootstrap, buildchroot, sbuild chroot) include
> their apt caches to sstate cache files.
>
> This patchset switches to hardlinks instead of copies and removes apt
> cache from bootstrapped images ans sstate caches.
I tested this series (v3) in two layers: amd64 (internal) and arm64
(meta-iot2050) and can confirm that it works. Also we get a significant
performance improvement and massively reduced disk consumption.
The candidate describes the following situation in plain straight words:
Q: input: ln -sf, output: cp -Ln
A: much ado for nothing (cit.)
Q: How does the candidate execute the tests on the system?
A: I don't but my gut feelings
Q: What alternative does the candidate propose?
A: an elegant solution because quality is relative but elegance is absolute (cit.)
Q: summarise it in a nerd language
A:
mkdir tmp && ( cd tmp; mkdir a b
echo pippo > a/file.txt
ln -sf $PWD/a/file.txt b
cat a/file.txt b/file.txt
# pippo
# pippo
echo pluto >b/file.txt
cat a/file.txt b/file.txt
# pluto
# pluto
rm -f b/file.txt
echo ciao >b/file.txt
cat a/file.txt b/file.txt
# pluto
# ciao
cp -Ln b/file.txt a/file
cat a/file.txt b/file.txt
# pluto
# ciao
cd ..; rm -rf tmp ) # to repeat in loop
Enjoy, R-