Univention Bugzilla – Bug 38570
Check for free space before upgrade dynamically
Last modified: 2019-01-03 07:17:30 CET
univention-updater/script/preup.sh contains a hard-coded minimum free space size, but the actual download size heavily depends on the number of installed packages (from unstable). We should use APT instead: python -c ' from os import statvfs from sys import exit from apt import Cache BLOCK_SIZE = 512 # != f_bsize ret = 0 a = Cache() a.upgrade(dist_upgrade=True) s = statvfs('/var/cache/apt/archives') if s.f_bavail * BLOCK_SIZE < a.required_download: ret |= 1 << 0 s = statvfs('/usr') if s.f_bavail * BLOCK_SIZE < a.required_space ret |= 1 << 1 exit(ret)'
(In reply to Philipp Hahn from comment #0) > univention-updater/script/preup.sh contains a hard-coded minimum free space > size, but the actual download size heavily depends on the number of > installed packages (from unstable). > > We should use APT instead: I guess it doesn't work because we often upgrade packages in the preup.sh.
I think this is now already done?
This issue has been filled against UCS 4.0. The maintenance with bug and security fixes for UCS 4.0 has ended on 31st of May 2016. Customers still on UCS 4.0 are encouraged to update to UCS 4.3. Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.