Bug 1929842

Summary: rpm scriptlet failure in maven %postun
Product: [Fedora] Fedora Reporter: Zbigniew Jędrzejewski-Szmek <zbyszek>
Component: mavenAssignee: Mikolaj Izdebski <mizdebsk>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: java-maint-sig, java-sig-commits, mizdebsk, msrb, sochotni
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: maven-3.6.3-9.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-25 16:01:28 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 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.