~mmcg069/software-center/Bug635994

« back to all changes in this revision

Viewing changes to softwarecenter/db/database.py

  • Committer: Matthew McGowan
  • Date: 2011-04-11 22:13:08 UTC
  • mfrom: (1617.1.81 software-center)
  • Revision ID: matthew.joseph.mcgowan@gmail.com-20110411221308-onqbdne2tpny11xg
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
415
415
                installed_purchased_packages.add(pkgname)
416
416
        return installed_purchased_packages
417
417
 
 
418
    def get_origins_from_db(self):
 
419
        """ return all origins available in the current database """
 
420
        origins = set()
 
421
        for term in self.xapiandb.allterms("XOO"):
 
422
            if term.term[3:]:
 
423
                origins.add(term.term[3:])
 
424
        return list(origins)
 
425
 
418
426
    def get_exact_matches(self, pkgnames=[]):
419
427
        """ Returns a list of fake MSetItems. If the pkgname is available, then
420
428
            MSetItem.document is pkgnames proper xapian document. If the pkgname
452
460
 
453
461
    db = StoreDatabase("/var/cache/software-center/xapian", apt.Cache())
454
462
    db.open()
 
463
 
455
464
    if len(sys.argv) < 2:
456
465
        search = "apt,apport"
457
466
    else: