PackageQuery

class libdnf5.rpm.PackageQuery(*args)
filter_advisories(*args)

Filter packages by advisories they are included in.

Parameters:
  • advisory_query (libdnf5::advisory::AdvisoryQuery) – AdvisoryQuery with Advisories that contain package lists the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE.

Since: 5.0

filter_arch(*args)

Overload 1: Filter packages by their arch.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 2: Filter packages by their arch.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 3: Filter packages by their arch.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0

filter_available()
filter_conflicts(*args)

Overload 1: Filter packages by their conflicts.

Parameters:
  • reldep_list (ReldepList) – ReldepList with RelDep objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 2: Filter packages by their conflicts.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 3: Filter packages by their conflicts.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 4: Filter packages by their conflicts.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 5: Filter packages by their conflicts.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 6: Filter packages by their conflicts.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 7: Filter packages by their conflicts.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0

filter_description(*args)

Overload 1: Filter packages by their summary.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.2


Overload 2: Filter packages by their summary.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0


Overload 3: Filter packages by their summary.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0

filter_downgradable()
filter_downgrades()
filter_duplicates()

Filter packages to keep only duplicates of installed packages. Packages are duplicate if they have the same name and arch but different evr.

filter_earliest_evr(limit=1)

Group packages by name and arch. Then within each group, keep packages that correspond with up to limit of (all but) earliest `evr`s in the group.

Parameters:

limit (int, optional) – If limit > 0, keep limit number evr`s in each group. If `limit < 0, keep all but limit last `evr`s in each group.

Since: 5.0

filter_earliest_evr_any_arch(limit=1)

Group packages by name. Then within each group, keep packages that correspond with up to limit of (all but) earliest `evr`s in the group.

Parameters:

limit (int, optional) – If limit > 0, keep limit number evr`s in each group. If `limit < 0, keep all but limit last `evr`s in each group.

Since: 5.2

filter_enhances(*args)

Overload 1: Filter packages by their enhances.

Parameters:
  • reldep_list (ReldepList) – ReldepList with RelDep objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 2: Filter packages by their enhances.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 3: Filter packages by their enhances.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 4: Filter packages by their enhances.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 5: Filter packages by their enhances.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 6: Filter packages by their enhances.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 7: Filter packages by their enhances.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0

filter_epoch(*args)

Overload 1: Filter packages by their epoch.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 2: Filter packages by their epoch.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 3: Filter packages by their epoch.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 4: Filter packages by their epoch.

Parameters:
  • pattern (int) – A number the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE.

Since: 5.2


Overload 5: Filter packages by their epoch.

Parameters:
  • pattern (int) – A number the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE.

Since: 5.2


Overload 6: Filter packages by their epoch.

Parameters:
  • patterns (std::vector< unsigned long,std::allocator< unsigned long > >) – A vector of numbers the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE.

Since: 5.0


Overload 7: Filter packages by their epoch.

Parameters:
  • patterns (std::vector< unsigned long,std::allocator< unsigned long > >) – A vector of numbers the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE.

Since: 5.0

filter_evr(*args)

Overload 1: Filter packages by their epoch:version-release.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, GT, LT, GTE, LTE, EQ.

Since: 5.2


Overload 2: Filter packages by their epoch:version-release.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, GT, LT, GTE, LTE, NEQ.

Since: 5.0


Overload 3: Filter packages by their epoch:version-release.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, GT, LT, GTE, LTE, NEQ.

Since: 5.0

filter_extras(exact_evr=False)

Keep in the query only packages that are installed but not available in any enabled repository. Even excluded packages (e.g. using excludepkgs config option) are considered as available in repositories for the purpose of extras calculation. Those installed packages that are only part of non-active modules are also considered as extras. :type exact_evr: boolean, optional :param exact_evr: If false (default) extras calculation is based only on

name.arch. That means package is not in extras if any version of the package exists in any of the enabled repositories. If true, filter_extras is more strict and returns each package which exact NEVRA is not present in any enabled repository.

