From Fedora Project Wiki

Revision as of 08:19, 14 August 2023 by Sumantrom (talk | contribs) (Created page with "{{QA/Test_Case |description=This test case validates the `createrepo_c` tool's ability to generate a metadata repository from a directory of RPM packages. It also ensures the `createrepo_c-libs` package supports this functionality. |setup= # Install a fresh version of Fedora. # Install the necessary packages: `sudo dnf install createrepo_c createrepo_c-libs`. # Prepare a directory with a few RPM packages: `mkdir /path/to/rpms` and place some RPM files inside. |actions=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This test case validates the createrepo_c tool's ability to generate a metadata repository from a directory of RPM packages. It also ensures the createrepo_c-libs package supports this functionality.

Setup

  1. Install a fresh version of Fedora.
  2. Install the necessary packages: sudo dnf install createrepo_c createrepo_c-libs.
  3. Prepare a directory with a few RPM packages: mkdir /path/to/rpms and place some RPM files inside.

How to test

  1. Navigate to the directory with RPMs: cd /path/to/rpms.
  2. Run createrepo_c . to generate a metadata repository in the current directory.
  3. Check for the presence of the repodata directory within /path/to/rpms.
  4. Examine the repodata directory for XML metadata files such as primary.xml.gz, filelists.xml.gz, and other.xml.gz.

Expected Results

  1. Running createrepo_c . should complete without errors.
  2. A repodata directory should be created in /path/to/rpms.
  3. The repodata directory should contain XML metadata files.
  4. Metadata files like primary.xml.gz, filelists.xml.gz, and other.xml.gz should be non-empty and contain information about the RPM packages in the directory.

Optional

For extended testing:

  1. Use yum or dnf to create a local repo file pointing to /path/to/rpms and try installing a package from this local repository to ensure the generated metadata is accurate and functional.
  2. Modify one of the RPMs or add a new RPM, then update the repository using createrepo_c --update . and verify that the changes are reflected in the metadata.
  3. Examine the library calls and functions by utilizing debug tools or ldd to ensure the proper functioning and linkage of createrepo_c-libs.