def configure_pending(packages=None): # Import COMAR import pisi.comariface # start with pending packages # configure them in reverse topological order of dependency installdb = pisi.db.installdb.InstallDB() if not packages: packages = installdb.list_pending() else: packages = set(packages).intersection(installdb.list_pending()) order = generate_pending_order(packages) try: for x in order: if installdb.has_package(x): pkginfo = installdb.get_package(x) pkg_path = installdb.package_path(x) m = pisi.metadata.MetaData() metadata_path = pisi.util.join_path(pkg_path, ctx.const.metadata_xml) m.read(metadata_path) # FIXME: we need a full package info here! pkginfo.name = x ctx.ui.notify(pisi.ui.configuring, package=pkginfo, files=None) pisi.comariface.post_install( pkginfo.name, m.package.providesComar, pisi.util.join_path(pkg_path, ctx.const.comar_dir), pisi.util.join_path(pkg_path, ctx.const.metadata_xml), pisi.util.join_path(pkg_path, ctx.const.files_xml), None, None, m.package.version, m.package.release) ctx.ui.notify(pisi.ui.configured, package=pkginfo, files=None) installdb.clear_pending(x) except ImportError: raise pisi.Error(_("comar package is not fully installed"))
def configure_pending(packages=None): # start with pending packages # configure them in reverse topological order of dependency installdb = pisi.db.installdb.InstallDB() if not packages: packages = installdb.list_pending() else: packages = set(packages).intersection(installdb.list_pending()) try: ctx.exec_usysconf() except Exception as e: raise e return # Clear legacy "needs configuration" flag order = generate_pending_order(packages) for x in order: if installdb.has_package(x): pkginfo = installdb.get_package(x) pkg_path = installdb.package_path(x) m = pisi.metadata.MetaData() metadata_path = pisi.util.join_path(pkg_path, ctx.const.metadata_xml) m.read(metadata_path) # FIXME: we need a full package info here! pkginfo.name = x ctx.ui.notify(pisi.ui.configuring, package = pkginfo, files = None) ctx.ui.notify(pisi.ui.configured, package = pkginfo, files = None) installdb.clear_pending(x)
def configure_pending(packages=None): # start with pending packages # configure them in reverse topological order of dependency installdb = pisi.db.installdb.InstallDB() if not packages: packages = installdb.list_pending() else: packages = set(packages).intersection(installdb.list_pending()) try: ctx.exec_usysconf() except Exception as e: raise e return # Clear legacy "needs configuration" flag order = generate_pending_order(packages) for x in order: if installdb.has_package(x): pkginfo = installdb.get_package(x) pkg_path = installdb.package_path(x) m = pisi.metadata.MetaData() metadata_path = pisi.util.join_path(pkg_path, ctx.const.metadata_xml) m.read(metadata_path) # FIXME: we need a full package info here! pkginfo.name = x ctx.ui.notify(pisi.ui.configuring, package = pkginfo, files = None) ctx.ui.notify(pisi.ui.configured, package = pkginfo, files = None) installdb.clear_pending(x)
def configure_pending(packages=None): # Import COMAR import pisi.comariface # start with pending packages # configure them in reverse topological order of dependency installdb = pisi.db.installdb.InstallDB() if not packages: packages = installdb.list_pending() else: packages = set(packages).intersection(installdb.list_pending()) order = generate_pending_order(packages) try: for x in order: if installdb.has_package(x): pkginfo = installdb.get_package(x) pkg_path = installdb.package_path(x) m = pisi.metadata.MetaData() metadata_path = pisi.util.join_path(pkg_path, ctx.const.metadata_xml) m.read(metadata_path) # FIXME: we need a full package info here! pkginfo.name = x ctx.ui.notify(pisi.ui.configuring, package = pkginfo, files = None) pisi.comariface.post_install( pkginfo.name, m.package.providesComar, pisi.util.join_path(pkg_path, ctx.const.comar_dir), pisi.util.join_path(pkg_path, ctx.const.metadata_xml), pisi.util.join_path(pkg_path, ctx.const.files_xml), None, None, m.package.version, m.package.release ) ctx.ui.notify(pisi.ui.configured, package = pkginfo, files = None) installdb.clear_pending(x) except ImportError: raise pisi.Error(_("comar package is not fully installed"))