Skip to content
Tomas Mlcoch edited this page May 6, 2014 · 7 revisions

Terminology:

  • MF - Metadata file - A file inside the repodata/ and listed in the repomd.xml.
  • OF - Other file - A file inside the repodata/ directory but NOT LISTED in the repomd.xml.

Createrepo behavior

Regardless if used with or without --update createrepo output repodata/ looks like:

  • All OFs stay there with unmodified content.
  • Some MFs are regenerated. According to command line parameters at least the primary.xml, filelists.xml, other.xml. MFs like groupfile (--groupfile) or databases (--database) could be regenerated as well if the options are used.
  • All MFs that were listed in the repomd.xml and are not being regenerated, are kept in the repodata/ directory but not referenced by the new repomd.xml anymore. (See: https://bugzilla.redhat.com/show_bug.cgi?id=950301#c1)
  • This behavior leads to the situation where old and outdated files like groupfiles or updateinfos are accumulating in the repodata/ directory over the time.

New behavior

Regardless if used with or without --update, createrepo_c output repodata/ looks like:

  • All OFs stay there with unmodified content, but each file is a copy so the file's metadata like mtime or number of hardlinks may be altered.
  • All MFs are regenerated or removed.
  • All MFs are regular files (not symlinks).
  • All MFs have a number of hardlink references equal to 1.

Example

mkdir testrepo && testrepo
touch comps_a comps_b
Createrepo
createrepo --no-database --simple-md-filenames --groupfile comps_a .

repodata/ contains: comps_a comps_a.gz filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml

createrepo --no-database --simple-md-filenames --groupfile comps_b --update .

repodata/ contains: comps_a comps_a.gz comps_b comps_b.gz filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml

Createrepo_c
createrepo_c --no-database --simple-md-filenames --groupfile comps_a .

repodata/ contains: comps_a comps_a.gz filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml

createrepo_c --no-database --simple-md-filenames --groupfile comps_b --update .

repodata/ contains: comps_b comps_b.gz filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml