[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Dependencies [was: Re: bugs, bugs, bugs!]

On Wed, Jul 30, 2003 at 08:22:26PM +0200, Leonard den Ottolander wrote:
> Hi Jeremy,
> > And that is effectively how dependency-solving tools like up2date, apt,
> > yum, etc. work... by querying remote servers, caching appropriate
> > meta-deta locally, and figuring out all of this for you.  Leonard:  why
> > won't you use one of those tools and thus avoid this whole problem?
>  In many cases one wouldn't need to use these tools if dependencies 
> were clear (as in (also) using package names). For more difficult 
> situations one would use an update tool. See my other posts.

Before we set off redesigning package dependency chains for rpm, duplicating
existing file and soname dependencies with package dependencies, let me
point out --aid, which is quite useful even if you insist on not
using tools but prefer manually upgrading using rpm.

0) Mount a distro universe of packages someplace. I use, say, /10/i386 for
the RHLP beta.

1) Install the rpmdb-redhat package from that distro.

2) Edit /etc/rpm/macros.solve to configure where to get packages from:

 #       The path to the dependency universe database. The default value
 #       is the rpmdb-redhat location. The macro is usually defined in
 #       /etc/rpm/macros.solve, installed with the rpmdb-redhat package.
 %_solve_dbpath /usr/lib/rpmdb/i386-redhat-linux/redhat
 #       The path to the dependency universe packages. This should
 #       be a path to the packages contained in the solve database.
-%_solve_pkgsdir /mnt/redhat/test/latest-i386/RedHat/RPMS/
+%_solve_pkgsdir /10/i386/
 #       The output binary package file name template used when suggesting
 #       binary packages that solve a dependency. The macro is usually defined
 #       in /etc/rpm/macros.solve, installed with the rpmdb-redhat package.
 # XXX   Note: escaped %% for use in headerSprintf()
-%_solve_name_fmt        %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
+%_solve_name_fmt        %{?_solve_pkgsdir}%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

3) Add --aid when installing/upgrading a package.

Additional packages will be looked up in the rpmdb-redhat package, the location
of the package will be generated by prefixing "/10/i386/", and the package
will be automagically added to the transaction.

This solves most of "dependency hell", i.e. chasing down which package
satisfies a new dependency quite well.

And, if for some reason you can't afford to make all the packages available
at /10/i386 (or wherever), the rpm will display suggested resolutions
using rpmdb-redhat.

Yes, tools like up2date and yum do a better job than --aid.

There is no such thing as "clear dependencies", but that's just my opinion.

No matter what, attempting to follow dependency chains manually is not
necessary anymore, and adding Yet More package dependency is silly.

73 de Jeff

Jeff Johnson	ARS N3NPQ
jbj redhat com (jbj jbj org)
Chapel Hill, NC

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]