summaryrefslogtreecommitdiff
path: root/portato/backend/package.py
diff options
context:
space:
mode:
authornecoro <>2007-01-11 22:07:49 +0000
committernecoro <>2007-01-11 22:07:49 +0000
commit301d7c0de6be98e1201df0b3041c6640efd8e84c (patch)
tree1565e17e1fe9739688ce4e903d7e1844441e19cd /portato/backend/package.py
parentc30704c2a5e75d049d9240b33d8fa583e293e575 (diff)
downloadportato-301d7c0de6be98e1201df0b3041c6640efd8e84c.tar.gz
portato-301d7c0de6be98e1201df0b3041c6640efd8e84c.tar.bz2
portato-301d7c0de6be98e1201df0b3041c6640efd8e84c.zip
Updates
Diffstat (limited to 'portato/backend/package.py')
-rw-r--r--portato/backend/package.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/portato/backend/package.py b/portato/backend/package.py
index 8aa1216..15dd59a 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -3,7 +3,7 @@
# File: portato/backend/package.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2006 René 'Necoro' Neumann
+# Copyright (C) 2006-2007 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
@@ -52,11 +52,15 @@ class Package:
self._status = None
def is_installed(self):
- """Returns true if this package is installed (merged)"""
+ """Returns true if this package is installed (merged)
+ @rtype: boolean"""
+
return portage_settings.vartree.dbapi.cpv_exists(self._cpv)
def is_overlay(self):
- """Returns true if the package is in an overlay."""
+ """Returns true if the package is in an overlay.
+ @rtype: boolean"""
+
dir,ovl = portage_settings.porttree.dbapi.findname2(self._cpv)
return ovl != self._settings["PORTDIR"]
@@ -192,8 +196,8 @@ class Package:
i_flags = self.get_installed_use_flags()
for f in self.get_new_use_flags():
- if flags.invert_flag(f) in i_flags:
- i_flags.remove(flags.invert_flag(f))
+ if flags.invert_use_flag(f) in i_flags:
+ i_flags.remove(flags.invert_use_flag(f))
elif f not in i_flags:
i_flags.append(f)