Beispiel #1
0
def mounted(device, where, ro=False):
    utils.mount(device, where, ro)

    try:
        yield
    finally:
        utils.umount(where)
Beispiel #2
0
    def _clean_up(self):
        umount(TEST_MNT)
        try:
            delete_lio_device(self.loop_dev)
        except RuntimeError:
            # just move on, we can do no better here
            pass
        os.unlink(self.dev_file)

        try:
            delete_lio_device(self.loop_dev2)
        except RuntimeError:
            # just move on, we can do no better here
            pass
        os.unlink(self.dev_file2)
Beispiel #3
0
    def _clean_up(self):
        umount(TEST_MNT)
        try:
            delete_lio_device(self.loop_dev)
        except RuntimeError:
            # just move on, we can do no better here
            pass
        os.unlink(self.dev_file)

        try:
            delete_lio_device(self.loop_dev2)
        except RuntimeError:
            # just move on, we can do no better here
            pass
        os.unlink(self.dev_file2)
Beispiel #4
0
    def _clean_up(self):
        try:
            utils.delete_lio_device(self.loop_dev)
        except RuntimeError:
            # just move on, we can do no better here
            pass
        os.unlink(self.dev_file)

        try:
            utils.delete_lio_device(self.loop_dev2)
        except RuntimeError:
            # just move on, we can do no better here
            pass
        os.unlink(self.dev_file2)

        try:
            utils.umount(self.mount_dir)
        except:
            pass
Beispiel #5
0
def mounted(device, where, ro=False):
    utils.mount(device, where, ro)
    yield
    utils.umount(where)
Beispiel #6
0
    def _clean_up(self):
        utils.umount(self.mount_dir)
        BlockDev.fs_btrfs_wipe(self.loop_dev2)

        super(BtrfsMultiDevice, self)._clean_up()
Beispiel #7
0
def mounted(device, where):
    mount(device, where)
    yield
    umount(where)
    isoFile             = download_iso( version, arch, treeDirs.workDir )

    if listdir( treeDirs.iso_original_path ) == []:
        mount_iso( isoFile, treeDirs.iso_original_path )
    if not path.exists( treeDirs.iso_custom_path ):
        copytree( treeDirs.iso_original_path, treeDirs.iso_custom_path )

    cleaning_repodata( treeDirs )

    discinfo            = read_discinfo( treeDirs )
    repos               = extract_repo_list( kickstart )
    repodata_list       = init_repodata( repos, treeDirs, discinfo )

    packagesNeed        = extract_package_list( kickstart, repodata_list )

    packagesOrigin      = get_existing_package( path.join( treeDirs.iso_custom_path, "Packages") )

    packagesToDownload  = get_missing_package( packagesNeed, packagesOrigin, repodata_list, verbose = True )

    download_packages( treeDirs.iso_custom_path, packagesToDownload, repodata_list )

    add_kickstart_to_isolinux( treeDirs, kickstart, iso_name )

    try:
        make_iso( "{0}_{1}".format(iso_name,version), treeDirs.iso_custom_path )
    except:
        pass

    if len(listdir( treeDirs.iso_original_path )) > 0:
        umount( treeDirs.iso_original_path )