Bug 2216905 - dnf5 seems to ignore cachedir=
Summary: dnf5 seems to ignore cachedir=
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: 39
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nicola Sella
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-23 06:32 UTC by Valdis Kletnieks
Modified: 2024-11-27 21:13 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-11-27 21:13:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Valdis Kletnieks 2023-06-23 06:32:23 UTC
/etc/dnf/dnf.conf contains:

# cat /etc/dnf/dnf.conf
[main]
cachedir=/usr/src/dnf/$basearch/$releasever
gpgcheck=True
installonly_limit=3
keepcache=1


However, it decided to download the RPM to /var/cache/libdnf5 anyhow:

# find /var /usr/src/dnf -name '*8.99.76.300-1*' -ls
      800 123056 -rw-r--r--   1 root     root     125999500 Jun 23 01:41 /var/cache/libdnf5/skype-unstable-2948e6a06613a3cd/packages/skypeforlinux_8.99.76.300-1.x86_64.rpm


Reproducible: Always

Comment 1 Nicola Sella 2023-07-10 09:17:26 UTC
Hi, can you please specify dnf5's version and on which fedora, so I can test it?

Comment 2 Jan Kolarik 2023-07-13 11:30:09 UTC
I think this is due to using dnf from the root account. Then by default system cachedir is used. See https://github.com/rpm-software-management/dnf5/blob/5.0.15/libdnf5/conf/config_main.cpp#L1424.

Comment 3 Valdis Kletnieks 2023-07-16 13:25:22 UTC
(In reply to Nicola Sella from comment #1)
> Hi, can you please specify dnf5's version and on which fedora, so I can test
> it?

Running Rawhide.

Is currently happening on dnf5-5.0.15-4.fc39.x86_64, but it appears to have been broken since 5.0.14-1.

Comment 4 Valdis Kletnieks 2023-07-16 13:40:28 UTC
(In reply to Jan Kolarik from comment #2)
> I think this is due to using dnf from the root account. Then by default
> system cachedir is used. See
> https://github.com/rpm-software-management/dnf5/blob/5.0.15/libdnf5/conf/
> config_main.cpp#L1424.

I'm OK with it using that directory as the *default*,  the fact I specified a cachedir=
in dnf.conf and it didn't honor it is what bothers me.. /var fills up pretty fast if
you also have 'keepcache=1' (I've been burned too many times with rawhide updates
that I need to backlevel and I can't find the previous version).  Add in a few
repos like google-chrome-beta and google-chrome-unstable and the next thing you know
your cachedir is growing at a gigabyte a week (which is why I intentionally pointed it
at a filesystem that's currently sitting at 835G free...)

Comment 5 Fedora Release Engineering 2023-08-16 08:11:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 6 Aoife Moloney 2024-11-08 10:54:15 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 7 Aoife Moloney 2024-11-27 21:13:47 UTC
Fedora Linux 39 entered end-of-life (EOL) status on 2024-11-26.

Fedora Linux 39 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.