Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 709043

Summary: yum-builddep doesn't check the return code from doUtilBuildTransaction ... mock failures
Product: Red Hat Enterprise Linux 6 Reporter: Levente Farkas <lfarkas>
Component: yum-utilsAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1CC: ksrot, mebrown, nphilipp, rdieter, williams, zpavlas
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 17:35:18 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:
Bug Depends On:    
Bug Blocks: 743047    

Description Levente Farkas 2011-05-30 13:14:41 UTC
in the last few days i build a lots of packages and it seems mock getting worse. now even if the root stage failed it goes further to the build stage eg:
---------------------------------------------
DEBUG backend.py:739:  ['/usr/bin/yum-builddep', '--installroot', '/var/lib/mock/abc-6-x86_64/root/', '/var/lib/mock/abc-6-x86_64/root///builddir/build/SRPMS/mingw32-w32api-3.17-1.el6.src.rpm']
DEBUG util.py:284:  Executing command: ['/usr/bin/yum-builddep', '--installroot', '/var/lib/mock/abc-6-x86_64/root/', '/var/lib/mock/abc-6-x86_64/root///builddir/build/SRPMS/mingw32-w32api-3.17-1.el6
.src.rpm']
DEBUG util.py:250:  Getting requirements for mingw32-w32api-3.17-1.el6.src
DEBUG util.py:250:   --> mingw32-filesystem-69-2.el6.noarch
DEBUG util.py:250:   --> mingw32-binutils-2.21-2.el6.x86_64
DEBUG util.py:250:   --> mingw32-gcc-4.4.2-3.el6.1.x86_64
DEBUG util.py:250:   --> mingw32-runtime-3.18-1.el6.1.noarch
DEBUG util.py:250:  Error: Package: mingw32-pthreads-2.8.0-15.20110511cvs.fc16.noarch (mingw)
DEBUG util.py:250:             Requires: mingw32(libstdc++-6.dll)
DEBUG util.py:250:   You could try using --skip-broken to work around the problem
DEBUG util.py:250:   You could try running: rpm -Va --nofiles --nodigest
DEBUG util.py:250:  No uninstalled build requires
DEBUG util.py:323:  Child returncode was: 0
---------------------------------------------
as you can see it states Child returncode was: 0
and of course in this case build will fail since many BR missing!

the same thing happened with me a lots of packages and it cause a lots of headache for me:-(((

Comment 1 Levente Farkas 2011-06-01 06:49:20 UTC
what's more it's more serious since sometimes the whole build process runs without installing the BRs which create a totally broken results...

Comment 2 Giam Teck Choon 2011-06-07 12:15:16 UTC
I hit different error and created a patch to mock-1.1.10 which add an option to pass options to yum-builddep in mock via mock cfg file.  Can anyone review the attached patch which I used to build packages in mock-1.1.10 with this attached patched applied without problem?

--------------------8<----------------8<--------------------8<------------

From: Giam Teck Choon <choon>

This patch add support for passing options to yum-buildep via mock cfg
config_opts['yum_builddep_opts'] option. i.e.:

config_opts['yum_builddep_opts'] = '--nogpgcheck'

Without this patch, mock -r whatever-mock.cfg --installdeps
/path/to/whatever.src.rpm will result in the following error:

ERROR: Command failed: 
# /usr/bin/yum-builddep --installroot /var/lib/mock/config_opts['root']/root/ /path/to/whatever.src.rpm
warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID e0da8890: NOKEY
Error: Could not open /path/to/whatever.src.rpm .
Try running yum-builddep with the --nogpgcheck option.
There was a problem getting the build deps, exiting:
  Could not open local rpm file: /path/to/whatever.src.rpm: RPM Error opening Package


diff -urN a/py/mock/backend.py b/py/mock/backend.py
--- a/py/mock/backend.py	2011-06-03 01:35:26.000000000 +0800
+++ b/py/mock/backend.py	2011-06-03 03:12:05.000000000 +0800
@@ -75,6 +75,7 @@
             self.chroot_setup_cmd = self.chroot_setup_cmd.split()
         self.yum_path = '/usr/bin/yum'
         self.yum_builddep_path = '/usr/bin/yum-builddep'
+        self.yum_builddep_opts = config['yum_builddep_opts']
         self.macros = config['macros']
         self.more_buildreqs = config['more_buildreqs']
         self.cache_topdir = config['cache_topdir']
@@ -732,6 +733,9 @@
         if cmd[0] == "builddep":
             yumcmd[0] = self.yum_builddep_path
             cmdix = 1
+       	    if self.yum_builddep_opts:
+                for eachopt in self.yum_builddep_opts.split():
+                    yumcmd.insert(1, '%s' % eachopt)
         yumcmd.extend(('--installroot', self.makeChrootPath()))
         if not self.online:
             yumcmd.append("-C")
diff -urN a/py/mock.py b/py/mock.py
--- a/py/mock.py	2011-06-03 01:35:26.000000000 +0800
+++ b/py/mock.py	2011-06-03 03:10:01.000000000 +0800
@@ -328,6 +328,7 @@
     config_opts['target_arch'] = 'i386'
     config_opts['rpmbuild_arch'] = None # <-- None means set automatically from target_arch
     config_opts['yum.conf'] = ''
+    config_opts['yum_builddep_opts'] = ''
     config_opts['more_buildreqs'] = {}
     config_opts['files'] = {}
     config_opts['macros'] = {

Comment 3 Levente Farkas 2011-06-07 12:28:34 UTC
how this related to my original report?
anyway may be this bug should have to reassign to yum?

Comment 4 Giam Teck Choon 2011-06-07 12:40:52 UTC
Ops... sorry.  I should have create a new bug report.  I mean this patch add option for you to pass to yum-builddep in mock.  Like if you want --skip-broken then you can use the following in mock cfg:

config_opts['yum_builddep_opts'] = '--skip-broken'

Comment 5 Levente Farkas 2011-06-07 12:50:53 UTC
no i wouldn't like t add --skip-broken i like that mock stop in case it's not able to install all deps.
but now it seems yum-builddep return with 0 even if it's not able to install all deps. which case mock goes further.

Comment 6 Giam Teck Choon 2011-06-07 13:24:51 UTC
Normally when you get your initial reported error about --skip-broken when using yum or yum-builddep, mostly I guess the repos. has some issues during the time you run yum or yum-builddeps... ... sorry for these additional posts... I will create a new bug report and leave this.  Once again, sorry.

Comment 7 Levente Farkas 2011-06-22 19:29:30 UTC
this problem is still exist and imho another serious one.

Comment 8 Clark Williams 2011-06-24 14:09:28 UTC

*** This bug has been marked as a duplicate of bug 716267 ***

Comment 9 Levente Farkas 2011-08-10 21:48:45 UTC
reopen it. since even it a duplicate of #716267 that is a fedora bug and can't be fix/build rhel-6 packages.

Comment 11 James Antill 2011-08-17 14:41:06 UTC
 This is a simple patch, and is in Fedora 15.

Comment 15 errata-xmlrpc 2011-12-06 17:35:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1703.html