Commit Graph

9708 Commits

Author SHA1 Message Date
Jan Kolarik 5b319fa25b Allow passing plugin parameters with dashes in names (RhBug:1980712)
= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1980712
2022-08-11 12:55:03 +02:00
Aleš Matěj 401aee0abb Don't include resolved advisories for obsoletes with sec. filters (RhBug:2101421)
This makes the obsoletes security filters consistent with upgrade
security filters.

This API is used from check-update and from Info and List commands.
- For check-update we don't want to include resolved advisories to have
  identical result to the actual update. That is bz2101421 use case.
- For Info and List commands the --obsoletes switch: "List packages
  installed on the system that are obsoleted by packages in any known
  repository." Given this specification in makes sense not to
  consider resolved advisories when we also use security filters.

There is still a general case when someone uses the API or any potential
future use and I think it is best to have the behavior unified for
"upgrades" and "obsoletes".

= changelog =
msg:           Don't include resolved advisories for obsoletes filtering with security filters
type:          bugfix
resolves:      https://bugzilla.redhat.com/show_bug.cgi?id=2101421

Tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/1134
2022-08-10 15:33:40 +02:00
Aleš Matěj 75df22dd3d Use `installed_all` because `installed_query` is filtered user input
`installed_query` could be missing packages. If we specify we want to
upgrade a specific nevra that is not yet installed, then `installed_query`
is empty because it is based on user input, but there could be other
versions of the pkg installed.

Eg: if kernel-1 and kernel-3 are installed and we specify we want to
upgrade kernel-2, nothing should be done because we already have higher
version, but now `installed_query` would be empty and kernel-2 would be
installed.

Therefore, we need to use `installed_all`.
2022-07-19 12:11:48 +02:00
Aleš Matěj 20d99dcf06 Add only relevant pkgs to upgrade transaction (RhBug:2097757)
https://bugzilla.redhat.com/show_bug.cgi?id=2097757

Without this patch dnf can create the following transaction during dnf upgrade --security when there is an advisory for B-2-2:

```
repo @System 0 testtags <inline>
#>=Pkg: A 1 1 x86_64
#>=Pkg: B 1 1 x86_64
#>=Req: A = 1-1

repo available 0 testtags <inline>
#>=Pkg: A 2 2 x86_64
#>=Pkg: B 2 2 x86_64
#>=Req: A = 2-2
system x86_64 rpm @System
job update oneof A-1-1.x86_64@@System B-2-2.x86_64@available [targeted,setevr,setarch]
result transaction,problems
```

Problem is that without forcebest nothing gets upgraded despite the available advisory and --security switch.

This can also be seen in CI test case: rpm-software-management/ci-dnf-stack#1130
2022-07-19 12:11:48 +02:00
Jaroslav Mracek f8fed338a7 Set default value for variable to prevent crash (RhBug:2091636)
It ensure that read of file ended successfully.

https://bugzilla.redhat.com/show_bug.cgi?id=2091636
2022-07-12 08:03:25 +02:00
Aleš Matěj 12b5128db6 doc: Describe how gpg keys are stored for `repo_ggpcheck` (RhBug:2020678)
https://bugzilla.redhat.com/show_bug.cgi?id=2020678
2022-06-23 10:39:20 +02:00
Jaroslav Rohel ef09e48fc3 Release 4.13.0 2022-05-30 08:59:19 +01:00
plenusredemptio 0332e30c77 Small change to better present the option
To show unequivocally that it is a boolean option.
2022-05-23 15:26:47 +02:00
Miro Hrončok cda67a0bd3 Add a clear method boundary 2022-05-12 18:34:18 +02:00
Miro Hrončok 8f304e6baa Don't use undocumented re.template()
Python 3.11.0b1 removed it: https://github.com/python/cpython/commit/b09184bf05

It might be resurrected for a proper deprecation period, but it is going away.

See https://github.com/python/cpython/issues/92728

