Bug 1004853
Summary: | yum-cron 0yum-daily.cron emits strange message when there are dependency errors | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Orion Poplawski <orion> |
Component: | yum | Assignee: | Michal Domonkos <mdomonko> |
Status: | CLOSED ERRATA | QA Contact: | Eva Mrakova <emrakova> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 | CC: | admiller, ali+rhbugzilla, andreasfleig, anton, bertrand.lods, bugzillaredhat.jim-j, d.bz-redhat, emrakova, felix.kaiser, ffesti, firas.alkafri, gergnz, Gillingham, james.antill, jzeleny, mail, mdomonko, me, milan.kerslager, mwasilewski, paer.berge, p.malishev, redhatbug.kofl, tim.lauridsen, urusha.v1.0, uwe.wisniewski, vmukhame, vpakolu, yuri |
Target Milestone: | rc | ||
Target Release: | 7.3 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | yum-3.4.3-138.el7 | Doc Type: | If docs needed, set a value |
Doc Text: |
no docs required
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-04 05:27:25 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Orion Poplawski
2013-09-05 15:35:16 UTC
Still present with yum-3.4.3-155.fc22.noarch I get the same message: Failed to check for updates with the following error message: Failed to build transaction: Success - empty transaction without having any dependency problems. $ rpm -q yum yum-3.4.3-118.el7.centos.noarch $ rpm -q yum-cron yum-cron-3.4.3-118.el7.centos.noarch This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22 This bug is also present in CentOS 7 (and therefore RHEL?). Here's a fix: diff --git a/yum-cron/yum-cron.py b/yum-cron/yum-cron.py index 20911af..66f9c19 100755 --- a/yum-cron/yum-cron.py +++ b/yum-cron/yum-cron.py @@ -504,7 +504,13 @@ class YumCronBase(yum.YumBase, YumOutput): except yum.Errors.RepoError, e: self.emitCheckFailed("%s" %(e,)) sys.exit() - if res != 2: + if res == 0: + # success, empty transaction + sys.exit(0) + elif res == 2: + # success, dependencies resolved + pass + else: self.emitCheckFailed("Failed to build transaction: %s" %(str.join("\n", resmsg),)) sys.exit(1) That "except:" clause in the very first line of your patches context is broken too. exit() should be exit(1). Can you please add Product: RHEL 7? I have the same issue on CentOS 7. The fix from #4 and #5 worked for me, but there is no /yum-cron/yum-cron.py I changed the lines in /usr/sbin/yum-cron The same here, I'm running CentOS 7, build 1503 Name : yum-cron Arch : noarch Version : 3.4.3 Release : 125.el7.centos The fix above solved it. Same issue here. Fix solved it. Name : yum-cron Version : 3.4.3 Release : 125.el7.centos CentOS Linux release 7.1.1503 (Core) The issue is still there in RHEL7 and CentOS7 The issue is still there in RHEL7 and CentOS7 RHEL7: yum-cron-3.4.3-132.el7.noarch CentOS7: yum-cron-3.4.3-132.el7.centos.0.1.noarch Yep, still there: yum-cron-3.4.3-132.el7.centos.0.1.noarch Pull request submitted: https://github.com/rpm-software-management/yum/pull/9 Andreas, the patch you provided looks good so I've applied it, thanks! Felix, thanks for pointing out the missing exit code, I've included it in the pull request as well. Hi I try the purpose patch, but doing so, I get no more yum update message alert : In /usr/sbin/yum-cron, i did this : if res == 0: # success, empty transaction sys.exit(0) elif res == 2: # success, dependencies resolved pass else: I work on four Centos7 server, and I only have this e-mail message on one : /etc/cron.daily/0yum-daily.cron: Failed to check for updates with the following error message: Failed to build transaction: Succès - transaction vide I compare yum-cron, but file are same Manual yum update work fine. Yum package on this server : rpm -qa | grep yum yum-cron-3.4.3-132.el7.centos.0.1.noarch yum-plugin-fastestmirror-1.1.31-34.el7.noarch yum-plugin-protectbase-1.1.31-34.el7.noarch yum-utils-1.1.31-34.el7.noarch yum-3.4.3-132.el7.centos.0.1.noarch yum-plugin-priorities-1.1.31-34.el7.noarch yum-metadata-parser-1.1.4-10.el7.x86_64 CentOs version on this server : rpm -qa | grep release centos-release-7-2.1511.el7.centos.2.10.x86_64 Kernel version on this server : uname -r 3.10.0-327.22.2.el7.x86_64 cordialy Hi, (In reply to narutobaka from comment #23) > Hi > > I try the purpose patch, but doing so, I get no more yum update message > alert : Do you get no alerts even when there _are_ actual updates available to install? If you get no alerts when there are no updates, that's what this patch is supposed to do :) Maybe seeing what your /etc/yum/yum-cron.conf file looks like would help. Could you attach it? > I work on four Centos7 server, and I only have this e-mail message on one : > > /etc/cron.daily/0yum-daily.cron: > > Failed to check for updates with the following error message: > Failed to build transaction: Succès - transaction vide That's weird and shouldn't happen with the patch applied. There is actually no code path that would lead to this exact error message, other than the one which we're fixing with the patch. Are you sure the email was sent at the time when you already had applied the patch? Hi, works fine if "update_cmd = default" is set in /etc/yum/yum-cron.conf. Fails if "update_cmd = security" is set. Hope that helps to fix it. # cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) # uname -r 3.10.0-327.28.2.el7.x86_64 # rpm -qa yum-cron yum-cron-3.4.3-132.el7.centos.0.1.noarch (In reply to velifera from comment #26) > Hi, > > works fine if "update_cmd = default" is set in /etc/yum/yum-cron.conf. > Fails if "update_cmd = security" is set. Hope that helps to fix it. Hey, Yes, that's right. We have already fixed this and the commit has been merged upstream: https://github.com/rpm-software-management/yum/commit/ae22bcdbacc01b12175304e14df59bdda45aa108 Thank you for your input, though! When will it be fixed/pushed to el7 updates? It's been 1.5 years. It's in 7.3beta, so presumably in a couple months when it is released. 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. https://rhn.redhat.com/errata/RHBA-2016-2397.html |