예제 #1
0
 def depPackages(self, item):
     QtGui.QApplication.setOverrideCursor(QtCore.Qt.WaitCursor)
     package = self.cache[(str(item)).strip()]
     package.mark_delete(True, True)
     if len(self.cache.get_changes()) > 1:
         dep_view = AppView(self)
         text = "These packages depend on {} and they will also be REMOVED.".format(str(item))
         dep_view.showView(self.cache.get_changes(), 'Dependent packages',
                      text, False, width=370, height=200, check_state=1)
         dep_view.show()
     self.cache.clear()
     QtGui.QApplication.restoreOverrideCursor()
예제 #2
0
 def removePackages(self):
     self.logger.info("Removing Programs")
     try:
         package = self.cache['snapd']
         package.mark_delete(True, True)
         self.logger.info("Keep Count before commit: {}".format(self.cache.keep_count))
         self.logger.info("Delete Count before commit: {}".format(self.cache.delete_count))
         self.logger.info("Broken Count before commit: {}".format(self.cache.broken_count))
         self.logger.info("Broken Count after commit: {}".format(self.cache.broken_count))
     except Exception as e:
         self.logger.error("Error: [{}]".format(e, exc_info=True))
         error = "Problems trying to remove: {}\n{}".format(self.pkg.fullname, str(e))
         text = "Package removal failed"
         self.start_op.emit(error, text)
예제 #3
0
 def removePackages(self):
     self.logger.info("Removing Programs")
     try:
         package = self.cache['snapd']
         package.mark_delete(True, True)
         self.logger.info("Keep Count before commit: {}".format(self.cache.keep_count))
         self.logger.info("Delete Count before commit: {}".format(self.cache.delete_count))
         self.logger.info("Broken Count before commit: {}".format(self.cache.broken_count))
         self.cache.commit(self.aprogress, self.iprogress)
         self.logger.info("Broken Count after commit: {}".format(self.cache.broken_count))
     except Exception as e:
         self.logger.error("Error: [{}]".format(e, exc_info=True))
         error = e.message
         text = "Package removal failed"
         self.emit(QtCore.SIGNAL('showError(QString, QString)'), error, text)