I've looked at the original commit that introduced this code: 6707f479bb
There is no clear indication that would suggest why re.template was used.
2022-05-12 18:34:18 +02:00
Laszlo Ersek 065c32efb8 AUTHORS: add Laszlo Ersek
Add myself to the "DNF CONTRIBUTORS" section, per "README.rst".

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2022-04-28 13:16:02 +02:00
Laszlo Ersek 5ce5ed1ea0 Base.reset: plug (temporary) leak of libsolv's page file descriptors
Consider the following call paths (mixed Python and C), extending from
livecd-creator down to libsolv:

  main                                                [livecd-tools/tools/livecd-creator]
    install()                                         [livecd-tools/imgcreate/creator.py]
      fill_sack()                                     [dnf/dnf/base.py]
        _add_repo_to_sack()                           [dnf/dnf/base.py]
          load_repo()                                 [libdnf/python/hawkey/sack-py.cpp]
            dnf_sack_load_repo()                      [libdnf/libdnf/dnf-sack.cpp]
              write_main()                            [libdnf/libdnf/dnf-sack.cpp]
                repo_add_solv()                       [libsolv/src/repo_solv.c]
                  repopagestore_read_or_setup_pages() [libsolv/src/repopage.c]
                    dup()
              write_ext()                             [libdnf/libdnf/dnf-sack.cpp]
                repo_add_solv()                       [libsolv/src/repo_solv.c]
                  repopagestore_read_or_setup_pages() [libsolv/src/repopage.c]
                    dup()

The dup() calls create the following file descriptors (output from
"lsof"):

> COMMAND  PID USER FD  TYPE DEVICE SIZE/OFF   NODE NAME
> python3 6500 root  7r  REG    8,1 25320727 395438 /var/tmp/imgcreate-mytcghah/install_root/var/cache/dnf/fedora.solv (deleted)
> python3 6500 root  8r  REG    8,1 52531426 395450 /var/tmp/imgcreate-mytcghah/install_root/var/cache/dnf/fedora-filenames.solvx

These file descriptors are *owned* by the DnfSack object (which is derived
from GObject), as follows:

  sack->priv->pool->repos[1]->repodata[1]->store.pagefd = 7
  sack->priv->pool->repos[1]->repodata[2]->store.pagefd = 8
  ^     ^     ^     ^         ^            ^      ^
  |     |     |     |         |            |      |
  |     |     |     |         |            |      int
  |     |     |     |         |            Repopagestore [libsolv/src/repopage.h]
  |     |     |     |         Repodata                   [libsolv/src/repodata.h]
  |     |     |     struct s_Repo                        [libsolv/src/repo.h]
  |     |     struct s_Pool (aka Pool)                   [libsolv/src/pool.h]
  |     DnfSackPrivate                                   [libdnf/libdnf/dnf-sack.cpp]
  DnfSack                                                [libdnf/libdnf/dnf-sack.h]

The file descriptors are *supposed* to be closed on the following call
path:

  main                                         [livecd-tools/tools/livecd-creator]
    install()                                  [livecd-tools/imgcreate/creator.py]
      close()                                  [livecd-tools/imgcreate/dnfinst.py]
        close()                                [dnf/dnf/base.py]
          reset()                              [dnf/dnf/base.py]
            _sack = None
            _goal = None
            _transaction = None
              ...
                dnf_sack_finalize()            [libdnf/libdnf/dnf-sack.cpp]
                  pool_free()                  [libsolv/src/pool.c]
                    pool_freeallrepos()        [libsolv/src/pool.c]
                      repo_freedata()          [libsolv/src/repo.c]
                        repodata_freedata()    [libsolv/src/repodata.c]
                          repopagestore_free() [libsolv/src/repopage.c]
                            close()

