Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-22155

Rpm generated primary.xml.gz does not contain 'pre' attribute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 6.14.1, 6.18.1
    • Fix Version/s: 7.15.3
    • Component/s: None
    • Labels:
    • Severity:
      High
    • Release Notes:
      Yes

      Description

      The 'pre' attribute is responsible to tell the rpm client that a package is a prerequisite for another package upon installation.
      For example, if package a depends on package b, it means that package b must be installed before a.
      Therefore, the package will have an attribute 'pre' with value 1 to let rpm know that it is required to be installed first.

      Example file which contain this attribute:
      https://github.com/openSUSE/libzypp/blob/master/zypp/parser/yum/schema/rpm-inc.rng

      Reference to the createrepo code where the pre is taken from the primary dump:

      https://github.com/rpm-software-management/createrepo_c/blob/master/src/xml_dump_primary.c#L124

      Reference to the changelog when this feature was added in createrepo:
      https://github.com/rpm-software-management/createrepo/blob/master/ChangeLog

      Reproduction steps:
      1. Download the following binary from Centos repository.
      2. Downloaded the matching repodata primary.xml.gz from here.
      3. Extract the xml file from the primary.xml.gz and notice this xml contains 'pre' attribute with value '1'.
      4. Deploy the .rpm file to a local repository in Artifactory and wait for the metadata to be generated.
      5. Once generated, download the primary.xml.gz which was generated and extract the xml file, you will notice that the 'pre' attribute is missing.

      The impact is that sometimes the installation fails due to the order the zypper client try to install the package due to missing metadata.

      I attached the original primary xml file and the one generated by Artifactory for comparison.

        Attachments

          Activity

              People

              Assignee:
              tomern Tomer Nir
              Reporter:
              shaibz Shai Ben-Zvi
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: