summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to 'portato')
-rw-r--r--portato/constants.py4
-rw-r--r--portato/db/sql.py2
-rw-r--r--portato/gui/queue.py2
3 files changed, 6 insertions, 2 deletions
diff --git a/portato/constants.py b/portato/constants.py
index a8e930c..059017e 100644
--- a/portato/constants.py
+++ b/portato/constants.py
@@ -50,6 +50,10 @@ These should be set during the installation.
import os
from os.path import join as pjoin
+# ktsuss does not reset this correctly
+if os.getuid() == 0:
+ os.environ["HOME"] = "/root"
+
# icons
ICON_DIR = "icons/"
APP_ICON = pjoin(ICON_DIR, "portato-icon.png")
diff --git a/portato/db/sql.py b/portato/db/sql.py
index f3b93f0..a891e1a 100644
--- a/portato/db/sql.py
+++ b/portato/db/sql.py
@@ -261,7 +261,7 @@ class SQLDatabase (Database):
if self._type & self.SEARCH_NAME:
if "/" in restrict:
- rest = "(name LIKE '%s%%' AND cat LIKE '%s')" % (pkg, cat)
+ rest = "(name LIKE '%s%%' AND cat LIKE '%s')" % restrict.split("/",1)
else:
rest = "(name LIKE '%%%(restrict)s%%' OR cat LIKE '%(restrict)s%%')" % {"restrict":restrict}
diff --git a/portato/gui/queue.py b/portato/gui/queue.py
index d3ae1f2..ff82441 100644
--- a/portato/gui/queue.py
+++ b/portato/gui/queue.py
@@ -637,7 +637,7 @@ class EmergeQueue:
try:
self.oneshotmerge.remove(cpv)
except ValueError:
- debug("Catched ValueError => %s seems not to be in merge-queue. Should be no harm.", cpv)
+ debug("Catched ValueError => %s seems not to be in merge-queue. This probably means it is a dependency.", cpv)
elif self.tree.is_in_unmerge(it): # in Unmerge
try: