Description of problem:
I am reopening bug 475758 because it was closed and is still an issue in Fedora 15. When setting up a cross-building environment, such a feature is almost a necessity to install easily the non native packages.
In the meantime, I am using such monstruosities to get by: sudo yum install $(sudo yum-builddep SRPMS/pulseaudio-0.99.3-0.1.fc15.src.rpm | tr '\n' " " | sed 's/Modules complémentaires chargés : langpacks, presto, refresh-packagekit//' | sed 's/Getting requirements for pulseaudio-0.99.3-0.1.fc15.src//' | sed 's/No uninstalled build requires//' | sed 's/ --> Already installed : //g' | sed 's/x86_64/i686/g')
--target in yum-builddep is not possible with current rpm-python bindings, the bindings need a way to reset + reload the entire rpm configuration before it becomes doable.
In the meantime, your self-made monster is much uglier than it needs to be :)
Instead of yum-build, use rpmspec (which does support --target) to grab the real build-requires out of a spec and feed the output to yum. Note spec, not src.rpm - dependencies in src.rpm headers can be specific to the arch the src.rpm happened to get built on.
Consider this your lucky day ;) Implemented now at rpm + yum-utils upstreams:
Whether these actually ever trickle down to F15 I can't promise, but at least future versions of Fedora will have it.
Wow, that was quick :)
Also thank you for letting me know about rpmspec. I've also discovered how easy it is to build 32 bits RPMS packages using mock & 32 bits chroot!
Have a great day!