Click to See Complete Forum and Search --> : getting dependencies of RPMs and such


CaptainPinko
03-23-2003, 04:25 AM
how can i from the command line find out what packages an rpm depends on?

i tried:

rpm --requires myrpm.rpm


but all it does is spit out the options for the rpm command (which does list "--requires" :mad: ) so.. any ideas?

this would be so i don't have to install the packages (or try to) and just wait for it to fail

sharth
03-23-2003, 09:41 PM
I'm trying this on my debian system (which i installed rpm on :rolleyes: ), and I get some random error when i try this. However, it may work for you.

rpm --query --requires <file>

2ndsign
03-23-2003, 09:57 PM
when you try to install rpms it should tell you what you need (dependencies) if it doesnt install!:)

CaptainPinko
03-23-2003, 10:01 PM
yeah, i'm trying to find that out w/o resorting to that, i'm trying to write a script that will check if i have everything necessary to install the current package by checking dependencies, the only thing i can think of is to use --test and then parse the output for missing dependencies but that isn't to elegant and i think that will slow it down anyway

sharth
03-23-2003, 10:32 PM
hmmm...

I'm sifting through the debian repositories and I came across librpm4, which allows you to basically do what rpm does without rpm. Perhaps that will be of some use to you.