rpm-build/rpmdb
Alexey Tourbin 7247ecbda7 rpmdb.c: do not exclude Requires(pre) dependencies from rpmdb index
It can be observed that, while packages require their dependencies,
the dependencies in turn are not always required by their packages:

$ rpm -qa --requires |awk '{print$1}' |sort -u |xargs rpm -q --whatrequires >/dev/null
warning: no package requires /bin/chgrp
warning: no package requires /bin/chmod
warning: no package requires /bin/mv
warning: no package requires /etc/rc.d/init.d/postfix
warning: no package requires /sbin/pidof
warning: no package requires /sbin/post_ldconfig
warning: no package requires /usr/bin/alt-docs-genextras
warning: no package requires /usr/bin/gpasswd
warning: no package requires /usr/bin/gtk-query-immodules-2.0
warning: no package requires /usr/bin/mkfontdir
warning: no package requires /usr/sbin/alternatives-update
warning: no package requires /usr/sbin/control-dump
warning: no package requires /usr/sbin/control-restore
warning: no package requires /usr/sbin/gconf_install_schema
warning: no package requires /usr/sbin/groupadd
warning: no package requires /usr/sbin/indexhtml-update
warning: no package requires /usr/sbin/post_service
warning: no package requires /usr/sbin/useradd
warning: no package requires /usr/sbin/usermod
warning: no package requires /usr/share/php/scripts/php_postin.sh
warning: no package requires dvdrwtools-control
warning: no package requires libguile-vhttpd
warning: no package requires php5-suhosin
warning: no package requires rpmlib(CompressedFileNames)
warning: no package requires rpmlib(PartialHardlinkSets)
warning: no package requires rpmlib(PayloadFilesHavePrefix)
warning: no package requires rpmlib(PayloadIsLzma)
warning: no package requires rpmlib(SetVersions)
warning: no package requires rpmlib(VersionedDependencies)
warning: no package requires x11presetdrv
$

This is because rpm removes "install prerequisites" from rpmdb index.
As a consequence, rpm will allow (but apt will not) to remove packages
with "not required" dependencies:

$ rpm -e --test x11presetdrv
$

This is possibly wrong, and it makes dependency optimization hard (e.g.
can't merge duplicate names with different flags).  Also, the code was
buggy: testing isInstallPreReq was not enough as it is not mutually
exclusive with isErasePreReq - e.g. Requries(pre,preun) dependencies
can be used in specfile.
2011-01-22 18:38:22 +03:00
..
.lclintrc re-added .lclintrc and .cvsignore files from CVS 2002-03-25 20:27:37 +00:00
db3.c db3.c (db3close): removed dobule close code (rpm5.org, RH#138589) 2009-04-23 16:48:19 +04:00
dbconfig.c further removed RPMDBI_DEPENDS 2010-07-12 10:02:00 +04:00
fprint.c fprint.h: turned entry.dirName into flexible array 2009-06-13 08:56:04 +04:00
fprint.h fprint.h: turned entry.dirName into flexible array 2009-06-13 08:56:04 +04:00
hdrinline.h relocated hdrinline.h and header.c from lib to rpmdb 2005-10-15 14:12:36 +00:00
hdrNVR.c relocated headerNVR() from lib to rpmdb; added headerNEVRA() to rpmdb 2005-10-15 15:03:18 +00:00
header.c header.c (headerFindI18NString): disable conversion when lang is "C" 2011-01-21 15:41:20 +03:00
jhash.h jhash.h, rpmhash.c: switch to Jenkins One-at-a-time hash 2009-03-26 11:19:01 +03:00
legacy.c removed _noDirTokens (producing legacy filelist format) 2009-06-17 06:32:18 +04:00
Makefile.am Added SELinux support 2010-08-24 16:59:07 +00:00
merge.c updated code to snapshot 2002-04-04 2002-04-05 08:04:32 +00:00
poptDB.c removed _noDirTokens (producing legacy filelist format) 2009-06-17 06:32:18 +04:00
rpmdb.c rpmdb.c: do not exclude Requires(pre) dependencies from rpmdb index 2011-01-22 18:38:22 +03:00
rpmdb.h Remove ancient, unused code to filter duplicates on rpmdb rebuild 2009-10-01 04:38:10 +04:00
rpmhash.c rpmhash.c (hashEqualityString): bare strcmp call 2009-03-26 11:20:50 +03:00
rpmhash.h jhash.h, rpmhash.c: switch to Jenkins One-at-a-time hash 2009-03-26 11:19:01 +03:00
rpmvercmp.c relocated rpmvercmp.c from lib to rpmdb 2005-10-15 14:44:31 +00:00
tagname.c further removed RPMDBI_DEPENDS 2010-07-12 10:02:00 +04:00