pkgcore.repository.misc module

class pkgcore.repository.misc.caching_repo(db, strategy)[source]

Bases: object

Repository wrapper that overrides match, returning caching_iter instances.

Itermatch is slaved to match, in other words iterating over the caching_iter.

Main use for this is to cache results from query lookups; if matches restrict arg is in the cache, the caller gets a shared caching_iter sequence, which may already be fully loaded with pkg instances.

This can boost random lookup time pretty nicely, while helping to hold instance in memory to avoid redoing work.

Cost of this of course is that involved objects are forced to stay in memory till the cache is cleared. General use, not usually what you want- if you’re making a lot of random queries that are duplicates (resolver does this for example), caching helps.

clear()[source]
itermatch(restrict)[source]
match(restrict)[source]
operations_kls

alias of operations_proxy

class pkgcore.repository.misc.nodeps_repo(repo)[source]

Bases: object

Repository wrapper that returns wrapped pkgs with deps wiped.

default_bdepend = <DepSet negate=False type='package' finalized=False restrictions='' @0x7f857c8d7160>
default_depend = <DepSet negate=False type='package' finalized=False restrictions='' @0x7f857c8d7160>
default_idepend = <DepSet negate=False type='package' finalized=False restrictions='' @0x7f857c8d7160>
default_pdepend = <DepSet negate=False type='package' finalized=False restrictions='' @0x7f857c8d7160>
default_rdepend = <DepSet negate=False type='package' finalized=False restrictions='' @0x7f857c8d7160>
itermatch(*a, **kwds)[source]
match(*a, **kwds)[source]