Beispiel #1
0
 def remove(self):
     try:
         api.remove_package(self.request.names, self.request.instruction)
     except PackageNotFound as err:
         out.write(">> %s could not be found.\n" %
                   out.color(err.message, "red"))
         sys.exit(0)
Beispiel #2
0
 def run(self, instruct):
     all_packages = self.instdb.get_all_packages()
     for installed_item in all_packages:
         category, name, version, slot = installed_item[1:]
         if self.process_packages(category, name, version, slot) is False:
             self.removable_packages.add((category, name, slot))
     packages = []
     for installed_item in all_packages:
         category, name, version, slot = installed_item[1:]
         if self.process_packages(category, name, version, slot) is False:
             packages.append((category + "/" + name + "-" + version))
     if packages:
         out.normal("these package(s) is/are no longer required.")
         # FIXME: This is no good
         # I must find a new method to manage built-in variables and general purpose instructions
         instruct["ask"] = True
         api.remove_package(packages, instruct)
     else:
         out.warn("no package found.")
Beispiel #3
0
 def run(self, instruct):
     all_packages = self.instdb.get_all_packages()
     for installed_item in all_packages:
         category, name, version, slot = installed_item[1:]
         if self.process_packages(category, name, version, slot) is False:
             self.removable_packages.add((category, name, slot))
     packages = []
     for installed_item in all_packages:
         category, name, version, slot = installed_item[1:]
         if self.process_packages(category, name, version, slot) is False:
             packages.append((category+"/"+name+"-"+version))
     if packages:
         out.normal("these package(s) is/are no longer required.")
         # FIXME: This is no good
         # I must find a new method to manage built-in variables and general purpose instructions 
         instruct["ask"] = True
         api.remove_package(packages, instruct)
     else:
         out.warn("no package found.")