Bug 222013

Summary: twisted-dropin-cache scriptlet exits 255 on some package removals
Product: [Fedora] Fedora Reporter: Kevin Fenzi <kevin>
Component: python-twisted-coreAssignee: Thomas Vander Stichele <thomas>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: giallu, matthias, mtasaka, paul, triage
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: bzcl34nup
Fixed In Version: 8.1.0-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-23 21:36:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kevin Fenzi 2007-01-09 16:33:43 UTC
Description of problem:

The /usr/libexec/twisted-dropin-cache script is called in %postun on several of
the python-twisted-* subpackages. 

When removing them with 'rpm -e' and also removing python-twisted-core, 
the scriptlet exits with: 

rpm -e python-twisted-core python-twisted-words
error: %postun(python-twisted-words-0.4.0-3.fc6.i386) scriptlet failed, exit
status 255

Additionally, you may want to consider removing the -p in the %post %preun calls
to twisted-dropin-cache, so they are called with /bin/sh and adding
Requires(pre) and Requires(preun) python-twisted-core. The advantage of that is
that then yum doesn't have to pull down the filelist info to find out what
package has /usr/libexec/twisted-dropin-cache, and would install much quicker. 
ie, currently: 

yum install python-twisted-words
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for python-twisted-words to pack into transaction set.
python-twisted-words-0.4. 100% |=========================|  26 kB    00:00     
---> Package python-twisted-words.i386 0:0.4.0-3.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: /usr/libexec/twisted-dropin-cache for package:
python-twisted-words
Importing additional filelist information
filelists.xml.gz          100% |=========================| 2.1 MB    00:22     
################################################## 1023/1023
filelists.xml.gz          100% |=========================| 4.4 MB    00:45     
################################################## 5428/5428
--> Processing Dependency: python-twisted-core for package: python-twisted-words
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for python-twisted-core to pack into transaction set.
python-twisted-core-2.4.0 100% |=========================| 129 kB    00:01     

I don't know if Requires(pre) and Requires(post) adding would also fix the
scriptlet issues above.

Comment 1 Mamoru TASAKA 2007-01-16 10:55:04 UTC
See my comment on bug 221310.

For me this happens on FC-6, but not on FC-devel.
It seems for me to be the bug on "rpm".

(In reply to comment #0)
> I don't know if Requires(pre) and Requires(post) adding would also fix the
> scriptlet issues above.

I tried with explicitly write to -words package like:
-------------------------------------
Requires(post): python-twisted-core
Requires(postun):       python-twisted-core
-------------------------------------
However the misordering wasn't fixed...

Comment 2 Kevin Fenzi 2007-01-16 21:51:37 UTC
Yeah, I can confirm that this happens on fc6, and not on devel. ;( 

Perhaps as a workaround for fc6, you could change the post/postun to something 
like: 

%post
%{_libexecdir}/twisted-dropin-cache || :

%postun
%{_libexecdir}/twisted-dropin-cache || :

That seems to work around the problem here... 

Comment 3 Gianluca Sforna 2007-10-04 13:08:07 UTC
Just happened to me as well...

Since the clock for FC-6 EOL is ticking, are you going to fix this?

Comment 4 Bug Zapper 2008-04-04 05:32:46 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 5 Kevin Fenzi 2008-04-04 22:23:13 UTC
I just tried this on current rawhide, and its still happening... 

# rpm -e python-twisted-words python-twisted-core
error: %postun(python-twisted-words-0.5.0-3.fc9.x86_64) scriptlet failed, exit
status 255

Thomas? Can we please fix this?

Comment 6 Paul Howarth 2008-04-10 09:23:08 UTC
Kevin provided the requested information in Comment #5; the problem still exists
in current rawhide.

Comment 7 Bug Zapper 2008-05-14 02:32:29 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Matthias Saou 2008-12-23 21:36:59 UTC
I've seen the same problems as what has been detailed here earlier, namely that even with the correct "Requires(foo):" lines, the core package still gets removed before the plugin packages, which causes errors.

So in the 8.1.0 packages I've just pushed to rawhide, I've replaced the existing scriplets in the plugin packages with the following, which should fix the problem :

%post
if [ -x %{_libexecdir}/twisted-dropin-cache ]; then
    %{_libexecdir}/twisted-dropin-cache || :
fi

%postun
if [ -x %{_libexecdir}/twisted-dropin-cache ]; then
    %{_libexecdir}/twisted-dropin-cache || :
fi

It's kind of hack-ish, but should do the trick. Note that I've also updated the core package, which now removes the "dropin.cache" file upon removal.