summaryrefslogtreecommitdiff
path: root/portato/db/database.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-02-02 11:29:08 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-02-02 11:29:08 +0100
commitd97a8bba4c3c877953bc6e800095ac4bc699ea45 (patch)
tree9a0219affdca8fd2f569a6eaa6ea163b6c4ade17 /portato/db/database.py
parent59792e7297d90cdead2e1c83e4537991b20dd11c (diff)
downloadportato-d97a8bba4c3c877953bc6e800095ac4bc699ea45.tar.gz
portato-d97a8bba4c3c877953bc6e800095ac4bc699ea45.tar.bz2
portato-d97a8bba4c3c877953bc6e800095ac4bc699ea45.zip
Add the disabled field to PkgData
Diffstat (limited to '')
-rw-r--r--portato/db/database.py14
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.