Inconsistency between dnf's manpage and /etc/yum.repos.d/* on metadata_expire

DNF’s manpage says the following, ( man dnf.conf | grep -A5 metadata_expire | sed 1,/--/d )

       metadata_expire
              time in seconds

              The  period  after  which  the  remote repository is checked for metadata update and in the positive case the local metadata cache is updated. The default corresponds to 48
              hours. Set this to -1 or never to make the repo never considered expired. Expire of metadata can be also triggered by change of timestamp of configuration files  (dnf.conf,
              <repo>.repo). See also check_config_file_age.

But files in /etc/yum.repos.d/ don’t use a value in seconds.

Output of grep metadata_expire /etc/yum.repos.d/*

/etc/yum.repos.d/fedora-cisco-openh264.repo:metadata_expire=14d
/etc/yum.repos.d/fedora-cisco-openh264.repo:metadata_expire=14d
/etc/yum.repos.d/fedora-modular.repo:metadata_expire=7d
/etc/yum.repos.d/fedora-modular.repo:metadata_expire=7d
/etc/yum.repos.d/fedora-modular.repo:metadata_expire=7d
/etc/yum.repos.d/fedora.repo:metadata_expire=7d
/etc/yum.repos.d/fedora.repo:metadata_expire=7d
/etc/yum.repos.d/fedora.repo:metadata_expire=7d
/etc/yum.repos.d/fedora-updates-modular.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates-modular.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates-modular.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates-testing-modular.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates-testing-modular.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates-testing-modular.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates-testing.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates-testing.repo:metadata_expire=6h
/etc/yum.repos.d/fedora-updates-testing.repo:metadata_expire=6h
/etc/yum.repos.d/rpmfusion-free.repo:metadata_expire=14d
/etc/yum.repos.d/rpmfusion-free.repo:metadata_expire=7d
/etc/yum.repos.d/rpmfusion-free.repo:metadata_expire=7d

DNF’s manpage needs to be updated.

1 Like

Thanks. Can you please file this as a bug directly with the dnf folks?

You can login to bugzilla using your FAS account, as you do here.

(You can also open a pull request if you want—instructions also in the readme file)

I couldn’t find where in dnf’s source code conversation from string to a numeric value for metadata_expire happens, thus can’t identify what constrains it applies.

1 Like

Found it. libdnf/OptionSeconds.cpp at master · rpm-software-management/libdnf · GitHub

1 Like