filter_file(*args)

Overload 1: Filter packages by files they contain.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.2


Overload 2: Filter packages by files they contain.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0


Overload 3: Filter packages by files they contain.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0

filter_installed()
filter_installonly()

Filter installonly packages.

Filter packages that provide a capability that matches with any value in installonlypkgs configuration option.

filter_latest_evr(limit=1)

Group packages by name and arch. Then within each group, keep packages that correspond with up to limit of (all but) latest `evr`s in the group.

Parameters:

limit (int, optional) – If limit > 0, keep limit number evr`s in each group. If `limit < 0, keep all but limit last `evr`s in each group.

Since: 5.0

filter_latest_evr_any_arch(limit=1)

Group packages by name. Then within each group, keep packages that correspond with up to limit of (all but) latest `evr`s in the group.

Parameters:

limit (int, optional) – If limit > 0, keep limit number evr`s in each group. If `limit < 0, keep all but limit last `evr`s in each group.

Since: 5.2

filter_latest_unresolved_advisories(*args)

Filter packages by the advisories they are included in, considering only the latest advisories that are not resolved in the currently installed package set.

Parameters:
  • advisory_query (libdnf5::advisory::AdvisoryQuery) – AdvisoryQuery with Advisories that contain package lists the filter is matched against.

  • installed (PackageQuery) – PackageQuery with currently installed packages.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE.

Since: 5.0

filter_leaves()

Filter the leaf packages.

Leaf packages are installed packages that are not required as a dependency of another installed package. However, two or more installed packages might depend on each other in a dependency cycle. Packages in such cycles that are not required by any other installed package are also leaf.

filter_leaves_groups()

Filter the leaf packages and return them grouped by their dependencies.

Leaf packages are installed packages that are not required as a dependency of another installed package. However, two or more installed packages might depend on each other in a dependency cycle. Packages in such cycles that are not required by any other installed package are also leaf. Packages in such cycles form a group of leaf packages.

Return type:

std::vector< std::vector< libdnf5::rpm::Package,std::allocator< libdnf5::rpm::Package > >,std::allocator< std::vector< libdnf5::rpm::Package,std::allocator< libdnf5::rpm::Package > > > >

Returns:

Groups of one or more interdependent leaf packages.

filter_location(*args)

Overload 1: Filter packages by their location. :type pattern: string :param pattern: A string the filter is matched against. :type cmp_type: int, optional :param cmp_type: A comparison (match) operator, defaults to QueryCmp::EQ.

Supported values: EQ, NEQ.

Since: 5.2


Overload 2: Filter packages by their location. :type patterns: std::vector< std::string,std::allocator< std::string > > :param patterns: A vector of strings the filter is matched against. :type cmp_type: int, optional :param cmp_type: A comparison (match) operator, defaults to QueryCmp::EQ.

Supported values: EQ, NEQ.

Since: 5.0


Overload 3: Filter packages by their location. :type patterns: std::vector< std::string,std::allocator< std::string > > :param patterns: A vector of strings the filter is matched against. :param cmp_type: A comparison (match) operator, defaults to QueryCmp::EQ.

Supported values: EQ, NEQ.

Since: 5.0

filter_name(*args)

Overload 1: Filter packages by their name.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0


Overload 2: Filter packages by their name.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0


Overload 3: Filter packages by their name.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0


Overload 4: Filter packages by their name based on names of the packages in the package_set.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 5: Filter packages by their name based on names of the packages in the package_set.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0

filter_name_arch(*args)

Filter packages by their name and arch based on names and arches of the packages in the package_set.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0

filter_nevra(*args)

Overload 1: Filter packages by their name-[epoch:]version-release.arch. The following matches are tolerant to omitted 0 epoch: EQ, NEQ, GT, GTE, LT, LTE.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, GLOB, NOT_GLOB, IGLOB, NOT_IGLOB, IEXACT, NOT_IEXACT.

