Am Fri, 30 Dec 2022 05:38:58 +0100
schrieb Uladzimir Bely <ubely@ilbers.de>:
chroot "${ROOTFSDIR}" /usr/bin/apt-get -y clean
I did not look into the details, but maybe that is what one might want
after most of not all calls to deb_dl_dir_export.
Hi all,
There is a specific function/task that do that in rootfs post processing which means that clean the apt cache BEFORE importing it (*).
Then with the schroot only patchset (which misaing the dpkg base class to rip off buildchroot but it is straightforward to achieve) there is just one need of this after inage finalisation (but just for aesthetic reasons due to the use of ln -P).
(*) that task is currently also removing debian lists which is not intended for and IHMO the two ROOTFS_FEATURE should be separated.
However, inserting at the end of deb_dl_export would simply the whole architecture. Moreover, every import/export if packages should also do the same with apt-get update lists in such a way it will be run faster also with a slow Internet connection.
Another trick that matters to implement: wic stuff is produced into a local schroot mount point and then moved outside causing a duplication of disk I/O while using the final destination immediately will save that burden and when the inage is about 10Gb, is not a little thing.
All these stuff can be seen in the branch 'schroot' of my fork plus some fixes.
Best regards, R.