Fedora Account System
Red Hat Associate
Red Hat Customer
On a rawhide machine with tha latest bash version and java-21-openjdk-headless, installation of maven package fails. Reproducible: Always Steps to Reproduce: 1. dnf update -y bash 2. dnf install -y java-21-openjdk-headless 3. dnf install -y maven Actual Results: >>> Running %post scriptlet: maven-1:3.9.11-1.fc43.noarch >>> Non-critical error in %post scriptlet: maven-1:3.9.11-1.fc43.noarch >>> Scriptlet output: >>> alternatives version 1.33 - Copyright (C) 2001 Red Hat, Inc. >>> This may be freely redistributed under the terms of the GNU Public License. >>> >>> usage: alternatives --install <link> <name> <path> <priority> >>> [--initscript <service>] >>> [--family <family>] >>> [--follower <follower_link> <follower_name> <follower_path>]* >>> alternatives --remove <name> <path> >>> alternatives --auto <name> >>> alternatives --config <name> >>> alternatives --display <name> >>> alternatives --set <name> <path/family> >>> alternatives --list >>> alternatives --remove-all <name> >>> alternatives --add-follower <name> <path> <follower_link> <follower_name> <follower_path> >>> alternatives --remove-follower <name> <path> <follower_name> >>> >>> common options: --verbose --test --help --usage --version --keep-missing --keep-foreign >>> --altdir <directory> --admindir <directory> >>> >>> [RPM] %post(maven-1:3.9.11-1.fc43.noarch) scriptlet failed, exit status 2 Expected Results: The installation should succeed. Additional Information: If the system has bash-5.2.37-3.fc43.x86_64, the issue doesn't happen. The issue is visible only with bash-5.3.0-1.fc43.x86_64. The problem was also discussed in https://github.com/rpm-software-management/rpm/issues/3865 and it seems that using a single command for update-alternatives may fix the problem. The %post scriptlet for maven is currently using a multiline command: https://src.fedoraproject.org/rpms/maven/blob/rawhide/f/maven.spec#_224-229 %post update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alternatives_priority}0 \ --slave %{_bindir}/mvnDebug mvnDebug %{homedir}/bin/mvnDebug \ --slave %{_mandir}/man1/mvn.1.gz mvn1 %{homedir}/bin/mvn.1.gz \ --slave %{_mandir}/man1/mvnDebug.1.gz mvnDebug1 %{homedir}/bin/mvn.1.gz \
*** This bug has been marked as a duplicate of bug 2382210 ***