Namely, when dnf.Base.reset() [dnf/dnf/base.py] is called with (sack=True,
goal=True), the reference counts of the objects pointed to by the "_sack",
"_goal" and "_transaction" fields are supposed to reach zero, and then, as
part of the DnfSack object's finalization, the libsolv file descriptors
are supposed to be closed.

Now, while this *may* happen immediately in dnf.Base.reset(), it may as
well not. The reason is that there is a multitude of *circular references*
between DnfSack and the packages that it contains. When dnf.Base.reset()
is entered, we have the following picture:

     _sack                   _goal
        |                      |
        v                      v
   +----------------+      +-------------+
   | DnfSack object | <--- | Goal object |
   +----------------+      +-------------+
     |^    |^    |^
     ||    ||    ||
     ||    ||    ||
  +--||----||----||---+
  |  v|    v|    v|   | <-- _transaction
  | Pkg1  Pkg2  PkgN  |
  |                   |
  | Transaction oject |
  +-------------------+

That is, the reference count of the DnfSack object is (1 + 1 + N), where N
is the number of packages in the transaction. Details:

(a) The first reference comes from the "_sack" field, established like
    this:

      main                       [livecd-tools/tools/livecd-creator]
        install()                [livecd-tools/imgcreate/creator.py]
          fill_sack()            [dnf/dnf/base.py]
            _build_sack()        [dnf/dnf/sack.py]
              Sack()
                sack_init()      [libdnf/python/hawkey/sack-py.cpp]
                  dnf_sack_new() [libdnf/libdnf/dnf-sack.cpp]

(b) The second reference on the DnfSack object comes from "_goal":

      main                        [livecd-tools/tools/livecd-creator]
        install()                 [livecd-tools/imgcreate/creator.py]
          fill_sack()             [dnf/dnf/base.py]
             _goal = Goal(_sack)
               goal_init()        [libdnf/python/hawkey/goal-py.cpp]
                 Py_INCREF(_sack)

(c) Then there is one reference to "_sack" *per package* in the
    transaction:

      main                                  [livecd-tools/tools/livecd-creator]
        install()                           [livecd-tools/imgcreate/creator.py]
          runInstall()                      [livecd-tools/imgcreate/dnfinst.py]
            resolve()                       [dnf/dnf/base.py]
              _goal2transaction()           [dnf/dnf/base.py]
                list_installs()             [libdnf/python/hawkey/goal-py.cpp]
                  list_generic()            [libdnf/python/hawkey/goal-py.cpp]
                    packagelist_to_pylist() [libdnf/python/hawkey/iutil-py.cpp]
                      new_package()         [libdnf/python/hawkey/sack-py.cpp]
                        Py_BuildValue()
                ts.add_install()

    list_installs() creates a list of packages that need to be installed
    by DNF. Inside the loop in packagelist_to_pylist(), which constructs
    the elements of that list, Py_BuildValue() is called with the "O"
    format specifier, and that increases the reference count on "_sack".

    Subsequently, in the _goal2transaction() method, we iterate over the
    package list created by list_installs(), and add each package to the
    transaction (ts.add_install()). After _goal2transaction() returns,
    this transaction is assigned to "self._transaction" in resolve(). This
    is where the last N (back-)references on the DnfSack object come from.

(d) Now, to quote the defintion of the DnfSack object
    ("libdnf/docs/hawkey/tutorial-py.rst"):

> *Sack* is an abstraction for a collection of packages.

    That's why the DnfSack object references all the Pkg1 through PkgN
    packages.

So, when the dnf.Base.reset() method completes, the picture changes like
this:

     _sack                     _goal
        |                        |
   -- [CUT] --              -- [CUT] --
        |                        |
        v                |       v
   +----------------+   [C]  +-------------+
   | DnfSack object | <-[U]- | Goal object |
   +----------------+   [T]  +-------------+
     |^    |^    |^      |
     ||    ||    ||
     ||    ||    ||         |
  +--||----||----||---+    [C]
  |  v|    v|    v|   | <--[U]-- _transaction
  | Pkg1  Pkg2  PkgN  |    [T]
  |                   |     |
  | Transaction oject |
  +-------------------+

