diff options
Diffstat (limited to 'portato/db/database.py')
-rw-r--r-- | portato/db/database.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/portato/db/database.py b/portato/db/database.py index 941c3a3..c36c5dc 100644 --- a/portato/db/database.py +++ b/portato/db/database.py @@ -16,15 +16,16 @@ from threading import RLock from functools import wraps class PkgData (object): - __slots__ = ("cat", "pkg", "inst") + __slots__ = ("cat", "pkg", "inst", "disabled") - def __init__ (self, cat, pkg, inst): + def __init__ (self, cat, pkg, inst = False, disabled = False): self.cat = cat self.pkg = pkg self.inst = inst + self.disabled = disabled def __iter__ (self): - return iter((self.cat, self.pkg, self.inst)) + return iter((self.cat, self.pkg, self.inst, self.disabled)) def __cmp__ (self, other): return cmp(self.pkg.lower(), other.pkg.lower()) @@ -80,6 +81,13 @@ class Database (object): """ raise NotImplentedError + def disable (self, cpv): + """Marks the CPV as disabled. + + @param cpv: the cpv to mark + """ + raise NotImplentedError + def reload (self, cat = None): """Reloads the given category. |