def vagrant_destroy_dir(args): """Destroys the directory. """ target = Path(args.target[0]) read_dict(target / '.reprounzip') signals.pre_destroy(target=target) target.rmtree() signals.post_destroy(target=target)
def vagrant_destroy_dir(args): """Destroys the directory. """ target = Path(args.target[0]) read_dict(target) signals.pre_destroy(target=target) target.rmtree() signals.post_destroy(target=target)
def directory_destroy(args): """Destroys the directory. """ target = Path(args.target[0]) metadata_read(target, 'directory') logger.info("Removing directory %s...", target) signals.pre_destroy(target=target) rmtree_fixed(target) signals.post_destroy(target=target)
def docker_destroy_dir(args): """Destroys the directory. """ target = Path(args.target[0]) read_dict(target) logging.info("Removing directory %s...", target) signals.pre_destroy(target=target) target.rmtree() signals.post_destroy(target=target)
def docker_destroy_dir(args): """Destroys the directory. """ target = Path(args.target[0]) read_dict(target / '.reprounzip') logging.info("Removing directory %s...", target) signals.pre_destroy(target=target) target.rmtree() signals.post_destroy(target=target)
def directory_destroy(args): """Destroys the directory. """ target = Path(args.target[0]) metadata_read(target, 'directory') logging.info("Removing directory %s...", target) signals.pre_destroy(target=target) rmtree_fixed(target) signals.post_destroy(target=target)
def directory_destroy(args): """Destroys the directory. """ target = Path(args.target[0]) read_dict(target / '.reprounzip', 'directory') logging.info("Removing directory %s...", target) signals.pre_destroy(target=target) rmtree_fixed(target) signals.post_destroy(target=target)
def chroot_destroy(args): """Destroys the directory, unmounting first if necessary. """ target = Path(args.target[0]) chroot_unmount(target) logger.info("Removing directory %s...", target) signals.pre_destroy(target=target) rmtree_fixed(target) signals.post_destroy(target=target)
def chroot_destroy(args): """Destroys the directory, unmounting first if necessary. """ target = Path(args.target[0]) chroot_unmount(target) logging.info("Removing directory %s...", target) signals.pre_destroy(target=target) rmtree_fixed(target) signals.post_destroy(target=target)
def chroot_destroy_dir(args): """Destroys the directory. """ target = Path(args.target[0]) mounted = metadata_read(target, 'chroot').get('mounted', False) if mounted: logger.critical("Magic directories might still be mounted") sys.exit(1) logger.info("Removing directory %s...", target) signals.pre_destroy(target=target) rmtree_fixed(target) signals.post_destroy(target=target)
def chroot_destroy_dir(args): """Destroys the directory. """ target = Path(args.target[0]) mounted = metadata_read(target, 'chroot').get('mounted', False) if mounted: logging.critical("Magic directories might still be mounted") sys.exit(1) logging.info("Removing directory %s...", target) signals.pre_destroy(target=target) rmtree_fixed(target) signals.post_destroy(target=target)
def chroot_destroy(args): """Destroys the directory, unmounting first if necessary. """ target = Path(args.target[0]) mounted = read_dict(target / '.reprounzip', 'chroot').get('mounted', False) if mounted: for m in ('/dev', '/proc'): d = join_root(target / 'root', Path(m)) if d.exists(): logging.info("Unmounting %s...", d) subprocess.check_call(['umount', str(d)]) logging.info("Removing directory %s...", target) signals.pre_destroy(target=target) rmtree_fixed(target) signals.post_destroy(target=target)