Bug 1929842 - rpm scriptlet failure in maven %postun
Summary: rpm scriptlet failure in maven %postun
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: maven
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-17 18:50 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2021-05-25 17:43 UTC (History)
5 users (show)

Fixed In Version: maven-3.6.3-9.fc35
Clone Of:
Environment:
Last Closed: 2021-05-25 16:01:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2021-02-17 18:50:18 UTC
Description of problem:
During upgrade F33→F34:

  Running scriptlet: maven-1:3.6.3-5.fc33.noarch                                                                             5959/11769 
warning: %postun(maven-1:3.6.3-5.fc33.noarch) scriptlet failed, exit status 1                                                           
                                                                                                                                        
Error in POSTUN scriptlet in rpm package maven                                                                     


Version-Release number of selected component (if applicable):
maven-3.6.3-8.fc34.noarch (after upgrade)
maven-1:3.6.3-5.fc33.noarch (before upgrade)

Expected results:
Quiet upgrade.

Comment 1 Fabio Valentini 2021-02-17 20:10:43 UTC
I am unsure how this is failing:
[[ $1 -eq 0 ]] && update-alternatives --remove mvn %{homedir}/bin/mvn

Unless you had maven installed from before this commit:
https://src.fedoraproject.org/rpms/maven/c/d44e09e7c816ecd188a06f9200ec48d68f19c53b?branch=rawhide

Comment 2 Fedora Admin user for bugzilla script actions 2021-04-28 00:22:00 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 3 Mikolaj Izdebski 2021-04-28 10:41:32 UTC
(In reply to Fabio Valentini from comment #1)
> I am unsure how this is failing:
> [[ $1 -eq 0 ]] && update-alternatives --remove mvn %{homedir}/bin/mvn

During upgrade $1 expands to 1, so the left side of && is false and the whole command fails.

$ [[ 1 -eq 0 ]] && true
$ echo $?
1

Comment 4 Mikolaj Izdebski 2021-04-28 10:54:34 UTC
Proposed fix: https://src.fedoraproject.org/fork/mbi/rpms/maven/c/f5aee6a

Comment 6 Fedora Update System 2021-05-25 15:55:58 UTC
FEDORA-2021-bcbca49b6d has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-bcbca49b6d

Comment 7 Fedora Update System 2021-05-25 16:01:28 UTC
FEDORA-2021-bcbca49b6d has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


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