Cannot read from external rpmdb

Issues related to applications and software problems
Post Reply
pmisik
Posts: 2
Joined: 2017/12/15 14:53:04

Cannot read from external rpmdb

Post by pmisik » 2017/12/15 14:59:15

Hi all,
I'm to utilize an external rpmdb to create an update DVD for offline systems. The problem I'm running in to is that yum won't pull my list of installed applications. I was seeing if anyone here might be able to point me in a direction or variable I'm missing.

Thanks,
Pete

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot read from external rpmdb

Post by TrevorH » 2017/12/15 16:16:38

I don't think you mean an rpmdb - that is the database used by rpm on the machine to keep track of the packages that are installed, what files they provide and what their checksums should be etc.

Perhaps you mean you want to create a yum repo? In which case the CentOS install DVD is already set up to be exactly that and the centos-release package provides an /etc/yum.repos.d/CentOS-Media.repo file to allow it to be used. Edit that file to find out the possible directories it uses by default - or amend it to point to your own mountpoint - loopback mount the CentOS iso image on one of those directories then run yum --disablerepo=\* --enablerepo=c7-media update
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

pmisik
Posts: 2
Joined: 2017/12/15 14:53:04

Re: Cannot read from external rpmdb

Post by pmisik » 2017/12/15 17:27:23

Thank you for getting back to me so quickly Trevor, but I do mean a rpmdb. Here's what I'm trying to do:

I have a few external systems that need very specific package management. I copied the rpmdb from /var/lib/rpm to an external location. When I run rpm -qa --dbpath /where I copied the files, I get a list of rpms that were installed to that specific machine.
I have a script that attempts to emulate the machine by allowing you to set up an install-root, a RPM location, and a dbpath.
The only thing that I don't have working is the number of installed files returns 0. If I feed it a list of files it needs to update, it works perfectly. I was seeing if there was anyone in the CentOS community that understands yum enough to try and clue me in to a particular variable that I can test to see if it's being populated.

Thank you,
Pete

Post Reply