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

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