~mmcg069/software-center/details-tweaks

« back to all changes in this revision

Viewing changes to softwarecenter/db/pkginfo.py

  • Committer: Matthew McGowan
  • Date: 2011-08-20 05:39:03 UTC
  • mfrom: (2131.1.24 software-center)
  • Revision ID: matthew.joseph.mcgowan@gmail.com-20110820053903-hnewqizijfcb9l8m
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
        return -1
139
139
    def get_origins(self, pkgname):
140
140
        return []
141
 
    def get_addons(self, pkgname, ignore_installed):
 
141
    def get_addons(self, pkgname, ignore_installed=False):
 
142
        """ :return: a tuple of pkgnames (recommends, suggests) """
142
143
        return ([], [])
143
144
 
144
145
    def get_packages_removed_on_remove(self, pkg):
173
174
def get_pkg_info():
174
175
    global pkginfo
175
176
    if pkginfo is None:
176
 
        from softwarecenter.db.pkginfo_impl.aptcache import AptCache
177
 
        pkginfo = AptCache()
 
177
        from softwarecenter.enums import USE_PACKAGEKIT_BACKEND
 
178
        if not USE_PACKAGEKIT_BACKEND:
 
179
            from softwarecenter.db.pkginfo_impl.aptcache import AptCache
 
180
            pkginfo = AptCache()
 
181
        else:
 
182
            from softwarecenter.db.pkginfo_impl.packagekit import PackagekitInfo
 
183
            pkginfo = PackagekitInfo()        
178
184
    return pkginfo