Blame SOURCES/0017-Add-documentation-for-query-api-flags.patch

44fffb
From 27f26c607c44b8331b23c861241a8509c2452531 Mon Sep 17 00:00:00 2001
44fffb
From: sbluhm <stefan.bluhm@clacee.eu>
44fffb
Date: Sun, 9 Jan 2022 14:30:19 +0100
70e049
Subject: [PATCH] Add documentation for query api flags
44fffb
44fffb
= changelog =
44fffb
msg: Add documentation for query api flags
44fffb
type: enhancement
44fffb
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2035577
44fffb
---
44fffb
 AUTHORS          |  1 +
44fffb
 doc/api_sack.rst | 14 +++++++++++++-
44fffb
 2 files changed, 14 insertions(+), 1 deletion(-)
44fffb
44fffb
diff --git a/AUTHORS b/AUTHORS
44fffb
index f8c9eb83..0077c7ea 100644
44fffb
--- a/AUTHORS
44fffb
+++ b/AUTHORS
44fffb
@@ -91,6 +91,7 @@ DNF CONTRIBUTORS
44fffb
     Petr Spacek <pspacek@redhat.com>
44fffb
     Rob Cutmore <robcutmore@gmail.com>
44fffb
     Satoshi Matsumoto <kaorimatz@gmail.com>
44fffb
+    Stefan Bluhm <stefan.bluhm@clacee.eu>
44fffb
     Tomas Kasparek <tkasparek@redhat.com>
44fffb
     Vladan Kudlac <vladankudlac@gmail.com>
44fffb
     Will Woods <wwoods@redhat.com>
44fffb
diff --git a/doc/api_sack.rst b/doc/api_sack.rst
44fffb
index 79719878..ac843fc9 100644
44fffb
--- a/doc/api_sack.rst
44fffb
+++ b/doc/api_sack.rst
44fffb
@@ -25,10 +25,22 @@
44fffb
 
44fffb
   The package sack. Contains metadata information about all known packages, installed and available.
44fffb
 
44fffb
-  .. method:: query()
44fffb
+  .. method:: query(flags=hawkey.APPLY_EXCLUDES)
44fffb
 
44fffb
     Return a :class:`Query<dnf.query.Query>` for querying packages contained in this sack.
44fffb
 
44fffb
+    :ref:`Package filtering <excluded_packages-label>` is applied when creating the query object. The behavior can be adapted using flags. Possible flags:
44fffb
+
44fffb
+
44fffb
+    ==============================   ===========================================================================
44fffb
+    Flag                             Value meaning
44fffb
+    ==============================   ===========================================================================
44fffb
+    hawkey.APPLY_EXCLUDES            Apply all package filtering.
44fffb
+    hawkey.IGNORE_EXCLUDES           Ignore all package filtering.
44fffb
+    hawkey.IGNORE_REGULAR_EXCLUDES   Ignore regular excludes defined by configuration files or the command line.
44fffb
+    hawkey.IGNORE_MODULAR_EXCLUDES   Ignore modular filtering.
44fffb
+    ==============================   ===========================================================================
44fffb
+
44fffb
 .. function:: rpmdb_sack(base)
44fffb
 
44fffb
     Returns a new instance of sack containing only installed packages (@System repo). Useful to get list of the installed RPMs after transaction.
44fffb
-- 
70e049
2.35.1
44fffb