I am looking for a way to have yum install only dependencies for a given package, something like an --prepare-for-install option so I can take a snapshot of the prepared system and test the rpm setup with different options or rebuilds of the package itself on a clean system without having to rely on the rpm uninstall and without downloading the dependencies each time.
Asked
Active
Viewed 2.0k times
3 Answers
11
This might be really dumb but it should work.
PACKAGE=awstats
yum deplist $PACKAGE | grep provider | awk '{print $2}' | sort | uniq | grep -v $PACKAGE | sed ':a;N;$!ba;s/\n/ /g' | xargs yum -y install
ablackhat
- 2,013
0
Best option I found until now for my packages is to put an "exit 1" into the %pre scriptlet the first time the package is built but I'm looking for cleaner options, not requiring modification of the package itself.
a1an
- 487