[Rpm-maint] Re: rpm --aid problem

Panu Matilainen pmatilai at redhat.com
Wed May 28 09:28:56 UTC 2008


On Thu, 22 May 2008, Linda Walsh wrote:

>
> Florian Festi wrote:
>> holmes86 wrote:
>>> Appear error message "Failed dependencies" When I install rpm package with 
>>> --aid option under FC8.
>>> why?
> ---   Hey holmes, I'd sorta like to know that too...:-)
>
>> Don't do that. --aid is no longer supported (the database used to
>> resolve the dependencies is no longer shipped) and this feature is not
>> working well anyway and will removed from future versions of rpm.
> ----
>  Well, I guess I was wondering why it doesn't work if one
> uses an appropriate 'database'...  :-)
>
>  I have all the packages downloaded to a local NFS server so
> client machines can install from the server.  But to get rpm to
> suggest upgrades "automatically", I needed to construct a local
> rpm-db representing the new packages.
>
>  I started to write a collection of perl and shell scripts that
> would build a local rpm-database to allow me to solve rpm failed
> dependencies from the new package directories.  Then I found that
> it had already been done "the right way" -- using all rpm-db
> commands on a fully constructed rpm-db that covered the new
> packages.
>  I found "rpm-cache" was used to construct a local rpm-db for
> a group of locally-accessible (at least on local NFS or
> CIFS(SMB)) files.
>
>  rpm-cache appears to properly create an rpmdb representing the
> local file-distribution cache.  One minor 'gotcha' was that
> it didn't seem to want to work with 'db' files existing on NFS.
> Something about not being having permission to 'lock' them --
> though my 'user' owning the db-dirs has full write access.  I
> was able to generate the db on a local file system:
>>  lh --noperms /tmp/rpmdb-cache
> 1  21M May 12 15:08 Basenames
> 1  12K May 12 15:08 Conflictname
> 1 3.7M May 12 15:08 Dirnames
> 1  21M May 12 15:08 Filemd5s
> 1 116K May 12 15:08 Group
> 1  60K May 12 15:08 Installtid
> 1 320K May 12 15:08 Name
> 1 119M May 12 15:08 Packages
> 1 1.3M May 12 15:08 Providename 1 344K May 12 15:08 Provideversion
> 1 876K May 12 15:08 Requirename
> 1 544K May 12 15:08 Requireversion
> 1 656K May 12 15:08 Sha1header
> 1 320K May 12 15:08 Sigmd5
> 1  12K May 12 15:08 Triggername
> --------
>  So any idea why rpm --aid doesn't seem to look in my "db"?
>
>  Does 'rpm' read the user's ~/.rpmmacros file in addition to the
> machine's /etc/rpm/macros file?  "rpm-cache" appears to
> use the values in ~/.rpmmacros

It does, but it's subject to things like "su -" vs "su" setting your home 
dir differently. The path where rpmcache puts stuff and where rpm itself 
looks for it are separate macros, so in addition to the rpmcache 
config, you'll need to add something like to rpm macro config to tell rpm 
itself where to look for the solve db and packages:

%_solve_dbpath /tmp/rpm-cache
%_solve_pkgsdir /path/to/where/the/packages/are

But watch out, rpmcache and the solvedb depsolver are utterly broken when 
it comes to dealing with multiple arch variants for the same package. *IF*
you only have just one arch of each package in the "solve universe" it 
works fairly ok, but reading between lines it seems that you'd be pointing 
it to local mirror of Fedora - that certainly is not going to work well.

>> Use "yum install foo" instead. Yum is working on the packages actual
>> available and is able to download them on demand. It is also possible to
>> give rpm files to the yum command line.
> ----
>
>>  yum install foo
> : [Errno 4] IOError: <urlopen error (101, 'Network is unreachable')>
> Trying other mirror.
> Error: Cannot retrieve repository metadata (repomd.xml) for repository: %s. 
> Please verify its path and try again
> ------
>  yum doesn't appear to understand the rpm macros file. Are you sure
> it is supposed to work with the rpm commands and databases?  Is it
> even compatible with the rpm data and macro files?  How do I tell
> yum where my local network's package cache is?

The macro files are read by rpm-python but yum doesn't use the solvedb 
mechanism at all, it only knows about repositories.

> It certainly is not desirable for each client machine to download rpm
> packages over a relatively slow (~333 times slower) internet
> connection vs. the local network's 1Gbit speed.

Just point yum to the local mirror instead (yum repositories can be 
file:// urls too, doesn't have to be http/ftp).

 	- Panu -



More information about the Rpm-maint mailing list