def remove_boot(): '''remove boot images''' conf = Config(upgradeconf) kernel = conf.get("boot", "kernel") initrd = conf.get("boot", "initrd") if kernel: rm_f(kernel) if initrd: rm_f(initrd)
def remove_cache(): '''remove our cache dirs''' conf = Config(upgradeconf) cleanup = conf.get("cleanup", "dirs") or '' cleanup = cleanup.split(';') cleanup += [cachedir, packagedir] # just to be sure for d in cleanup: log.info("removing %s", d) rm_rf(d)
def reset_boot(): '''reset bootloader to previous default and remove our boot entry''' conf = Config(upgradeconf) kernel = conf.get("boot", "kernel") if kernel: boot.remove_entry(kernel)