Bug 734983

Summary: yum-builddep lacks --target option.
Product: [Fedora] Fedora Reporter: Maxim Cournoyer <maxim.cournoyer>
Component: yum-utilsAssignee: Seth Vidal <skvidal>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: james.antill, maxamillion, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-01 06:24:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Maxim Cournoyer 2011-09-01 04:04:03 UTC
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. 


Additional info:

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')

Comment 1 Panu Matilainen 2011-09-01 05:08:33 UTC
--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.

Comment 2 Panu Matilainen 2011-09-01 06:24:54 UTC
Consider this your lucky day ;) Implemented now at rpm + yum-utils upstreams:

http://yum.baseurl.org/gitweb?p=yum-utils.git;a=commitdiff;h=76a2bbb7728bfacb364de8eacf88d7a91735820a
http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=f07ab5c1afa9b0b7105082a8617ec6a7657fc27e

Whether these actually ever trickle down to F15 I can't promise, but at least future versions of Fedora will have it.

Comment 3 Maxim Cournoyer 2011-09-01 11:50:24 UTC
Wow, that was quick :)

Amazing news!

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!