Esempio n. 1
0
def emerge(A, rebuild_all=False):

    # A was a list, remove duplicates and expand components
    A = [str(x) for x in A]
    A_0 = A = expand_src_components(set(A))
    ctx.ui.debug('A = %s' % str(A))

    if len(A) == 0:
        ctx.ui.info(_('No packages to emerge.'))
        return

    #A |= upgrade_base(A)

    # FIXME: Errr... order_build changes type conditionally and this
    # is not good. - baris
    if not ctx.config.get_option('ignore_dependency'):
        G_f, order_inst, order_build = plan_emerge(A, rebuild_all)
    else:
        G_f = None
        order_inst = []
        order_build = A

    if order_inst:
        ctx.ui.info(
            _("""The following minimal list of packages will be installed 
from repository in the respective order to satisfy dependencies:
""") + util.strlist(order_inst))
    ctx.ui.info(
        _("""The following minimal list of packages will be built and
installed in the respective order to satisfy dependencies:
""") + util.strlist(order_build))

    if ctx.get_option('dry_run'):
        return

    if len(order_inst) + len(order_build) > len(A_0):
        if not ctx.ui.confirm(
                _('There are extra packages due to dependencies. Do you want to continue?'
                  )):
            return False

    ctx.ui.notify(ui.packagestogo, order=order_inst)

    pisi_installed = ctx.installdb.is_installed('pisi')

    for x in order_inst:
        atomicoperations.install_single_name(x)

    #ctx.ui.notify(ui.packagestogo, order = order_build)

    for x in order_build:
        package_names = atomicoperations.build(x)[0]
        install_pkg_files(package_names)  # handle inter-package deps here

    # FIXME: take a look at the fixme above :(, we have to be sure
    # that order_build is a known type...
    U = set(order_build)
    U.update(order_inst)
    if 'pisi' in order_build or (('pisi' in U) and pisi_installed):
        upgrade_pisi()
Esempio n. 2
0
def emerge(A, rebuild_all = False):

    # A was a list, remove duplicates and expand components
    A = [str(x) for x in A]
    A_0 = A = expand_src_components(set(A))
    ctx.ui.debug('A = %s' % str(A))
   
    if len(A)==0:
        ctx.ui.info(_('No packages to emerge.'))
        return
    
    #A |= upgrade_base(A)
        
    # FIXME: Errr... order_build changes type conditionally and this
    # is not good. - baris
    if not ctx.config.get_option('ignore_dependency'):
        G_f, order_inst, order_build = plan_emerge(A, rebuild_all)
    else:
        G_f = None
        order_inst = []
        order_build = A

    if order_inst:
        ctx.ui.info(_("""The following minimal list of packages will be installed 
from repository in the respective order to satisfy dependencies:
""") + util.strlist(order_inst))
    ctx.ui.info(_("""The following minimal list of packages will be built and
installed in the respective order to satisfy dependencies:
""") + util.strlist(order_build))

    if ctx.get_option('dry_run'):
        return

    if len(order_inst) + len(order_build) > len(A_0):
        if not ctx.ui.confirm(_('There are extra packages due to dependencies. Do you want to continue?')):
            return False
            
    ctx.ui.notify(ui.packagestogo, order = order_inst)

    pisi_installed = ctx.installdb.is_installed('pisi')

    for x in order_inst:
        atomicoperations.install_single_name(x)

    #ctx.ui.notify(ui.packagestogo, order = order_build)
    
    for x in order_build:
        package_names = atomicoperations.build(x)[0]
        install_pkg_files(package_names) # handle inter-package deps here

    # FIXME: take a look at the fixme above :(, we have to be sure
    # that order_build is a known type...
    U = set(order_build)
    U.update(order_inst)
    if 'pisi' in order_build or (('pisi' in U) and pisi_installed):
        upgrade_pisi()
Esempio n. 3
0
def emerge(A, rebuild_all=False):

    # A was a list, remove duplicates and expand components
    A_0 = A = expand_src_components(set(A))
    ctx.ui.debug("A = %s" % str(A))

    if len(A) == 0:
        ctx.ui.info(_("No packages to emerge."))
        return

    if not ctx.config.get_option("ignore_dependency"):
        G_f, order_inst, order_build = plan_emerge(A, rebuild_all)
    else:
        G_f = None
        order_inst = []
        order_build = A

    if order_inst:
        ctx.ui.info(
            _(
                """The following minimal list of packages will be installed 
from repository in the respective order to satisfy dependencies:
"""
            )
            + util.strlist(order_inst)
        )
    ctx.ui.info(
        _(
            """The following minimal list of packages will be built and
installed in the respective order to satisfy dependencies:
"""
        )
        + util.strlist(order_build)
    )

    if ctx.get_option("dry_run"):
        return

    if len(order_inst) + len(order_build) > len(A_0):
        if not ctx.ui.confirm(_("There are extra packages due to dependencies. Do you want to continue?")):
            return False

    ctx.ui.notify(ui.packagestogo, order=order_inst)

    for x in order_inst:
        atomicoperations.install_single_name(x)

    # ctx.ui.notify(ui.packagestogo, order = order_build)

    for x in order_build:
        package_names, blah = atomicoperations.build(x)
        install_pkg_files(package_names)  # handle inter-package deps here
Esempio n. 4
0
def emerge(A, rebuild_all = False, bypass_safety = False):

    # A was a list, remove duplicates and expand components
    A = [str(x) for x in A]
    A_0 = A = expand_src_components(set(A))
    ctx.ui.debug('A = %s' % str(A))
   
    if len(A)==0:
        ctx.ui.info(_('No packages to emerge.'))
        return

    #if not bypass_safety:
    #    A |= upgrade_base(A)
        
    if not ctx.config.get_option('ignore_dependency'):
        G_f, order_inst, order_build = plan_emerge(A, rebuild_all)
    else:
        G_f = None
        order_inst = []
        order_build = A

    if order_inst:
        ctx.ui.info(_("""The following minimal list of packages will be installed 
from repository in the respective order to satisfy dependencies:
""") + util.strlist(order_inst))
    ctx.ui.info(_("""The following minimal list of packages will be built and
installed in the respective order to satisfy dependencies:
""") + util.strlist(order_build))

    if ctx.get_option('dry_run'):
        return

    if len(order_inst) + len(order_build) > len(A_0):
        if not ctx.ui.confirm(_('There are extra packages due to dependencies. Do you want to continue?')):
            return False
            
    ctx.ui.notify(ui.packagestogo, order = order_inst)

    pisi_installed = ctx.installdb.is_installed('pisi')

    for x in order_inst:
        atomicoperations.install_single_name(x)

    #ctx.ui.notify(ui.packagestogo, order = order_build)
    
    for x in order_build:
        package_names, blah = atomicoperations.build(x)
        install_pkg_files(package_names) # handle inter-package deps here

    if 'pisi' in order_build or ( ('pisi' in order_inst + order_build) and pisi_installed):
        upgrade_pisi()