and we are left with N reference cycles (one between each package and the
same DnfSack object).

This set of cycles can only be cleaned up by Python's generational garbage
collector <https://stackify.com/python-garbage-collection/>. The GC will
collect the DnfSack object, and consequently close the libsolv page file
descriptors via dnf_sack_finalize() -- but garbage collection will happen
*only eventually*, unpredictably.

This means that the dnf.Base.reset() method breaks its interface contract:

> Make the Base object forget about various things.

because the libsolv file descriptors can (and frequently do, in practice)
survive dnf.Base.reset().

In general, as long as the garbage collector only tracks process-private
memory blocks, there's nothing wrong; however, file descriptors are
visible to the kernel. When dnf.Base.reset() *temporarily* leaks file
descriptors as explained above, then immediately subsequent operations
that depend on those file descriptors having been closed, can fail.

An example is livecd-creator's unmounting of:

  /var/tmp/imgcreate-mytcghah/install_root/var/cache/dnf

which the kernel refuses, due to libsolv's still open file descriptors
pointing into that filesystem:

> umount: /var/tmp/imgcreate-mytcghah/install_root/var/cache/dnf: target
> is busy.
> Unable to unmount /var/tmp/imgcreate-mytcghah/install_root/var/cache/dnf
> normally, using lazy unmount

