[Rpm-maint] [rpm-software-management/rpm] Multi-line update-alternatives calls in scriptlets failing with 6.0 beta 1 (Issue #3865)

Adam Williamson notifications at github.com
Fri Jul 18 00:59:39 UTC 2025


AdamWill created an issue (rpm-software-management/rpm#3865)

**Describe the bug**
Since Fedora Rawhide updated to RPM 6.0 beta 1 (package rpm-5.99.91-1.fc43 , in Fedora-Rawhide-20250710.n.0), it seems like multi-line update-alternatives calls in RPM scriptlets aren't working. We've seen this in image builds which include wine-core, like [this one](https://koji.fedoraproject.org/koji/taskinfo?taskID=134721638), and also in a third-party CI system attempting to install the fakeroot package.

**To Reproduce**
Steps to reproduce the behavior:
1. From a Fedora system, run: `mock -r fedora-rawhide-x86_64 --install wine-core`

**Expected behavior**
The package should install without errors.

**Output**
```
>>> Running post-transaction scriptlet: wine-core-0:10.12-2.fc43.x86_64         
>>> Finished post-transaction scriptlet: wine-core-0:10.12-2.fc43.x86_64        
>>> 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_pa
>>>        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_n
>>>        alternatives --remove-follower <name> <path> <follower_name>         
>>>                                                                             
>>> common options: --verbose --test --help --usage --version --keep-missing --k
>>>                 --altdir <directory> --admindir <directory>                 
>>> 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_pa
>>>        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_n
>>>        alternatives --remove-follower <name> <path> <follower_name>         
>>>                                                                             
>>> common options: --verbose --test --help --usage --version --keep-missing --k
>>>                 --altdir <directory> --admindir <directory>                 
>>> 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_pa
>>>        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_n
>>>        alternatives --remove-follower <name> <path> <follower_name>         
>>>                                                                             
>>> common options: --verbose --test --help --usage --version --keep-missing --k
>>>                 --altdir <directory> --admindir <directory>                 
>>> 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_pa
>>>        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_n
>>>        alternatives --remove-follower <name> <path> <follower_name>         
>>>                                                                             
>>> common options: --verbose --test --help --usage --version --keep-missing --k
>>>                 --altdir <directory> --admindir <directory>                 
>>> 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_pa
>>>        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_n
>>>        alternatives --remove-follower <name> <path> <follower_name>         
>>>                                                                             
>>> common options: --verbose --test --help --usage --version --keep-missing --k
>>>                 --altdir <directory> --admindir <directory>                 
>>> 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_pa
>>>        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_n
>>>        alternatives --remove-follower <name> <path> <follower_name>         
>>>                                                                             
>>> common options: --verbose --test --help --usage --version --keep-missing --k
>>>                 --altdir <directory> --admindir <directory>                 
>>>                                                                             
```

**Environment**
 - OS / Distribution: Fedora Rawhide
 - Version: rpm-5.99.91-1.fc43 (6.0 beta 1)

**Additional context**
We note that both wine-core and fakeroot specs break some of their update-alternatives calls across multiple lines using `/` continuation, e.g. from fakeroot:
<pre class="syntaxhighlightblock"><code class="lang-rpm-specfile hljs">
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot \
--
  | "%{_bindir}/fakeroot-tcp" 50 \
  | --slave %{_bindir}/faked faked %{_bindir}/faked-tcp \
  | --slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-tcp.so \

</code></pre>
and from wine:
<pre class="syntaxhighlightblock"><code class="lang-rpm-specfile hljs">
%{_sbindir}/alternatives --install %{_bindir}/wine \
--
  | wine %{_bindir}/wine64 20
  | %{_sbindir}/alternatives --install %{_bindir}/wineserver \
  | wineserver %{_bindir}/wineserver64 20

</code></pre>

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3865
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/3865 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250717/154c80de/attachment-0001.htm>


More information about the Rpm-maint mailing list