Since: 5.2


Overload 2: Filter packages by their name-[epoch:]version-release.arch. The following matches are tolerant to omitted 0 epoch: EQ, NEQ, GT, GTE, LT, LTE.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, GLOB, NOT_GLOB, IGLOB, NOT_IGLOB, IEXACT, NOT_IEXACT.

Since: 5.0


Overload 3: Filter packages by their name-[epoch:]version-release.arch. The following matches are tolerant to omitted 0 epoch: EQ, NEQ, GT, GTE, LT, LTE.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, GLOB, NOT_GLOB, IGLOB, NOT_IGLOB, IEXACT, NOT_IEXACT.

Since: 5.0


Overload 4: Filter packages by the name, epoch, version, release and arch attributes from the nevra object. Only the attributes that are not blank are used in the filter.

Parameters:
  • nevra (Nevra) – A Nevra object the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, IGLOB, NOT_IGLOB.

Since: 5.0


Overload 5: Filter packages by the name, epoch, version, release and arch attributes from the nevra object. Only the attributes that are not blank are used in the filter.

Parameters:
  • nevra (Nevra) – A Nevra object the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, IGLOB, NOT_IGLOB.

Since: 5.0


Overload 6: Filter packages by their name-[epoch:]version-release.arch attributes of the packages in the package_set. Only packages whose name.arch is present in the package_set are taken into account. Their epoch:version-release are then compared according to the value of cmp_type with those in package_set. Only the matching packages are kept in the query. In case NOT is used in cmp_type, the matching packages are removed from the query.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, and their combinations with NOT.

Since: 5.0


Overload 7: Filter packages by their name-[epoch:]version-release.arch attributes of the packages in the package_set. Only packages whose name.arch is present in the package_set are taken into account. Their epoch:version-release are then compared according to the value of cmp_type with those in package_set. Only the matching packages are kept in the query. In case NOT is used in cmp_type, the matching packages are removed from the query.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, and their combinations with NOT.

Since: 5.0

filter_obsoletes(*args)

Overload 1: Filter packages by their obsoletes.

Parameters:
  • reldep_list (ReldepList) – ReldepList with RelDep objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 2: Filter packages by their obsoletes.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 3: Filter packages by their obsoletes.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 4: Filter packages by their obsoletes.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 5: Filter packages by their obsoletes.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 6: Filter packages by their obsoletes.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 7: Filter packages by their obsoletes.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0

filter_priority()

Group packages by name and arch. Then within each group, keep packages that belong to a repo with the highest priority (the lowest number). The filter works only on available packages, installed packages are not affected.

Since: 5.0

filter_provides(*args)

Overload 1: Filter packages by their provides.

Parameters:
  • reldep_list (ReldepList) – ReldepList with RelDep objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 2: Filter packages by their provides.

Parameters:
  • reldep (Reldep) – RelDep object the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 3: Filter packages by their provides.

Parameters:
  • reldep (Reldep) – RelDep object the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 4: Filter packages by their provides.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 5: Filter packages by their provides.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 6: Filter packages by their provides.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 7: Filter packages by their provides.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0

filter_reboot_suggested()

Filter packages whose installation or upgrade should cause a system reboot to be recommended. These are packages that either (1) belong to a hardcoded set of “core packages”, including the kernel and systemd, or (2) have an associated reboot_suggested advisory.

filter_recent(timestamp)

Keep in the query only recent packages - those with build time after given timestamp :type timestamp: int :param timestamp: Only packages built after this will pass

filter_recommends(*args)

Overload 1: Filter packages by their recommends.

Parameters:
  • reldep_list (ReldepList) – ReldepList with RelDep objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 2: Filter packages by their recommends.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 3: Filter packages by their recommends.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 4: Filter packages by their recommends.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 5: Filter packages by their recommends.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 6: Filter packages by their recommends.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 7: Filter packages by their recommends.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0

filter_release(*args)

