| 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-utils | Assignee: | James Antill <james.antill> |
| Status: | CLOSED ERRATA | QA Contact: | Karel Srot <ksrot> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.1 | CC: | ksrot, mebrown, nphilipp, rdieter, williams, zpavlas |
| Target Milestone: | rc | Keywords: | 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: | |
| Bug Depends On: | |||
| Bug Blocks: | 743047 | ||
|
Description
Levente Farkas
2011-05-30 13:14:41 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... 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'] = {
how this related to my original report? anyway may be this bug should have to reassign to yum? 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' 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. 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. this problem is still exist and imho another serious one. *** This bug has been marked as a duplicate of bug 716267 *** reopen it. since even it a duplicate of #716267 that is a fedora bug and can't be fix/build rhel-6 packages. This is a simple patch, and is in Fedora 15. 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 |