Beispiel #1
0
 def uninstall(self, name, requirements=None, trigger_event=True):
     name, requirements, _ = self.parse_pkg_name(name, requirements)
     p = PlatformFactory.newPlatform(name, requirements)
     BasePkgManager.uninstall(self, name, requirements)
     # trigger event is disabled when upgrading operation
     # don't cleanup packages, "install" will do that
     if trigger_event:
         self.cleanup_packages(p.packages.keys())
     return True
Beispiel #2
0
 def uninstall(self, name, requirements=None, trigger_event=True):
     name, requirements, _ = self.parse_pkg_name(name, requirements)
     p = PlatformFactory.newPlatform(name, requirements)
     BasePkgManager.uninstall(self, name, requirements)
     # trigger event is disabled when upgrading operation
     # don't cleanup packages, "install" will do that
     if trigger_event:
         self.cleanup_packages(p.packages.keys())
     return True
Beispiel #3
0
    def uninstall(self, package, requirements=None, trigger_event=True):
        if isdir(package):
            pkg_dir = package
        else:
            name, requirements, url = self.parse_pkg_input(
                package, requirements)
            pkg_dir = self.get_package_dir(name, requirements, url)

        p = PlatformFactory.newPlatform(pkg_dir)
        BasePkgManager.uninstall(self, pkg_dir, requirements)

        # @Hook: when 'update' operation (trigger_event is False),
        # don't cleanup packages or install them
        if not trigger_event:
            return True

        self.cleanup_packages(p.packages.keys())
        return True
Beispiel #4
0
    def uninstall(self, package, requirements=None, trigger_event=True):
        if isdir(package):
            pkg_dir = package
        else:
            name, requirements, url = self.parse_pkg_input(
                package, requirements)
            pkg_dir = self.get_package_dir(name, requirements, url)

        p = PlatformFactory.newPlatform(pkg_dir)
        BasePkgManager.uninstall(self, pkg_dir, requirements)

        # @Hook: when 'update' operation (trigger_event is False),
        # don't cleanup packages or install them
        if not trigger_event:
            return True

        self.cleanup_packages(p.packages.keys())
        return True
Beispiel #5
0
    def uninstall(self, package, requirements=None, after_update=False):
        if isdir(package):
            pkg_dir = package
        else:
            name, requirements, url = self.parse_pkg_uri(package, requirements)
            pkg_dir = self.get_package_dir(name, requirements, url)

        if not pkg_dir:
            raise exception.UnknownPlatform(package)

        p = PlatformFactory.newPlatform(pkg_dir)
        BasePkgManager.uninstall(self, pkg_dir, requirements)

        # don't cleanup packages or install them after update
        # we check packages for updates in def update()
        if after_update:
            return True

        return self.cleanup_packages(p.packages.keys())
Beispiel #6
0
    def uninstall(self, package, requirements=None, after_update=False):
        if isdir(package):
            pkg_dir = package
        else:
            name, requirements, url = self.parse_pkg_uri(package, requirements)
            pkg_dir = self.get_package_dir(name, requirements, url)

        if not pkg_dir:
            raise exception.UnknownPlatform(package)

        p = PlatformFactory.newPlatform(pkg_dir)
        BasePkgManager.uninstall(self, pkg_dir, requirements)

        # don't cleanup packages or install them after update
        # we check packages for updates in def update()
        if after_update:
            return True

        return self.cleanup_packages(list(p.packages))