(Unfortunately, the whole lazy umount idea is misguided in livecd-tools;
it's a misfeature that should be removed, as it permits the corruption of
the loop-backed filesystem. Now that the real bug is being fixed in DNF,
lazy umount is not needed as a (broken) workaround in livecd-tools. But
that's a separate patch for livecd-tools:
<https://github.com/livecd-tools/livecd-tools/pull/227>.)

Plug the fd leak by forcing a garbage collection in dnf.Base.reset()
whenever we cut the "_sack", "_goal" and "_transaction" links -- that is,
when the "sack" and "goal" parameters are True.

Note that precisely due to the unpredictable behavior of the garbage
collector, reproducing the bug may prove elusive. In order to reproduce it
deterministically, through usage with livecd-creator, disabling automatic
garbage collection with the following patch (for livecd-tools) is
sufficient:

> diff --git a/tools/livecd-creator b/tools/livecd-creator
> index 291de10cbbf9..8d2c740c238b 100755
> --- a/tools/livecd-creator
> +++ b/tools/livecd-creator
> @@ -31,6 +31,8 @@ from dnf.exceptions import Error as DnfBaseError
>  import imgcreate
>  from imgcreate.errors import KickstartError
>
> +import gc
> +
>  class Usage(Exception):
>      def __init__(self, msg = None, no_error = False):
>          Exception.__init__(self, msg, no_error)
> @@ -261,5 +263,6 @@ def do_nss_libs_hack():
>      return hack
>
>  if __name__ == "__main__":
> +    gc.disable()
>      hack = do_nss_libs_hack()
>      sys.exit(main())

Also note that you need to use livecd-tools at git commit 4afde9352e82 or
later, for this fix to make any difference: said commit fixes a different
(independent) bug in livecd-tools that produces identical symptoms, but
from a different origin. In other words, if you don't have commit
4afde9352e82 in your livecd-tools install, then said bug in livecd-tools
will mask this DNF fix.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2022-04-28 13:16:02 +02:00
Robin Jarry c1a407eba3 bash-completion: use sqlite cache when available
Use /var/cache/dnf/packages.db to make SQL requests instead of parsing
the repodata files at each tab completion. This makes completing package
names much snappier.

This is an inspiration from zsh dnf completion:
https://github.com/zsh-users/zsh/blob/zsh-5.8.1/Completion/Redhat/Command/_dnf#L7-L33

= changelog =
msg: Use sqlite cache to make bash completion snappier
type: enhancement
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1815895
2022-04-27 15:53:31 +02:00
Jaroslav Rohel 956b5c74ba Release 4.12.0 2022-04-27 11:46:45 +02:00
Jaroslav Rohel 1a457ce5bd [doc] Improve "proxy" configuration option documentation (RhBug:2072332) 2022-04-27 08:30:49 +02:00
Aleš Matěj c54ed31070 Add spaces between words to fix typos (RhBug: 2077296)
https://bugzilla.redhat.com/show_bug.cgi?id=2077296
2022-04-26 10:49:22 +02:00
Zhang Wenlong 96b08be690 Add loongarch support for dnf
Signed-off-by: Wenlong Zhang <zhangwenlong@loongson.cn>
2022-04-07 11:43:11 +02:00
Nicola Sella b646ae4d71 Fix remove when no repos are enabled (RhBz:2064341)
msg: When no repositories are enabled, dnf group exits and does not
remove an installed group.
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2064341
type: bugfix
2022-03-28 16:18:44 +02:00
Oğuz Ersen 5f4f60d5d8 completion: remove unnecessary echo 2022-03-28 09:14:19 +02:00
Oğuz Ersen 7581fd3a88 Update AUTHORS 2022-03-28 09:14:19 +02:00
Aleš Matěj 71e435f5e7 Fix unittests that relied on checksum being at the end of solvfiles 2022-03-23 13:48:12 +01:00
Miroslav Suchý b4926be01e dnf.conf: hint users where to find more info about defaults and other options 2022-03-17 09:56:15 -04:00
Marek Blaha 3e36c99d40 Fix processing of download errors (RhBug: 2024527)
Users with different than english locale are not able to update their
systems in case that some of updates are already downloaded in the dnf
cache (e.g. using dnf-automatic).

The error string is taken from librepo target where it is stored
untranslated. Therefore we need to compare untranslated versions of the
string.

= changelog =
msg:           Fix download errors handling in non-english locales
type:          bugfix
resolves:      https://bugzilla.redhat.com/show_bug.cgi?id=2024527
2022-03-15 08:00:32 +01:00
Pavla Kratochvilova fba1e2ec93 Release 4.11.1 2022-03-14 11:56:39 +01:00
Jaroslav Rohel af3d0da4e4 Release 4.11.0 2022-03-08 15:09:41 +01:00
Miro Hrončok c68038ff12 Remove /usr/bin from sys.path to avoid accidentally importing garbage
See https://bugzilla.redhat.com/show_bug.cgi?id=2057340
and https://github.com/benjaminp/six/issues/359

dnf should never import Python modules from /usr/bin but users can
have files in there that look like Python modules and Python will
try to import them and fail.

Consider a tool that is *not* written in Python and is called "copy.pyc".
Naturally, it resides in /usr/bin/copy.pyc and dnf fails:

    Traceback (most recent call last):
      File "/usr/bin/dnf", line 57, in <module>
        from dnf.cli import main
      File "/usr/lib/python3.10/site-packages/dnf/__init__.py", line 30, in <module>
        import dnf.base
      File "/usr/lib/python3.10/site-packages/dnf/base.py", line 31, in <module>
        from copy import deepcopy
    ImportError: bad magic number in 'copy': b'...'

Similarly, a tool actually written in Python, called "copy.py"
might as well own /usr/bin/copy.py and dnf fails as well:

    Traceback (most recent call last):
      File "/usr/bin/dnf", line 57, in <module>
        from dnf.cli import main
      File "/usr/lib/python3.10/site-packages/dnf/__init__.py", line 30, in <module>
        import dnf.base
      File "/usr/lib/python3.10/site-packages/dnf/base.py", line 31, in <module>
        from copy import deepcopy
    ImportError: cannot import name 'deepcopy' from 'copy' (/usr/bin/copy.py)

Either problem can happen for a variety of names.
We better not let that happen.

A more general solution that would prevent Python doing this entirely
does not exists yet, see https://discuss.python.org/t/4235

Hence, proposing this to dnf, which is a critical piece of the system.
2022-02-25 10:35:54 +01:00
Lukáš Hrázký e87aa5db0d cli/commands/history: Fix history undo on a Reason Change
The previous reason needs to be fetched from the history db. It's
inefficient to parse the nevra after it was serialized in a previous
step, but that would need bigger code restructuring.

= changelog =
msg: Fix history undo on a Reason Change
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2053014
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2010259
2022-02-22 13:27:11 +01:00
Marek Blaha 018cd24dc6 Fix decompression of groups.xml (RhBug:2030255)
Fixes permission denied issue when dnf command is run by an unprivileged
user with `-C` option (i.e. using root cache) and uncompressed
groups.xml has not yet been generated by root:

$ dnf -C groups list
[Errno 13] Permission denied: '/var/cache/dnf/fedora-37d3cae0527b6391/repodata/gen'

Now the uncompressed file is generated in a temporary location in such
case.

= changelog =
msg: Fix decompression of groups.xml
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2030255
2022-02-16 12:03:08 +01:00
Aleš Matěj 7bf23b5867 Document default values for module_obsoletes and module_stream_switch (RhBug: 2051846)
https://bugzilla.redhat.com/show_bug.cgi?id=2051846
2022-02-14 17:10:28 +01:00
Oğuz Ersen 3e566786b8 Update AUTHORS 2022-02-09 14:34:34 +01:00
Oğuz Ersen 7f160aed2b Fix typos 2022-02-09 14:34:34 +01:00
Jaroslav Rohel b9758590d9 Use rpm.TransactionSet.dbCookie() to determining if rpmdb has changed
DNF was using private method `hawkey.Sack._rpmdb_version()` from libdnf.
The method computes SHA1 hash from sorted list of hashes stored in
the headers of the instaled packages. And it adds prefix of the number
of installed packages to the computed hash. The result was stored
to the history database and used to detect changes in the rpm database.

The patch uses new oficial librpm API function
`rpm.TransactionSet.dbCookie()`. This is a cleaner solution.
It is also a step to remove the `._rpmdb_version()` method from libdnf.
It is an attempt to remove SHA1 calculations from libdnf.
Troubleshooting FIPS compatibility.

= changelog =
msg: Use rpm.TransactionSet.dbCookie() to determining if rpmdb has changed
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2043476
2022-02-04 17:12:11 +01:00
Nate Graham bc70d93609 Clarify inline 'dnf provides' documentation a bit
This command is currently a bit confusing to use because it requires
either a full file path, or else a glob. Simply searching for a
filename alone does not work unless you add a glob, but this requirement
is implicit and never explicitly mentioned in the command's help text.

This commit makes that explicit by mentioning it in the command usage,
and also by adding a hint when no matches are returned.

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1963704
2022-02-01 10:04:27 +01:00
Chris Ayoub f9f07492f0 Fix regression in verifying signatures using rpmkeys
= changelog =
msg: Fix regression in verifying signatures using rpmkeys
type: bugfix
related: https://github.com/rpm-software-management/dnf/pull/1752
2022-01-31 09:57:34 +01:00
Stephen Gallagher b96a672a86 Fix dnf-yum Provides on ELN
On ELN, the %{fedora} macro is not present. Instead, it has a
%{rhel} macro equal to the next major release of RHEL.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2022-01-27 13:29:42 +01:00
zhanghaolian a33425cadf dnf:fix dnf mark error when history sqlite missing 2022-01-25 09:36:50 +01:00
Marek Blaha b831cbd50b Update translations 2022-01-12 16:48:12 +01:00
Aleš Matěj 7772a95f52 Fix python3.11 build: remove deprecated, update traceback regex
https://docs.python.org/3.11/whatsnew/3.11.html#enhanced-error-locations-in-tracebacks
Tracebacks were updated with `^^^^^..` locators surrounded by optional
`~~~..` so add an optional line that matches them into the traceback regex.

Removes unused variable and deprecated `assertRegexpMatches`.
2022-01-12 12:58:49 +01:00
sbluhm a96abad2cd Add documentation for query api flags
= changelog =
msg: Add documentation for query api flags
type: enhancement
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2035577
2022-01-10 12:12:50 +01:00
Pavla Kratochvilova fae98bef6e [spec] Recommend rpm-plugin-systemd-inhibit only if systemd
The rpm-plugin-systemd-inhibit can only work on a system with systemd.
At the time of adding the dependency, rich dependencies were not yet
in Fedora, so adding it now.

= changelog =
msg: Recommend rpm-plugin-systemd-inhibit only if systemd
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1947924
2022-01-10 10:41:19 +01:00
Pavla Kratochvilova 1525256672 [spec] Don't recommend python3-unbound on RHEL
The python3-unbound is used in dnssec.py for gpgkey_dns_verification,
which is an optional feature disabled by default and it depends on
DNSSEC that is not used by redhat.com. Therefore, we don't want to have
this dependency by default on RHEL.

= changelog =
msg: Don't recommend python3-unbound on RHEL
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1947924
2022-01-10 10:41:19 +01:00
Pavla Kratochvilova ca663a638c [spec] Don't recommend %{_bindir}/sqlite3 for bash-completion
The /usr/bin/sqlite3 Recommends was originally introduced based on bug
https://bugzilla.redhat.com/show_bug.cgi?id=1479330  for correct
functioning of bash-completion. But now bash-completion seems to work
even without it.

= changelog =
msg: Don't recommend %{_bindir}/sqlite3 for bash-completion
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1947925
2022-01-10 10:41:19 +01:00
Marek Blaha 8f3f98ee71 Switch install/remove parts of swap command (RhBug:2036434)
In case the install spec refers to a local rpm file the swap command
would fail with this error:

Error: Cannot add local packages, because transaction job already exists

Changing the order in which the installation and removal parts are
performed fixes the issue.

= changelog =
msg:           Fix swap command to work with local rpm files correctly
type:          bugfix
resolves:      https://bugzilla.redhat.com/show_bug.cgi?id=2036434
2022-01-04 12:46:24 +01:00
Nate Graham 6cef144b65 Documentation: clarify effect of --enablerepo and --disablerepo options
These options are currently rather confusing because they do not make it
clear that they operate only temporarily on the currently-used dnf
command. This commit clarifies them by mentioning that.

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=2031414
2021-12-17 04:08:35 -05:00
Marek Blaha 424dd1742b Unify links to readthedocs.io in the documentation
Consistently use https protocol and .io top level domain. This saves
users some unnecessary redirects.
2021-12-10 11:41:47 +01:00
Daniel Alley ab6e43f8a3 Fix broken links in yum-to-dnf cli documentation 2021-12-10 09:15:11 +01:00
Jaroslav Mracek a3d3528922 Allow destdir option with modulesync command 2021-12-08 15:58:20 +01:00
François Rigault 2423ad0026 DNSSEC show why_bogus
In case the DNSSEC verification fails, Unbound provides an explanation
under why_bogus. We display that in the debug logs.
2021-11-23 08:00:54 +01:00
Jaroslav Rohel c0f7a36483 Documentation: API notes for cacheonly 2021-11-05 09:48:09 +01:00
Jaroslav Rohel 118bd0c124 Fix: Python dnf API does not respect cacheonly (RhBug:1862970)
`Repo` object has always been constructed with default synchronization
strategy. The configuration option `cacheonly` was ignored. DNF
application set synchronization strategy later in the `Cli` object
during processing demands.

The fix takes into account the `cacheonly` option during the construction
of the `Repo` object. Synchronization strategy may still be overriden
during demand processing.
2021-11-05 09:48:09 +01:00