Bug 31250

Summary: Uninstall scriptlet for php-cgi fails
Product: Mageia Reporter: Dave Hodgins <davidwhodgins>
Component: RPM PackagesAssignee: Marc Krämer <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal    
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: php-8.2.0-7.mga9 CVE:
Status comment:

Description Dave Hodgins 2022-12-08 19:03:45 CET
removing package php-cgi-3:8.2.0-7.mga9.x86_64
      3/7: removing php-cgi-3:8.2.0-7.mga9.x86_64
                                 #########################################################################################################################################################################################################
alternatives version 1.21 - 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>
warning: %postun(php-cgi-3:8.2.0-7.mga9.x86_64) scriptlet failed, exit status 2
ERROR: 'script' failed for php-cgi-3:8.2.0-7.mga9.x86_64

After reinstalling php-cgi ...
# rpm -q --scripts php-cgi
postinstall scriptlet (using /bin/sh):
alternatives --install /usr/bin/php-cgi php-cgi /usr/bin/php-cgi82 82 \
        --slave /usr/bin/php-fcgi php-fcgi /usr/bin/php-cgi82\
        --slave /usr/share/man/man1/php-cgi.1.xz manphp-cgi /usr/share/man/man1/php-cgi82.1.xz
postuninstall scriptlet (using /bin/sh):
alternatives --remove php-cgi /usr/bin/php-cgi82 82
posttrans scriptlet (using /bin/sh):
alternatives --install /usr/bin/php-cgi php-cgi /usr/bin/php-cgi82 82 \
        --slave /usr/bin/php-fcgi php-fcgi /usr/bin/php-cgi82\
        --slave /usr/share/man/man1/php-cgi.1.xz manphp-cgi /usr/share/man/man1/php-cgi82.1.xz
Comment 1 Marc Krämer 2022-12-08 21:34:06 CET
currently building

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 2 Dave Hodgins 2022-12-08 22:54:20 CET
For people who encounter this bug, it's in the uninstall scriptlet so will
still show up when installing the fixed update over the 8.2.0-7 version.