Bug 303791

Summary: Mock fails to check correctly for missing buildrequires
Product: [Fedora] Fedora Reporter: Phil Knirsch <pknirsch>
Component: mockAssignee: David Cantrell <dcantrell>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: jos, mebrown, rvokal, williams
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.8.4-2.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-29 15:05:38 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 235704    

Description Phil Knirsch 2007-09-24 14:42:33 EDT
Description of problem:

When trying to rebuild a package which contains several buildrequires one of
which can't be found mock doesn't correctly check whether one of the packages
can't be found. This results in that buildrequires and it's dependancies will
not be installed and as mock later on uses --nodeps for rpmbuild the build
happily starts and then either fails during the build or happily builds a
package without that specific feature.

The root cause is that yum changed it's output for resolvedep from

'No Package Found for'

to

'No Package found for'

so missing packages are never detected.

Version-Release number of selected component (if applicable):

mock-0.7.6-1


How reproducible: Always


Steps to Reproduce:
1. Try to rebuild openhpi on s390x or ppc.
2. Watch it happily install the buildroot and start the build.
3. Watch it either break during the build or build without that feature.
  
Actual results:

Package seems to properly build.

Expected results:

Buildroot installation should fail due to not found buildrequires.

Additional info:

The specific case i describe here was tested on RHEL-5 and not on Fedora, but i
verified that the same problem currently happens at least on Fedora Devel and in
the koji buildsystem itself.

There are several possible ways to fix it obviously:

1) Don't use --nodeps for rpmbuild later during the build
2) Fix the parsing in install_build_deps() in mock to reflect the new strings
3) Maybe even extend yum to provide an API for such cases instead of the current
need to parse output.

Of those 3 i'd say 1) is the easiest and savest way to fix this issue. It will
introduce an additional depsolving of rpm when the build is started, but in
general that time should be neglectable compared to the whole build time of a
package. Solution 2) will break again the next time the output is changes, so
not a very viable long term solution. The real proper fix would be solution 3)
as that way it could be quickly and easily be verified and only verified once
instead of twice with solution 1).

Read ya, Phil
Comment 1 Michael E Brown 2007-10-22 15:12:54 EDT
fixed in 0.8.0+
Comment 2 Fedora Update System 2007-10-24 03:06:12 EDT
mock-0.8.4-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'
Comment 3 Fedora Update System 2007-10-29 15:05:26 EDT
mock-0.8.4-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Fedora Update System 2007-11-06 11:11:57 EST
mock-0.8.4-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'
Comment 5 Fedora Update System 2007-11-08 01:01:35 EST
mock-0.8.4-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.