Bug 2224878 - Too many arguments in %preun when trying to reinstall kernel-core with dnf
Summary: Too many arguments in %preun when trying to reinstall kernel-core with dnf
Keywords:
Status: CLOSED DUPLICATE of bug 2223794
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-23 18:35 UTC by kocelfc
Modified: 2023-07-24 10:15 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-24 10:15:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description kocelfc 2023-07-23 18:35:01 UTC
When I try to reinstall kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64 with "dnf-3 reinstall kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64", dnf complains about there being too many arguments during the %preun stage. The package still manages? somehow to reinstall properly, but if you keep trying to reinstall it, it will just keep on adding the same version over and over again to the "Reinstalled:" section. I can reproduce this on a brand new untouched install in a VM. I am sending just the output from dnf-3, because dnf5 gives no verbose output. I would be happy to add additional output if there is a way to get it.



Reproducible: Always

Steps to Reproduce:
1. Try to reinstall kernel-core with dnf-3
2. dnf-3 complains about the %preun stage

Actual Results:  
kernel-core doesn't reinstall properly because of an issue in the %preun stage

Expected Results:  
kernel-core reinstalls properly

$ sudo dnf-3 reinstall kernel-core -y
Last metadata expiration check: 0:47:41 ago on Sun 23 Jul 2023 08:43:23 PM EEST.
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                             Architecture                                   Version                                                                             Repository                                       Size
==============================================================================================================================================================================================================================================
Reinstalling:
 kernel-core                                         x86_64                                         6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39                                         rawhide                                          16 M

Transaction Summary
==============================================================================================================================================================================================================================================

Total download size: 16 M
Installed size: 65 M
Downloading Packages:
kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64.rpm                                                                                                                                             13 MB/s |  16 MB     00:01    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                          12 MB/s |  16 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                      1/1 
  Reinstalling     : kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64                                                                                                                                                       1/2 
  Running scriptlet: kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64                                                                                                                                                       1/2 
  Running scriptlet: kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64                                                                                                                                                       2/2 
Too many arguments.
error: %preun(kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64) scriptlet failed, exit status 1

Error in PREUN scriptlet in rpm package kernel-core
error: kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64: erase failed
grep: warning: stray \ before /
kdump: For kernel=/boot/vmlinuz-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64, crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M now. Please reboot the system for the change to take effet. Note if you don't want kexec-tools to manage the crashkernel kernel parameter, please set auto_reset_crashkernel=no in /etc/kdump.conf.

  Verifying        : kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64                                                                                                                                                       1/2 
  Verifying        : kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64                                                                                                                                                       2/2 

Reinstalled:
  kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64                                                                                                                                                                              
Failed:
  kernel-core-6.5.0-0.rc2.20230721gitf7e3a1bafdea.20.fc39.x86_64                                                                                                                                                                              

Error: Transaction failed

Comment 1 Yanko Kaneti 2023-07-24 10:15:08 UTC

*** This bug has been marked as a duplicate of bug 2223794 ***


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