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
  • 1.  Yum error in sqlitecachec.py

    Posted Thu September 21, 2017 01:38 PM

    Originally posted by: dmj12031


    Just getting started with yum, and it seems to work fine with the AIX Toolbox or internally-created repos. But when trying to use it with JFrog Artifactory, we get the error below There are some posts about this error possibly being caused by an incompatible version of libxml2, but I don't think that's the case here. It seems to be because Artifactory does not generate the sqlite files in their repodata (https://www.jfrog.com/jira/browse/RTFACT-7067), because I can replicate the issue by creating an internal repo with the --no-database flag.

    Traceback (most recent call last):
      File "/bin/yum", line 29, in <module>
        yummain.user_main(sys.argv[1:], exit_code=True)
      File "/opt/freeware/share/yum-cli/yummain.py", line 288, in user_main
        errcode = main(args)
      File "/opt/freeware/share/yum-cli/yummain.py", line 140, in main
        result, resultmsgs = base.doCommands()
      File "/opt/freeware/share/yum-cli/cli.py", line 440, in doCommands
        return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
      File "/opt/freeware/share/yum-cli/yumcommands.py", line 864, in doCommand
        base.repos.populateSack()
      File "/opt/freeware/lib/python2.7/site-packages/yum/repos.py", line 294, in populateSack
        sack.populate(repo, mdtype, callback, cacheonly)
      File "/opt/freeware/lib/python2.7/site-packages/yum/yumRepo.py", line 186, in populate
        dobj = repo_cache_function(xml, csum)
      File "/opt/freeware/lib/python2.7/site-packages/sqlitecachec.py", line 46, in getPrimary
        self.repoid))
    TypeError: Parsing primary.xml error: Start tag expected, '<' not found
    

     

    I believe yum is supposed to fall back to using the XML repodata files if the sqlite files are not present, but it seems like AIX yum may not be doing that, or may not be doing it properly? There's also a (new-ish?) yum.conf option mddownloadpolicy to only use the XML files, but that doesn't seem to work either.

    mddownloadpolicy You can select which kinds of repodata you
    would prefer yum to download:
    
    `sqlite' - Download the .sqlite files, if available. This is
    currently slightly faster, once they are downloaded. However
    these files tend to be bigger, and thus. take longer to
    download.
    
    `xml' - Download the .XML files, which yum will do anyway as a
    fallback on the other options. These files tend to be smaller,
    but they require parsing/converting locally after download and
    some aditional checks are performed on them each time they are
    used.
    

     

    Any suggestions would be appreciated. I'm not optimistic about JFrog supporting sqlite files any time soon.



  • 2.  Re: Yum error in sqlitecachec.py

    Posted Fri September 22, 2017 08:32 AM

    Originally posted by: sanket


    I tried for same and it is working for me.

    I have create a local repo with only XML (--no-database). I had only two RPMs in directory zip and unzip.

    Following is the output.

     

    # yum clean all
    Cleaning repos: Local
    Cleaning up Everything


    # ls repo
    unzip-6.0-3.aix6.1.ppc.rpm  zip-3.0-2.aix6.1.ppc.rpm


    # createrepo --no-database repo
    Spawning worker 0 with 1 pkgs
    Spawning worker 1 with 1 pkgs
    Workers Finished
    Saving Primary metadata
    Saving file lists metadata
    Saving other metadata


    # ls repo/repodata/
    298b5ea2820dc2462fa8c07e9846871c380e41e9b6e54ec3d2d93290afad3ede-primary.xml.gz    b21707c33cf2d81cac597bd242e396b59131d0e6e4075d9fba2e90949ee6a1e0-filelists.xml.gz
    6792665effb29e8da9cc88d850f934667de08cb03495d1b18622234b035fca6d-other.xml.gz      repomd.xml


    # yum list | grep Local
    unzip.ppc                            6.0-3                   Local
    zip.ppc                              3.0-2                   Local


    # yum install zip
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package zip.ppc 0:3.0-2 will be installed
    --> Finished Dependency Resolution

    Dependencies Resolved

    ==============================================================================================================================================================================================================
     Package                                         Arch                                            Version                                              Repository                                         Size
    ==============================================================================================================================================================================================================
    Installing:
     zip                                             ppc                                             3.0-2                                                Local                                             386 k

    Transaction Summary
    ==============================================================================================================================================================================================================
    Install       1 Package

    Total download size: 386 k
    Installed size: 909 k
    Is this ok [y/N]: y
    Downloading Packages:
    Running Transaction Check
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : zip-3.0-2.ppc                                                                                                                                                                              1/1

    Installed:
      zip.ppc 0:3.0-2

    Complete!
    #



  • 3.  Re: Yum error in sqlitecachec.py

    Posted Mon September 25, 2017 03:19 PM

    Originally posted by: dmj12031


    Thanks for the response sanket.

    After hearing it was working for you, I went back and started over with a brand new server build. Unfortunately I'm still getting the same error. Not sure where it's going off the rails, but I'll keep looking.

    Appreciate your assistance.



  • 4.  Re: Yum error in sqlitecachec.py

    Posted Mon August 20, 2018 11:08 AM

    Originally posted by: dmj12031


    Just updating this with what worked for me, since I saw some other folks had a similar issue. YMMV, it's probably dependent on what other packages you have installed from which sources, and/or some variations in the format of the repodata that your given repo provides. In fact now that I got past this issue I'm having another issue with Artifactory, but I'll put that in a new post.

     

    In this case it seemed to be an incompatibility with /usr/lib/libxml2.a from bos.rte.control. I got it to work by installing libxml2 2.9.4-1 from the AIX Toolbox and setting LIBPATH to /opt/freeware/lib.

     

    BTW, this was originally on AIX 7.1.4.4, we've since updated to 7.1.4.5 and it's still working. Hope that helps.