AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
Expand all | Collapse all

Yum not resolving dependencies from Artifactory repo?

  • 1.  Yum not resolving dependencies from Artifactory repo?

    Posted Mon August 20, 2018 12:34 PM

    Originally posted by: dmj12031


    I had Yum working for file-based repo's built with createrepo from AIX Toolbox. I then tried to use it for Artifactory repo's, 
    and initially had issues parsing the metadata which I eventually got past:
    https://www.ibm.com/developerworks/community/forums/html/topic?id=308e7798-9fb0-4a71-ba70-859d5f04b41f&ps=25

    Now I'm having another issue which seems to be related to Artifactory metadata. yum won't resolve dependencies, even though
    they are present in the repo. For example, I try to install git and it fails because of a dependency on less... yet less is in the repo, 
    and it resolves fine if I try the file-based repo (which is almost identical content).

    For examples below I disabled all repo's and cleaned all cache (even removed everything in /var/cache/yum).
    Then I used --enablerepo for each command. If I list available packages, it shows less is in Artifactory repo.
    But it won't resolve the dependency for git?

    # yum --enablerepo=<artifactory> list available
    ...
    git.ppc                        2.12.0-1                   <artifactory>
    less.ppc                       466-1                      <artifactory>

    ...

     

    # yum --enablerepo=<artifactory> deplist git
    Finding dependencies:
    package: git.ppc 2.12.0-1
    ...
      dependency: less
       Unsatisfied dependency


    However if I point to the file-based repo, it resolves fine...

    # yum --enablerepo=<file repo> deplist git
    ...
    package: git.ppc 2.12.0-1
    ...
      dependency: less
       provider: less.ppc 466-1


    Looking at what's in the cache after these commands, for the file repo it has <hash>-primary.sqlite.
    But for the Artifactory repo, it has <hash>-primary.xml.gz and <hash>-primary.xml.gz.sqlite.


    Artifactory only seems to provide metadata in xml, not sqlite format, so yum is apparently generating that sqlite file from the xml file,

    and I suspect that's the where the problem lies.  Artifacory can optionally generate

    a filelists.xml file, but it doesn't seem to make any difference, I only see the primary.xml file getting downloaded.

     

    I don't know enough about yum or how it parses the metadata to know what to look for, any suggestions?



  • 2.  Re: Yum not resolving dependencies from Artifactory repo?

    Posted Mon August 20, 2018 08:42 PM

    Originally posted by: dmj12031


    It seems to be something in the way Artifactory generates its primary.xml file. If I run createrepo with --no-database on the file repo, and then look at

    the primary.xml file that is generated, the entry for less has this attribute:

        <rpm:provides>
          <rpm:entry name="less" flags="EQ" epoch="0" ver="466" rel="1"/>
        </rpm:provides>

     

    But the primary.xml file for Artifactory has an empty "provides" atrribute, for the exact same rpm:

          <rpm:provides/>

     

     



  • 3.  Re: Yum not resolving dependencies from Artifactory repo?

    Posted Tue September 25, 2018 10:03 AM

    Originally posted by: dmj12031


    FYI for anyone considering Artifactory...

    The vendor has stated that this dependency resolution is not working because Artifactory does not generate the xml metadata the same way as createrepo. DUH! That's what I've been trying to tell them for a month. They've told us we can "open a feature request" for what I consider to be an obvious bug in a product that claims to be a "Universal" Repository Manager.