[Fedora-packaging] Re: Tool to determine what files require what

Orion Poplawski orion at cora.nwra.com
Mon Aug 8 16:40:13 UTC 2005


Orion Poplawski wrote:
> 
> Yeah, I was hoping for something a little more ready to go.  Does anyone 
> know what script/process is run during the rpmbuild that generates the 
> rpm dependecies, perhaps I can use/modify that...
> 
> 

Well, to answer my question, this basically does what I want:

#Requires
find $RPM_BUILD_ROOT -type f | while read file
do
    deps=`/usr/lib/rpm/rpmdeps -R $file`
    if [ -n "$deps" ]
    then
       echo -n "$file: " | sed s,$RPM_BUILD_ROOT,, >> ../requires
       echo $deps >> ../requires
    fi
done

Then with a simple perl script I can invert the list to files show per 
requirement.

-- 
Orion Poplawski
System Administrator                   303-415-9701 x222
Colorado Research Associates/NWRA      FAX: 303-415-9702
3380 Mitchell Lane, Boulder CO 80301   http://www.co-ra.com




More information about the Fedora-packaging mailing list