kojismokydingo.sift.tags¶
Koji Smoky Dingo - Sifty Dingo filtering for Koji Tags
This module provides sieves for filtering through koji tag info dicts.
- author:
Christopher O'Brien <obriencj@gmail.com>
- license:
GPL v3
- class ArchSieve(sifter, *tokens)[source]¶
Bases:
MatcherSieveusage:
(arch [ARCH...])If no
ARCHpatterns are specified, matches tags which have any architectures at all.If
ARCHpatterns are specified, then only matches tags which have an architecture that matches any of the given patterns.- check(session, taginfo)[source]¶
Override to return True if the predicate matches the given info dict.
This is used by the default
runimplementation in a filter. Only the info dicts which return True from this method will be included in the results.- Parameters:
info -- The info dict to be checked.
- name = 'arch'¶
- class BuildTagSieve(sifter, *tokens)[source]¶
Bases:
TargetSieveusage:
(build-tag [TARGET...])If no
TARGETis specified, then matches tags which are used as the build tag for any target.If any
TARGETpatterns are specified, then matches tags which are used as the build tag for a target with a name matching any of the patterns.- name = 'build-tag'¶
- class CompareLatestSieve(sifter, pkgname, op='>=', ver='0')[source]¶
Bases:
Sieveusage:
(compare-latest PKG [OP VER])If OP and VER are not specified, matches tags which have any build of the given package name as latest.
If OP and VER are specified, matches tags which have the a latest build of the given package name which compare correctly. If tag doesn't have any build of the given package name, it will not match.
- check(session, taginfo)[source]¶
Override to return True if the predicate matches the given info dict.
This is used by the default
runimplementation in a filter. Only the info dicts which return True from this method will be included in the results.- Parameters:
info -- The info dict to be checked.
- name = 'compare-latest'¶
- class DestTagSieve(sifter, *tokens)[source]¶
Bases:
TargetSieveusage:
(dest-tag [TARGET...])If no
TARGETis specified, then matches tags which are used as the destination tag for any target.If any
TARGETpatterns are specified, then matches tags which are used as the destination tag for a target with a name matching any of the patterns.- name = 'dest-tag'¶
- class ExactArchSieve(sifter, *tokens)[source]¶
Bases:
SymbolSieveusage:
(exact-arch [ARCH...])If no
ARCHnames are specified, matches only tags which have no architectures.If
ARCHnames are specified, they must be specified as symbols. Only matches tags which have the exact same set of architectures.- check(session, taginfo)[source]¶
Override to return True if the predicate matches the given info dict.
This is used by the default
runimplementation in a filter. Only the info dicts which return True from this method will be included in the results.- Parameters:
info -- The info dict to be checked.
- get_info_cache(tinfo)[source]¶
Gets a cache dict from the sifter using the name of this sieve and the sifter's designated key for the given info dict. The default sifter key will get the "id" value from the info dict.
The same cache dict will be returned for this info dict until the sifter has its
resetmethod invoked.
- name = 'exact-arch'¶
- class GroupPkgSieve(sifter, group, pkg, *pkgs, require_all=False)[source]¶
Bases:
SymbolSieve,CacheMixinusage:
(group-pkg GROUP PKG [PKG...] [require_all: False])Matches tags which have the given install group, which also contains any of the given
PKGnames- check(session, taginfo)[source]¶
Override to return True if the predicate matches the given info dict.
This is used by the default
runimplementation in a filter. Only the info dicts which return True from this method will be included in the results.- Parameters:
info -- The info dict to be checked.
- name = 'group-pkg'¶
- class GroupSieve(sifter, group, *groups)[source]¶
Bases:
SymbolSieve,CacheMixinusage:
(group GROUP [GROUP...])Matches tags which have any of the given install groups configured. Honors inheritance.
- check(session, taginfo)[source]¶
Override to return True if the predicate matches the given info dict.
This is used by the default
runimplementation in a filter. Only the info dicts which return True from this method will be included in the results.- Parameters:
info -- The info dict to be checked.
- name = 'group'¶
- class HasAncestorSieve(sifter, *tokens)[source]¶
Bases:
InheritanceSieveusage:
(has-ancestor [TAG...])alias:(inherits-from [TAG...])If no
TAGpatterns are specified, matches tags which have any parents.If
TAGpatterns are specified, matches tags which have a parent at any depth matching any of the given patterns.- name = 'has-ancestor'¶
- class HasChildSieve(sifter, *tokens)[source]¶
Bases:
InheritanceSieveusage:
(has-child [TAG...])alias:(parent-of [TAG...])If no
TAGpatterns are specified, matches tags which are the direct parent to any other tag.If
TAGpatterns are specified, matches tags which are the direct parent to any tag matching any of the given patterns.- name = 'has-child'¶
- class HasDescendantSieve(sifter, *tokens)[source]¶
Bases:
InheritanceSieveusage:
(has-descendant [TAG...])alias:(inherited-by [TAG...])If no
TAGpatterns are specified, matches tags which are inherited by any other tag.If
TAGpatterns are specified, matches tags which are inherited by any tag matching any of the patterns, at any depth.- name = 'has-descendant'¶
- class HasParentSieve(sifter, *tokens)[source]¶
Bases:
InheritanceSieveusage:
(has-parent [TAG...])alias:(child-of [TAG...])If no
TAGpatterns are specified, matches tags which have any parents.If
TAGpatterns are specified, matchs tags which have any direct parent matching any of the given patterns.- name = 'has-parent'¶
- class LatestSieve(sifter, *exprs)[source]¶
Bases:
NVRSieveusage:
(latest [NVR...])If no
NVRis specified, matches tags which have any builds tagged in them or inherited from parent tags.If
NVRis specified, matches tags which have any of the given builds as the latest inherited build of the relevant package name. EachNVRmust be valid a reference to a build in this koji instance, or a NoSuchBuild exception will be raised.- name = 'latest'¶
- class LockedSieve(sifter)[source]¶
Bases:
Sieveusage:
(locked)Matches tags which have been locked
- check(session, taginfo)[source]¶
Override to return True if the predicate matches the given info dict.
This is used by the default
runimplementation in a filter. Only the info dicts which return True from this method will be included in the results.- Parameters:
info -- The info dict to be checked.
- name = 'locked'¶
- class NameSieve(sifter, *exprs)[source]¶
Bases:
ItemSieveUsage:
(name NAME [NAME...])filters for dict infos whose name matches any of the given
NAMEmatchers.- field = 'name'¶
- name = 'name'¶
- class PermissionSieve(sifter, *tokens)[source]¶
Bases:
MatcherSieveusage:
(permission [PERM...])`If no
PERMis specified, then matches tags which have any non-None permission set.If any
PERMpatters are specified, then matches tags which have any of the listed permissions set.- check(session, taginfo)[source]¶
Override to return True if the predicate matches the given info dict.
This is used by the default
runimplementation in a filter. Only the info dicts which return True from this method will be included in the results.- Parameters:
info -- The info dict to be checked.
- name = 'permission'¶
- class PkgAllowedSieve(sifter, pkgname, *pkgnames)[source]¶
Bases:
PkgListSieveusage:
(pkg-allowed PKG [PKG...])Matches tags which have a package listing with any of the given
PKGcontained therein and not blocked, honoring inheritance.- check(session, taginfo)[source]¶
Override to return True if the predicate matches the given info dict.
This is used by the default
runimplementation in a filter. Only the info dicts which return True from this method will be included in the results.- Parameters:
info -- The info dict to be checked.
- name = 'pkg-allowed'¶
- class PkgBlockedSieve(sifter, pkgname, *pkgnames)[source]¶
Bases:
PkgListSieveusage:
(pkg-blocked PKG [PKG...])Matches tags which have a package listing with any of the given
PKGcontained therein and blocked, honoring inheritance.- check(session, taginfo)[source]¶
Override to return True if the predicate matches the given info dict.
This is used by the default
runimplementation in a filter. Only the info dicts which return True from this method will be included in the results.- Parameters:
info -- The info dict to be checked.
- name = 'pkg-blocked'¶
- class PkgUnlistedSieve(sifter, pkgname, *pkgnames)[source]¶
Bases:
PkgListSieveusage:
(pkg-unlisted PKG [PKG...])Matches tags which have no package listing (neither allowed nor blocked) for any of the given
PKGnames. Honors inheritance.- check(session, taginfo)[source]¶
Override to return True if the predicate matches the given info dict.
This is used by the default
runimplementation in a filter. Only the info dicts which return True from this method will be included in the results.- Parameters:
info -- The info dict to be checked.
- name = 'pkg-unlisted'¶
- class TaggedSieve(sifter, *exprs)[source]¶
Bases:
NVRSieveusage:
(tagged [NVR...])If no
NVRis specified, matches tags which have any builds tagged in them.If
NVRis specified, matches tags which have any of the given builds tagged in them. EachNVRmust be a valid reference to a build in this koji instance, or a NoSuchBuild exception will be raised.- name = 'tagged'¶
- sift_tagnames(session, src_str, names, params=None)[source]¶
- Parameters:
- Returns:
mapping of flags to matching tag info dicts
- Return type:
- sift_tags(session, src_str, tag_infos, params=None)[source]¶
- Parameters:
- Returns:
mapping of flags to matching tag info dicts
- Return type:
- tag_info_sieves()[source]¶
A new list containing the default tag-info sieve classes.
This function is used by
tag_info_sifterwhen creating itsSifterinstance.