summaryrefslogtreecommitdiff
path: root/portato/db/dict.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato/db/dict.py')
-rw-r--r--portato/db/dict.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/portato/db/dict.py b/portato/db/dict.py
index d230821..422246f 100644
--- a/portato/db/dict.py
+++ b/portato/db/dict.py
@@ -51,7 +51,7 @@ class DictDatabase (Database):
for p in packages:
cat, pkg = p.split("/")
inst = p in installed
- t = PkgData(cat, pkg, inst)
+ t = PkgData(cat, pkg, inst, False)
self._db[cat].append(t)
self._db[self.ALL].append(t)
@@ -124,6 +124,14 @@ class DictDatabase (Database):
self.__initialize()
self.populate()
+ @lock
+ def disable (self, cpv):
+ cat, pkg = cpv.split("/")
+
+ c = self._db[cat]
+ p = c[c.find(PkgData(cat, pkg))]
+ p.disabled = True
+
def get_restrict (self):
return self._restrict