Re: rpm dependance solving....
Greg Kurtzer <[email protected]> Mon, 8 Apr 2002 14:18:16 -0700
| Newsgroups | gmane.linux.redhat.rpm.grab |
|---|---|
| Message-ID | <[email protected]> |
I too have seen this, and played with it. The problem that I am having is not necessarily getting or building a database of the --requires, and provides, but it is building a correct dep tree accordingly. Here is what I mean... I have played with small repositories (local), and tried to write scripts to resolve deps... This is much harder then it sounds. For example, check out this command: # rpm -q -p --requires ftp://ftp.runlevelzero.net/pub/greg/grab/RPMS/grab-0.2.31-1.i386.rpm perl rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 /usr/bin/perl For GRAB, I have 4 required items. The first is easy (because it is a package name). The rpmlib(s) are harder because they are not in a package, and they require a certain version. The last is a file (which should have been resolved by line 1 (perl)). Now writing a script that can parse this everytime correctly is awfully complex. I don't think it is impossible, and I have gotten pretty close. Once I start development on GRAB-unstable I will try to incorporate all of this into the codebase (in one form or another). Thanks for bringing this up... I saw it before, but actually forgot that it worked so well! I will start testing... Greg On Mon, Apr 08, 2002 at 04:37:34PM -0400, Jef Spaleta wrote: > from reading the man page for rpm...it looks like the command > > rpm -q -p ftp://path/whatever.rpm will download only the header > information for that rpm for the query. > > So I imagine you could do this as part of the grab --update routine > with minimal information downloaded to catch the dependancy chain. > > something liek rpm -q --requires -p ftp://path/whatever.rpm for every > rpm on the ftp server would catch the depedance information you need. > and rpm -q --provides -p ftp://path/whatever.rpm would catch the > provides. > > You could probably get away with only looking for the provides in the > header and do the --requires look up during the download phase. > > what do you think? if rpm really only downloads the header part of the > rpm during a -p query...you can't get much smaller than that for a > serverside lookup. > > > -jef > > _______________________________________________ > Grab mailing list > [email protected] > http://www.runlevelzero.net/mailman/listinfo/grab -- Greg Kurtzer [email protected] http://www.runlevelzero.net LINUX,... The choice of a GNU generation! :wq