Ejemplo n.º 1
0
def rebuild_db(files=False):

    filesdb = pisi.db.filesdb.FilesDB()
    installdb = pisi.db.installdb.InstallDB()

    def rebuild_filesdb():
        for pkg in list_installed():
            ctx.ui.info(_('Adding \'%s\' to db... ') % pkg, noln=True)
            files = installdb.get_files(pkg)
            filesdb.add_files(pkg, files)
            ctx.ui.info(_('OK.'))

    # save parameters and shutdown pisi
    options = ctx.config.options
    ui = ctx.ui
    comar = ctx.comar
    pisi._cleanup()

    filesdb.close()
    filesdb.destroy()
    filesdb.init()

    # reinitialize everything
    set_userinterface(ui)
    set_options(options)
    set_comar(comar)

    # construct new database
    rebuild_filesdb()
Ejemplo n.º 2
0
def rebuild_db(files=False):

    filesdb = pisi.db.filesdb.FilesDB()
    installdb = pisi.db.installdb.InstallDB()

    def rebuild_filesdb():
        for pkg in list_installed():
            ctx.ui.info(_('Adding \'%s\' to db... ') % pkg, noln=True)
            files = installdb.get_files(pkg)
            filesdb.add_files(pkg, files)
            ctx.ui.info(_('OK.'))

    # save parameters and shutdown pisi
    options = ctx.config.options
    ui = ctx.ui
    comar = ctx.comar
    pisi._cleanup()

    filesdb.close()
    filesdb.destroy()
    filesdb.init()

    # reinitialize everything
    set_userinterface(ui)
    set_options(options)
    set_comar(comar)

    # construct new database
    rebuild_filesdb()
Ejemplo n.º 3
0
def rebuild_db():

    # save parameters and shutdown pisi
    options = ctx.config.options
    ui = ctx.ui
    comar = ctx.comar
    pisi._cleanup()

    ctx.filesdb.close()
    ctx.filesdb.destroy()
    ctx.filesdb = pisi.db.filesldb.FilesLDB()

    # reinitialize everything
    set_userinterface(ui)
    set_options(options)
    set_comar(comar)
Ejemplo n.º 4
0
def rebuild_db():

    # save parameters and shutdown pisi
    options = ctx.config.options
    ui = ctx.ui
    comar = ctx.comar
    pisi._cleanup()

    ctx.filesdb.close()
    ctx.filesdb.destroy()
    ctx.filesdb = pisi.db.filesldb.FilesLDB()

    # reinitialize everything
    set_userinterface(ui)
    set_options(options)
    set_comar(comar)