[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#532338: python-apt: Cache class should provide a broken attribute



Package: python-apt
Version: 0.7.7.1+nmu1
Severity: wishlist
Tags: patch

The Cache class should provide an API to determinate the existance of
broken dependencies. Currently you have to access the private _depcache.

Cheers,

Sebastian

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-apt depends on:
ii  apt [libapt-pkg-libc6.7- 0.7.20.2+lenny1 Advanced front-end for dpkg
ii  apt-utils [libapt-inst-l 0.7.20.2+lenny1 APT utility programs
ii  libc6                    2.7-18          GNU C Library: Shared libraries
ii  libgcc1                  1:4.3.2-1.1     GCC support library
ii  libstdc++6               4.3.2-1.1       The GNU Standard C++ Library v3
ii  lsb-release              3.2-20          Linux Standard Base version report
ii  python                   2.5.2-3         An interactive high-level object-o
ii  python-central           0.6.8           register and build utility for Pyt

python-apt recommends no packages.

Versions of packages python-apt suggests:
pn  python-apt-dbg                <none>     (no description available)

-- no debconf information
=== modified file 'apt/cache.py'
--- apt/cache.py	2009-04-01 14:27:15 +0000
+++ apt/cache.py	2009-06-08 16:12:36 +0000
@@ -286,6 +286,11 @@
         """ Unmark all changes """
         self._depcache.Init()
 
+    @property
+    def broken(self):
+        """True if the cache contains packages with broken dependencies."""
+        return self._depcache.BrokenCount > 0
+
     # cache changes
 
     def cachePostChange(self):


Reply to: