Ejemplo n.º 1
0
    def uninstall(self):
        platform = self.get_name()
        pm = PackageManager(platform)

        for package, data in pm.get_installed(platform).items():
            pm.uninstall(package, data['path'])

        pm.unregister_platform(platform)
        rmtree(pm.get_platform_dir())
        return True
Ejemplo n.º 2
0
    def uninstall(self):
        platform = self.get_name()
        pm = PackageManager(platform)

        for package, data in pm.get_installed(platform).items():
            pm.uninstall(package, data['path'])

        pm.unregister_platform(platform)
        rmtree(pm.get_platform_dir())
        return True
Ejemplo n.º 3
0
def cli(platform):
    p = PlatformFactory().newPlatform(platform)
    if platform not in PackageManager.get_installed():
        raise PlatformNotInstalledYet(platform)

    # print info about platform
    echo("{name:<20} - {info}".format(name=style(p.get_name(), fg="cyan"),
                                      info=p.get_short_info()))

    pm = PackageManager(platform)
    for name, data in pm.get_installed(platform).items():
        pkgalias = p.get_pkg_alias(name)
        echo("----------")
        echo("Package: %s" % style(name, fg="yellow"))
        if pkgalias:
            echo("Alias: %s" % pkgalias)
        echo("Location: %s" % join(pm.get_platform_dir(), data['path']))
        echo("Version: %d" % int(data['version']))