Bug 163224 - ant's postun script fails due to missing /usr/bin/rebuild-gcj-db
ant's postun script fails due to missing /usr/bin/rebuild-gcj-db
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: ant (Show other bugs)
rawhide
All Linux
medium Severity high
: ---
: ---
Assigned To: Permaine Cheung
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-14 04:10 EDT by Ralf Corsepius
Modified: 2008-03-27 00:44 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-27 00:44:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ralf Corsepius 2005-07-14 04:10:43 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.7.8-2

Description of problem:
The ant rpm lacks appropriate dependencies for it's %post/%postun scripts
This prevents proper deinstallation of the ant-rpm with yum.

It should use.
Require(post): /usr/bin/rebuild-gcj-db
Requires(postun): /usr/bin/rebuild-gcj-db

Version-Release number of selected component (if applicable):
ant-1.6.2-3jpp_8fc

How reproducible:
Always

Steps to Reproduce:
1. yum install ant libgcj
2. yum remove libgcj

  

Actual Results:  
# yum remove libgcj
...
---> Package ant.i386 0:1.6.2-3jpp_8fc set to be erased
...
  Removing  : ant                          ####################### [ 5/10]
/var/tmp/rpm-tmp.38341: line 1: /usr/bin/rebuild-gcj-db: No such file or directory
error: %postun(ant-1.6.2-3jpp_8fc.i386) scriptlet failed, exit status 127
...
# rpm -q ant
ant-1.6.2-3jpp_8fc

Expected Results:  Clean removal of ant


Additional info:

%postun scripts crashing cause yum to enter situations it can't handle and can cause further installation problems:

E.g. after the yum remove ant above:
# yum update
...
No Packages marked for Update/Obsoletion

For comparison: apt-get finds these rpm inconsistencies:

# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get --fix-broken install' to correct these.
The following packages have unmet dependencies:
  ant: Depends: java-devel
       Depends: jpackage-utils (>= 0:1.5) but it is not installed
       Depends: libgcj.so.6
...
Comment 1 Vadim Nasardinov 2005-07-14 13:15:51 EDT
As far as I can see, ant.spec already contains the following
dependency:

 Requires(post,postun): java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_16rh

And the java-1.4.2-gcj-compat package ships /usr/bin/rebuild-gcj-db.

So, the problem here is not that the depedency is left unspecified but
rather that rpm does not seem to be honoring it.

I think the workaround suggested by releng is to split the above into
two separate lines, like so:

 Requires(post):   java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_16rh
 Requires(postun): java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_16rh

Gary, is that correct?
Comment 2 Ralf Corsepius 2005-07-14 22:44:39 EDT
(In reply to comment #1)
> As far as I can see, ant.spec already contains the following
> dependency:
> 
>  Requires(post,postun): java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_16rh
> 
> And the java-1.4.2-gcj-compat package ships /usr/bin/rebuild-gcj-db.
> 
> So, the problem here is not that the depedency is left unspecified but
> rather that rpm does not seem to be honoring it.
> 
> I think the workaround suggested by releng is to split the above into
> two separate lines, like so:
> 
>  Requires(post):   java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_16rh
>  Requires(postun): java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_16rh
You could be right. AFAICT (and according to FE packaging guidelines), rpm still
doesn't honors Requires(post,postun) correctly.

Besides this, using file deps instead of package deps would be more
maintainable, because it would avoid problems should rebuild-gcj-db ever be
moved to a different package.

BTW: Many other java packages in FC4 suffer from the same issue.
Just try "yum install eclipse ; yum remove libgcj" - I see half a dozen of other
packages bombing out with similar warnings.
Comment 3 Gary Benson 2005-07-15 04:34:09 EDT
Unfortunatly file deps don't allow us to specify versions, which are (or will
very soon become) necessary.
Comment 4 Ralf Corsepius 2005-07-17 02:04:37 EDT
Are you trying to say /usr/bin/rebuild-gcj-db's UI (options, args) is going to
be changed?

Sorry, but this would be a severe design bug, and would block any rpm update
path, because you already are using /usr/bin/rebuild-gcj-db in %post/%postun
scripts, therefore *all* future versions of rebuild-gcj-db must be backward
compatible to *all* former versions having ever been shipped with RH/FC.

If you can't avoid changing it, you will have to ship versioned binaries or have
to install rebuild-gcj-db to different directories.
Comment 5 Gary Benson 2005-07-18 04:42:30 EDT
Yes, rebuild-gcj-db's UI is going to be changed.
No, this will not affect existing packages.
Comment 6 Christian Iseli 2007-01-19 19:16:14 EST
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.
Comment 7 petrosyan 2008-03-27 00:44:42 EDT
The information we've requested above is required in order
to review this problem report further and diagnose/fix the
issue if it is still present.  Since there have not been any
updates to the report since thirty (30) days or more since we
requested additional information, we're assuming the problem
is either no longer present in the current Fedora release, or
that there is no longer any interest in tracking the problem.

Setting status to "INSUFFICIENT_DATA".  If you still
experience this problem after updating to our latest Fedora
release and can provide the information previously requested, 
please feel free to reopen the bug report.

Thank you in advance.

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