Bug 1252389 - dnf doesn't catch %postun scriptlet error when reinstalling a package
Summary: dnf doesn't catch %postun scriptlet error when reinstalling a package
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-11 10:08 UTC by Heldwin
Modified: 2016-07-19 17:28 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 17:28:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Heldwin 2015-08-11 10:08:33 UTC
Description of problem:
I had to reinstall a package: java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64, that gives a %postun scriptlet error, but dnf didn't return an error.

Version-Release number of selected component (if applicable):
dnf-1.0.2-3.fc22.noarch


How reproducible:
always with this package


Steps to Reproduce:

1. install java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64 (needs maybe needs also the normal openjdk too)
2. which java, or alternatives --display java -> returns a java
3. dnf reinstall java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64
4. which java or alternatives --display java -> returns nothing


Actual results:
No scriptlet error are shown in either dnf or dnf history

Expected results:
An indication telling that a reinstall didn't succeed would help

Additional info:
Not sure yet if it does it too for dnf update/remove

Comment 1 Honza Silhan 2015-08-11 14:45:47 UTC
Can you post the DNF output? Isn't it bug 1207981? If so mark it as duplicate, please.

Comment 2 Heldwin 2015-08-11 15:33:50 UTC
I have now:
* dnf-1.1.0-1.fc22.noarch
* dnf-plugins-core-0.1.10-1.fc22.noarch
* hawkey-0.6.0-1.fc22.x86_64
* libsolv-0.6.11-2.fc22.x86_64

I am not sure it is the same bug, he seems to get an error, but if dnf tells it was complete ? 

I also reported it against java-1.8.0-openjdk-headless:
https://bugzilla.redhat.com/show_bug.cgi?id=1252406

that was a duplicate of:
https://bugzilla.redhat.com/show_bug.cgi?id=1200302

to try to get that scriptlet error fixed in dnf or openjdk-headless, but
I opened it against dnf too, because the rpm command returns an error that dnf doesn't. dnf just reports all was fine, but it was not.

Transaction test succeeded.
Running transaction
  Reinstalling: java-1.8.0-openjdk-headless 1:1.8.0.51-4.b16.fc22.x86_64  1/2 
  Erasing     : java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64  2/2 
  Verifying   : java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64  1/2 
  Verifying   : java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64  2/2

Reinstalled:
  java-1.8.0-openjdk-headless.x86_64 1:1.8.0.51-4.b16.fc22 

You should restart:
  Nothing needs to be restarted
Completion plugin: Generating completion cache...
Complete!

-------------------
But if I run:
rpm -e --nodeps java-1.8.0-openjdk-headless 1:1.8.0.51-4.b16.fc22.x86_64
[...]
warning: %postun(java-1.8.0-openjdk-headless-1:1.8.0.51-4.b16.fc22.x86_64) scriptlet failed, exit status 2
[...]

but I can see nowhere this warning in dnf

If you still think it is a duplicate, I will close this one.

Comment 3 Fedora Admin XMLRPC Client 2016-07-08 09:30:05 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora End Of Life 2016-07-19 17:28:23 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.