Overload 1: Filter packages by their release.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, GLOB, NOT_GLOB.

Since: 5.2


Overload 2: Filter packages by their release.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, GLOB, NOT_GLOB.

Since: 5.0


Overload 3: Filter packages by their release.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, GLOB, NOT_GLOB.

Since: 5.0

filter_repo_id(*args)

Overload 1: Filter packages by id of the Repo they belong to.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 2: Filter packages by id of the Repo they belong to.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 3: Filter packages by id of the Repo they belong to.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0

filter_requires(*args)

Overload 1: Filter packages by their requires.

Parameters:
  • reldep_list (ReldepList) – ReldepList with RelDep objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 2: Filter packages by their requires.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 3: Filter packages by their requires.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 4: Filter packages by their requires.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 5: Filter packages by their requires.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 6: Filter packages by their requires.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 7: Filter packages by their requires.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0

filter_sourcerpm(*args)

Overload 1: Filter packages by their sourcerpm.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.


Overload 2: Filter packages by their sourcerpm.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.


Overload 3: Filter packages by their sourcerpm.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

filter_suggests(*args)

Overload 1: Filter packages by their suggests.

Parameters:
  • reldep_list (ReldepList) – ReldepList with RelDep objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 2: Filter packages by their suggests.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 3: Filter packages by their suggests.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 4: Filter packages by their suggests.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 5: Filter packages by their suggests.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 6: Filter packages by their suggests.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 7: Filter packages by their suggests.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0

filter_summary(*args)

Overload 1: Filter packages by their summary.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.2


Overload 2: Filter packages by their summary.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0


Overload 3: Filter packages by their summary.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0

filter_supplements(*args)

Overload 1: Filter packages by their supplements.

Parameters:
  • reldep_list (ReldepList) – ReldepList with RelDep objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 2: Filter packages by their supplements.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 3: Filter packages by their supplements.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.2


Overload 4: Filter packages by their supplements.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 5: Filter packages by their supplements.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB.

Since: 5.0


Overload 6: Filter packages by their supplements.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0


Overload 7: Filter packages by their supplements.

Parameters:
  • package_set (PackageSet) – PackageSet with Package objects the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ.

Since: 5.0

filter_unneeded()

Filter unneeded packages. Unneeded packages are those which are installed as dependencies and are not required by any user-installed package any more.

filter_upgradable()
filter_upgrades()
filter_url(*args)

Overload 1: Filter packages by their url.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.2


Overload 2: Filter packages by their url.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0


Overload 3: Filter packages by their url.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GLOB, NOT_GLOB, IEXACT, NOT_IEXACT, ICONTAINS, NOT_ICONTAINS, IGLOB, NOT_IGLOB, CONTAINS, NOT_CONTAINS.

Since: 5.0

filter_userinstalled()

Keep in the query only installed packages that are user-installed.

filter_version(*args)

Overload 1: Filter packages by their version.

Parameters:
  • pattern (string) – A string the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, GLOB, NOT_GLOB.

Since: 5.2


Overload 2: Filter packages by their version.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type (int, optional) – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, GLOB, NOT_GLOB.

Since: 5.0


Overload 3: Filter packages by their version.

Parameters:
  • patterns (std::vector< std::string,std::allocator< std::string > >) – A vector of strings the filter is matched against.

  • cmp_type – A comparison (match) operator, defaults to QueryCmp::EQ. Supported values: EQ, NEQ, GT, GTE, LT, LTE, GLOB, NOT_GLOB.

Since: 5.0

filter_versionlock()

Filter out versionlock excluded packages.

The packages versions excluded by versionlock are removed from the query. Since: 5.1.13

resolve_pkg_spec(pkg_spec, settings, with_src)

Resolve spec according to provided settings. It tests whether spec is NEVRA type, provide, file or binary. It returns only the first match type. If spec has a match as NEVRA and provide type it only keeps matches with the first tested type (NEVRA).

swap(other)
thisown