Red Hat Bugzilla – Bug 133778
libgcc predepends on something it provides itself
Last modified: 2007-11-30 17:07:04 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)
Description of problem:
Apt complains with this error:
E: Couldn't configure pre-depend /usr/sbin/libgcc_post_upgrade for
libgcc, probably a dependency cycle.
[dag@horsea dag]$ rpm -qR libgcc
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
[dag@horsea dag]$ rpm -qf /usr/sbin/libgcc_post_upgrade
[dag@horsea dag]$ rpm -q --scripts libgcc
postinstall program: /usr/sbin/libgcc_post_upgrade
This may be in fact an apt bug, still it seems strange to me that a
package depends on a file it provides itself. So I would get rid of
the dependency anyway.
My workaround is to create that file, but this is something that
breaks an upgrade from Red Hat 7.3 to Red Hat EL3.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
That is an apt bug then.
This dependency is not explicitely in gcc (or glibc) spec file,
rpm adds it automatically when it sees a scriptlet.
Yes, apt-rpm bug.
rpm does not distinguish between PreReq: and Requires:,
the two are synonyms, treated exactly the same.
This is rpm behavior since RHL 6.2.
FWIW, Gustavo sez' that the apt-rpm in use here is
deviant from what he uses. You might want to check
what apt-rpm you are using.
Ok, I verified this and contrary to what I believed it indeed was a
very dated: apt-0.5.4cnc9-1.dag.rh73.i386.rpm
Sorry for that and thanks for the prompt replies.
Still I'm wondering if it would make sense to change RPM so it
wouldn't add these requirements if the package itself provides it and
eg. it is required by a %post or %preun script.
It would probably save some diskspace, bandwidth, memory and CPU
cycles if both RPM and apt/yum does not have to handle that. Maybe
something that can quickly be checked what the overhead is.
A quick biased example, the perl package has 194 dependencies, of
which 188 point to its own package !
I reopened this bug and changed severity to 'enhancement' in order to
re-evaluate the changed focus of this bug. In case a new bugreport is
required or you just want me to shut up, please close again :)
(digest from irc discussion)
While it may seem to make no sense from a package POV
that /usr/bin/perl has
Provides: perl <= 3:5.8.5
while the horde of included *.pl modules have myriad
Requires: perl >= 0: 5
and many more, the rationale for not automagically
reducing the package dependencies by checking for
overlapping ranges and choosing the broadest range
is that, in fact, the Provides: and Requires: are attached
to different objects within the package, the Provides:
from /usr/bin/perl (and other elements), while the Requires:
are as specified (and automagically extracted) in various
*.pl scripts within.
The elements are different, and rpm can do no more than
carry the dependencies as specified by the packager.