~ubuntu-core-dev/ubuntu/xenial/ubuntu-release-upgrader/xenial

« back to all changes in this revision

Viewing changes to DistUpgrade/DistUpgradeCache.py

  • Committer: Dimitri John Ledkov
  • Date: 2015-01-20 22:30:06 UTC
  • mto: This revision was merged to the branch mainline in revision 2859.
  • Revision ID: dimitri.j.ledkov@intel.com-20150120223006-ba30fbqtp4x2n0og
Fix resource warnings & logging.warn deprecation warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
def _set_kernel_initrd_size():
55
55
    size = estimate_kernel_size_in_boot()
56
56
    if size == 0:
57
 
        logging.warn("estimate_kernel_size_in_boot() returned '0'?")
 
57
        logging.warning("estimate_kernel_size_in_boot() returned '0'?")
58
58
        size = 28*1024*1024
59
59
    # add small safety buffer
60
60
    size += 1*1024*1024
613
613
            # check if we got a new kernel (if we are not inside a
614
614
            # chroot)
615
615
            if inside_chroot():
616
 
                logging.warn("skipping kernel checks because we run inside a chroot")
 
616
                logging.warning("skipping kernel checks because we run inside a chroot")
617
617
            else:
618
618
                self.checkForKernel()
619
619
 
849
849
            except SystemError as e:
850
850
                # warn here, but don't fail, its possible that meta-packages
851
851
                # conflict (like ubuntu-desktop vs xubuntu-desktop) LP: #775411
852
 
                logging.warn("Can't mark '%s' for upgrade (%s)" % (key, e))
 
852
                logging.warning("Can't mark '%s' for upgrade (%s)" % (key, e))
853
853
 
854
854
        # check if we have a meta-pkg, if not, try to guess which one to pick
855
855
        if not metaPkgInstalled():
1082
1082
                st = os.statvfs(d)
1083
1083
                free = st.f_bavail * st.f_frsize
1084
1084
            else:
1085
 
                logging.warn("directory '%s' does not exists" % d)
 
1085
                logging.warning("directory '%s' does not exists" % d)
1086
1086
                free = 0
1087
1087
            if fs_id in mnt_map:
1088
1088
                logging.debug("Dir %s mounted on %s" %