# Would be nice if this also showed which release was originally installed report['UpgradeStatus'] = 'Upgraded to %s on %s (%d days ago)' % (release_codename, human_mtime, delta / 86400)
else: report['UpgradeStatus'] = 'No upgrade log present (probably fresh install)'
Perhaps we should be looking for a different log file if /var/log/dist-upgrade/apt.log is created for upgrades that are aborted. I wonder if apt-term.log would be a better check.
The UpgradeStatus comes from this bit of code, in Precise:
log ='/var/ log/dist- upgrade/ apt.log' exists( log): log).st_ mtime '%Y-%m- %d', time.gmtime(mtime))
if os.path.
mtime = os.stat(
human_mtime = time.strftime(
delta = time.time() - mtime
# Would be nice if this also showed which release was originally installed
report[ 'UpgradeStatus' ] = 'Upgraded to %s on %s (%d days ago)' % (release_codename, human_mtime, delta / 86400)
report[ 'UpgradeStatus' ] = 'No upgrade log present (probably fresh install)'
else:
Perhaps we should be looking for a different log file if /var/log/ dist-upgrade/ apt.log is created for upgrades that are aborted. I wonder if apt-term.log would be a better check.