Exemplo n.º 1
0
def _install_source_system_packages(base):
    """Install packages used on the source system to create iso from backup/bootstrap
    """
    stage = 'install source packages'
    pycone._print_log('', stage)##
    choice = pycone._choose_from(pyconeQ.yes_no_list, pyconeQ.source_paks_msg)
    # return the users choice
    pycone._print_log(pyconeQ.yes_no_list, stage)##
    pycone._print_log(choice + 1, stage)##

    # Check ok to install required packages
    if choice == 0:
        source_packages = pycone._var_from_seed(base, 'packages', '_SOURCE')
        # list of packages required by the source system
        pycone._print_log(choice + 1, stage)##
        pycone._print_log(source_packages, stage)##

        pycone._package_db_update(base)
        # update the database of available packages

        for item in source_packages:
            pycone._install(base, item)
        # install each required package
    elif choice == 1:
        pycone._print_log(choice + 1, stage)##
        pycone._print_log(source_packages, stage)##
        print('PyneCone cannot continue. Exiting')
        pycone._exit()
    else:
        pycone._do_help_quit(choice, pyconeQ.yes_no_list)
Exemplo n.º 2
0
def _install_source_system_packages(base):
    """Install source packages needed to do a backup
    """
    stage = 'install-source-system-packages'
    source_packages = pycone._var_from_seed(base, 'dist-packages', '_SOURCE')
    source_packages = source_packages + pycone._var_from_seed(base, 'packages', '_SOURCE')
    # list of packages required by the source system
    pycone._print_log(source_packages, None, stage)##

    pycone._package_db_update(base)
    # update the system database from repositories

    for item in source_packages:
        pycone._install(base, item)