Bug 240617
| Summary: | yum groupinstall not failing when package in group fails | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Guil Barros <gbarros> | ||||||
| Component: | yum | Assignee: | James Antill <james.antill> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | |||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 5.0 | CC: | jhutar, pmatilai, tao | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2009-01-20 21:44:04 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: | |||||||||
| Attachments: |
|
||||||||
|
Description
Guil Barros
2007-05-18 20:33:52 UTC
reassigning to rpm as we need some way of knowing what happened in the transaction scriptlets for yum to respond appropriately. All errors in rpm go through rpmError() which has a python method to use a buffer, not
stderr, for saving errors. That includes the msg above (from lib/psm.c):
rpmError(RPMERR_SCRIPT,
_("%s(%s-%s-%s.%s) scriptlet failed, exit status %d\n"),
sln, n, v, r, a, WEXITSTATUS(psm->sq.status));
The "way of knowing" has been in rpm since the year 2000 (at least).
I'm not at all sure how yum is going to respond appropriately. A non-existent file
is a packaging, not a tool, error.
The point of this issue is that ANY pkg that fails in a yum group should report a different exit code than zero. This was a test where we forced one of the rpms in a yum group to fail (on purpose) with an exit code of non-zero. The yum groupinstall still reports an exit code of zero when I feel it should report otherwise. It even shows that it was installed when yet it was not completely installed with success. I'd suggest moving the discussion back to yum then. I just responded to comment #1, have no other context. rpm certainly has no concept of "yum groups". This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. Moving back to yum per Jeff's suggestion. Created attachment 306827 [details]
Simple pacakge with no content that has a bad %pre script
Created attachment 306828 [details]
Simple pacakge with no content that will install cleanly
Attached is my simple test case for this problem: <snip> [root@ibm-x3650-1 SPECS]# yum localinstall /usr/src/redhat/RPMS/noarch/test-prebroke-1.0-1.noarch.rpm /usr/src/redhat/RPMS/noarch/test-works-1.0-1.noarch.rpm --nogpgcheck Loading "rhnplugin" plugin Loading "filter-data" plugin Loading "security" plugin Setting up Local Package Process rhel-x86_64-server-5 100% |=========================| 1.4 kB 00:00 rhn-tools-rhel-x86_64-ser 100% |=========================| 1.2 kB 00:00 rhel-x86_64-server-5-beta 100% |=========================| 1.2 kB 00:00 rhel-x86_64-server-vt-5 100% |=========================| 1.4 kB 00:00 rhel-x86_64-server-supple 100% |=========================| 1.2 kB 00:00 Examining /usr/src/redhat/RPMS/noarch/test-prebroke-1.0-1.noarch.rpm: test-prebroke - 1.0-1.noarch Examining /usr/src/redhat/RPMS/noarch/test-works-1.0-1.noarch.rpm: test-works - 1.0-1.noarch Marking /usr/src/redhat/RPMS/noarch/test-prebroke-1.0-1.noarch.rpm to be installed Marking /usr/src/redhat/RPMS/noarch/test-works-1.0-1.noarch.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package test-works.noarch 0:1.0-1 set to be updated ---> Package test-prebroke.noarch 0:1.0-1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: test-prebroke noarch 1.0-1 /usr/src/redhat/RPMS/noarch/test-prebroke-1.0-1.noarch.rpm 0.0 test-works noarch 1.0-1 /usr/src/redhat/RPMS/noarch/test-works-1.0-1.noarch.rpm 0.0 Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 0 Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction /var/tmp/rpm-tmp.95840: line 1: cd: /foo/bar/baz: No such file or directory error: %pre(test-prebroke-1.0-1.noarch) scriptlet failed, exit status 1 error: install: %pre scriptlet failed (2), skipping test-prebroke-1.0-1 Installing: test-works ######################### [2/2] Installed: test-prebroke.noarch 0:1.0-1 test-works.noarch 0:1.0-1 Complete! [root@ibm-x3650-1 SPECS]# rpm -qa | grep test\- test-works-1.0-1 [root@ibm-x3650-1 SPECS]# </snip> I'd omitted the last line where we check the exit code: <snip> [root@ibm-x3650-1 SPECS]# echo $? 0 </snip> This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0176.html |