On Fri, Dec 17, 2004 at 06:00:45AM -0500, madera@xxxxxxxxxxxxxxxxxxx wrote: > You pass a package file name and (it doesn't even read the package, just the > package file name) it tells you the name, the version, release and > architecture. It also compares two package names to see wich one is newer. The package file name is just a convention, so for a 100% reliable answer you have to read the package header *in* the file. Look at rpm --querytags and rpm --queryformat and you can retrieve all information from a rpm package that you ever want to know. > My question is: I fear that this is already available with the rpm command using > some strange syntax and heavy use of macros. Are there any such params for the > rpm command? Yes, see above, but not from the filename (that's a Perl one-liner, b.t.w.). > The functions I want are basically comparing versions, releases, names, and all > that could be relevant. Version/release comparison is a separate issue. I'm not sure if the algorithm that rpm uses is "callable" from the rpm command, I guess it's available from the rpm library API. -- -- Jos Vos <jos@xxxxxx> -- X/OS Experts in Open Systems BV | Phone: +31 20 6938364 -- Amsterdam, The Netherlands | Fax: +31 20 6948204 _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list