What is the Yum Metadata folder depth parameter?

The Yum Metadata Folder Depth parameter on the YUM repository basic configuration settings is an important parameter which determines how the metadata will be calculated for the repository, and where the repodata folder will be created.

It is recommended not to change it once it is set.

During the metadata calculation, this parameter informs Artifactory under which folder depth to search for the RPM packages. Artifactory will look for rpm packages starting from the depth level and onwards.

Also, the repodata folder location (which holds the metadata files) is created according to the Depth Level.

The automatic metadata calculation process is triggered (after the quiet period) for any Add/Delete/Modification of rpm package and eventually the repodata folder is updated with the metadata files.

On yum repositories of Folder Depth is 0, metadata will be calculated for all rpm packages regardless of their folder level (which means also those on level 1, 2 and onwards).

The repodata folder will be created on the root level (depth = 0) only.

If the Depth Level is set to 1 (subsetting the main repository into multiple sub-repositories on level 1), then the metadata will be calculated for the rpm packages under the folder in which the operation was triggered

In this case, the repodata folder will be created for that folder (which is on level 1).

Please note that if the rpm package was upload to the root of the repository, metadata will not be calculated as Artifactory searches only from level 1 and onwards.

Furthermore, for any other folder on the same level (level 1), no metadata will be calculated.

See the attached screenshot of yum repository ‘yum-depeth1’ which is configured with Folder Depth Level 1).

This repository has two folders (sub-repositories) on level 1- folder ‘a’ and folder ‘b’.

Any change in folder ‘a’ (triggering metadata calculation on this folder) will not affect folder ‘b’ and vice versa.

Why is It not recommended to change the Folder Depth value once it is set?

Because it changes the behavior of the repository altogether.

The location of the repodata folder will be changed affecting the yum clients (as baseurl has to point to repodata location) so need to re-set the baseurl.

Also, older repodata folders are not wiped out from the yum repository.