guysoft / CustomPiOS

A Raspberry Pi and other ARM devices distribution builder
GNU General Public License v3.0
508 stars 146 forks source link

more preventing of "apt clean" #208

Closed umlaeute closed 1 year ago

umlaeute commented 1 year ago

While b47534cc33a0b65ea5d2ee107cefda66470cb226 provides a PKGUPGRADE_CLEANUP variable to prevent the pkgupgrade module from running apt-get clean in the cleanpu script, the base module still unconditionally clears the apt-cache: https://github.com/guysoft/CustomPiOS/blob/8a3a002570c46409372349853622f0619baefc87/src/modules/base/end_chroot_script#L41-L42

This PR introduces a new BASE_APT_CLEAN variable, that can be set to anything but the default yes to prevent apt-get clean from being run.

while I edited the files i couldn't resist the urge to drop some unnecessary bashisms and replace the oldstyle command substitution `` with the modern, stackable $() (but these changes are in separate commits, so feel free to ignore them)

umlaeute commented 1 year ago

i wonder whether the PKGUPGRADE_CLEANUP flag should somehow inherit the BASE_APT_CLEAN value (unless set by the user).

but that's mostly a design choice, how independent modules must be (and whether the base module is an exception)

guysoft commented 1 year ago

Thanks for fixing the square brackets for string comparison