[NBLUG/talk] Depsolving when creating a yum repository?

Lincoln Peters anfrind at gmail.com
Mon Aug 20 09:55:22 PDT 2012


I have a problem that probably isn't so unusual, but I can't find a
good solution (although I might be looking in the wrong places).


I need to be able to create and maintain a yum repository containing
my employer's software and all of that software's dependencies, and
use it on one or more RHEL hosts that have a minimal set of installed
packages and do not have access to a repository with the full contents
of the RHEL installation media (no Red Hat Network access or anything
similar).  Therefore, when I create or update the repository, I need
to make sure it has every dependency (including standard RHEL
packages) that might be missing from the hosts.  And I may be
uploading packages to the repository over a very slow link (my link to
the repository and the hosts that use it may be no faster than
dial-up, although all of those hosts are on a high-speed LAN), so I
don't want to waste time uploading any packages I don't need.

I currently have a script that can look up the packages installed on
each host (as per "rpm -qa" with a custom query format that I can
easily parse), and I can issue various "rpm -qp" commands to get the
name, architecture, version, and requirements of each RPM I might have
to upload and then do some rudimentary* parsing in order to determine
which packages actually need to go in the repository.  However, I
can't help but think that there must be a better way--perhaps
something that lets me leverage the depsolving logic already in yum?


Thanks in advance.


* By "rudimentary", I mean that it occasionally makes mistakes that
will cause an upgrade to fail, usually because it either couldn't tell
the difference between a dependency on a package and a dependency on a
file, or if the package depends on a specific version of a package it
didn't parse the version properly.


-- 
Lincoln Peters
<anfrind at gmail.com>



More information about the talk mailing list