summaryrefslogtreecommitdiff
path: root/geneticone/gui/gui_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'geneticone/gui/gui_helper.py')
-rw-r--r--geneticone/gui/gui_helper.py54
1 files changed, 23 insertions, 31 deletions
diff --git a/geneticone/gui/gui_helper.py b/geneticone/gui/gui_helper.py
index 1c0ae90..2f758b2 100644
--- a/geneticone/gui/gui_helper.py
+++ b/geneticone/gui/gui_helper.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
#
# File: geneticone/gui/gui_helper.py
# This file is part of the Genetic/One-Project, a graphical portage-frontend.
@@ -14,9 +15,6 @@ from geneticone import backend
from geneticone.backend import flags
from geneticone.helper import *
-# our dialogs
-import dialogs
-
# some stuff needed
from subprocess import Popen, PIPE, STDOUT
from threading import Thread
@@ -356,35 +354,29 @@ class EmergeQueue:
@raises geneticone.backend.PackageNotFoundException: if trying to add a package which does not exist"""
if not unmerge: # emerge
- try:
- # insert dependencies
- pkg = self._get_pkg_from_cpv(cpv, unmask)
- deps = pkg.get_dep_packages()
-
- if update:
- if not forceUpdate and deps == self.deps[cpv]:
- return # nothing changed - return
- else:
- hasBeenInQueue = (cpv in self.mergequeue or cpv in self.oneshotmerge)
- parentIt = self.tree.iter_parent(self.iters[cpv])
-
- # delete it out of the tree - but NOT the changed flags
- self.remove_with_children(self.iters[cpv], removeNewFlags = False)
-
- if hasBeenInQueue: # package has been in queue before
- options += self._queue_append(cpv, oneshot)
-
- self.update_tree(parentIt, cpv, unmask, options = options)
- else: # not update
- options += self._queue_append(cpv, oneshot)
- if self.emergeIt:
- self.update_tree(self.emergeIt, cpv, unmask, options)
+ # insert dependencies
+ pkg = self._get_pkg_from_cpv(cpv, unmask)
+ deps = pkg.get_dep_packages()
+
+ if update:
+ if not forceUpdate and deps == self.deps[cpv]:
+ return # nothing changed - return
+ else:
+ hasBeenInQueue = (cpv in self.mergequeue or cpv in self.oneshotmerge)
+ parentIt = self.tree.iter_parent(self.iters[cpv])
+
+ # delete it out of the tree - but NOT the changed flags
+ self.remove_with_children(self.iters[cpv], removeNewFlags = False)
+
+ if hasBeenInQueue: # package has been in queue before
+ options += self._queue_append(cpv, oneshot)
+
+ self.update_tree(parentIt, cpv, unmask, options = options)
+ else: # not update
+ options += self._queue_append(cpv, oneshot)
+ if self.emergeIt:
+ self.update_tree(self.emergeIt, cpv, unmask, options)
- except backend.BlockedException, e : # there is sth blocked --> call blocked_dialog
- blocks = e[0]
- dialogs.blocked_dialog(cpv, blocks)
- return
-
else: # unmerge
self.unmergequeue.append(cpv)
if self.unmergeIt: # update tree