~straemer/ubuntu/quantal/update-manager/fix-for-1058070

« back to all changes in this revision

Viewing changes to utils/est_kernel_size.py

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2012-06-29 10:59:30 UTC
  • mfrom: (389.1.2 precise-security)
  • Revision ID: package-import@ubuntu.com-20120629105930-0oaj9vdvykmvkjum
Tags: 1:0.165
* Implementation of "update on start" feature from spec
  https://wiki.ubuntu.com/SoftwareUpdates
* Use a single main window that changes instead of having modal dialogs
* Implement several special-purpose dialogs like "No updates" or
  "Dist upgrade needed" accordingn to the above spec
* Split out release upgrader code and DistUpgrade module into a separate
  source package
* Drop python-update-manager, as it is unused
* debian/tests:
  - Add dep8 tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
 
3
 
from __future__ import print_function
4
 
 
5
 
import apt_pkg
6
 
import glob
7
 
import os
8
 
 
9
 
(sysname, nodename, krelease, version, machine) = os.uname()
10
 
 
11
 
sum = 0
12
 
for entry in glob.glob("/boot/*%s*" % krelease):
13
 
    sum += os.path.getsize(entry)
14
 
 
15
 
print("Sum of kernel related files: ", sum, apt_pkg.size_to_str(sum))