richardphibel / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

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

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