Hide Forgot
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:-(((
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