Bug 1962181

Summary: emacs-common %preun scriptlet fails, breaking transaction
Product: [Fedora] Fedora Reporter: Zbigniew JÄ™drzejewski-Szmek <zbyszek>
Component: emacsAssignee: Daiki Ueno <dueno>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dan.cermak, dueno, gordon.messmer, james, jkeating, jonathan.underwood, msekleta, phracek, robinlee.sysu, swt
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: emacs-27.2-6.fc35 emacs-27.2-3.fc34 emacs-27.2-3.fc33 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-13 19:02:19 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-05-19 13:09:30 UTC
Description of problem:

------->&-----------------------------------------------------------
$ rpm -q emacs-common
emacs-common-27.2-3.fc35.x86_64
emacs-common-27.2-3.fc35.x86_64
emacs-common-27.2-3.fc35.x86_64
emacs-common-27.2-3.fc35.x86_64

$ sudo package-cleanup --cleandupes
Last metadata expiration check: 0:24:10 ago on Wed 19 May 2021 02:41:30 PM CEST.
Dependencies resolved.
================================================================================================
 Package                 Architecture      Version                     Repository          Size
================================================================================================
Reinstalling:
 emacs-common            x86_64            1:27.2-3.fc35               rawhide             35 M
     replacing  emacs-common.x86_64 1:27.2-3.fc35

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

Total download size: 35 M
Is this ok [y/N]: y
Downloading Packages:
emacs-common-27.2-3.fc35.x86_64.rpm                             4.1 MB/s |  35 MB     00:08    
------------------------------------------------------------------------------------------------
Total                                                           3.8 MB/s |  35 MB     00:09     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                        1/1 
  Reinstalling     : emacs-common-1:27.2-3.fc35.x86_64                                      1/5 
  Running scriptlet: emacs-common-1:27.2-3.fc35.x86_64                                      2/5 
  Cleanup          : emacs-common-1:27.2-3.fc35.x86_64                                      2/5 
  Running scriptlet: emacs-common-1:27.2-3.fc35.x86_64                                      3/5 
error: %preun(emacs-common-1:27.2-3.fc35.x86_64) scriptlet failed, exit status 2

Error in PREUN scriptlet in rpm package emacs-common
  Running scriptlet: emacs-common-1:27.2-3.fc35.x86_64                                      4/5 
error: emacs-common-1:27.2-3.fc35.x86_64: erase failed
error: %preun(emacs-common-1:27.2-3.fc35.x86_64) scriptlet failed, exit status 2

Error in PREUN scriptlet in rpm package emacs-common
  Running scriptlet: emacs-common-1:27.2-3.fc35.x86_64                                      5/5 
error: emacs-common-1:27.2-3.fc35.x86_64: erase failed
error: %preun(emacs-common-1:27.2-3.fc35.x86_64) scriptlet failed, exit status 2

Error in PREUN scriptlet in rpm package emacs-common
error: emacs-common-1:27.2-3.fc35.x86_64: erase failed

TransactionItem not found for key: emacs-common-1:27.2-3.fc35.x86_64
TransactionItem not found for key: emacs-common-1:27.2-3.fc35.x86_64
  Verifying        : emacs-common-1:27.2-3.fc35.x86_64                                      1/3 
  Verifying        : emacs-common-1:27.2-3.fc35.x86_64                                      2/3 
  Verifying        : emacs-common-1:27.2-3.fc35.x86_64                                      3/3 

Reinstalled:
  emacs-common-1:27.2-3.fc35.x86_64                                                             
Failed:
  emacs-common-1:27.2-3.fc35.x86_64                                                             

Error: Transaction failed
-------&<-----------------------------------------------------------

As per the packaging guidelines, scripts should be guarded with "|| :" or similar
to never fail.

I had some previous transaction fail halfway so I ended up with duplicated
packages. (And each attempt to run 'package-cleanup' to report this bug properly
gives me another copy ;)).

Version-Release number of selected component (if applicable):
emacs-common-27.1-2.fc34.x86_64

I think this is caused by the following:
$ sudo /usr/sbin/alternatives --remove emacs.etags /usr/bin/etags.emacs
$ echo $?
2

Comment 1 Fedora Update System 2021-06-13 18:59:45 UTC
FEDORA-2021-5a0fd41d00 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-5a0fd41d00

Comment 2 Fedora Update System 2021-06-13 19:02:19 UTC
FEDORA-2021-5a0fd41d00 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 3 Fedora Update System 2021-06-13 20:24:57 UTC
FEDORA-2021-88812b5c50 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-88812b5c50

Comment 4 Fedora Update System 2021-06-14 02:01:32 UTC
FEDORA-2021-88812b5c50 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-88812b5c50`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-88812b5c50

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-06-14 20:56:15 UTC
FEDORA-2021-dea038ed32 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-dea038ed32

Comment 6 Fedora Update System 2021-06-15 01:08:59 UTC
FEDORA-2021-dea038ed32 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-dea038ed32`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-dea038ed32

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2021-06-20 01:07:28 UTC
FEDORA-2021-dea038ed32 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2021-06-22 01:58:09 UTC
FEDORA-2021-88812b5c50 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.