Commit Graph

29 Commits

Author SHA1 Message Date
Ivan Zakharyaschev
e805931cf3 remark: we don't print the disttag 2019-02-26 23:19:51 +03:00
e048944ef8 Use xasprintf 2019-01-10 23:20:03 +00:00
4efd5e5f44 Fix some harmless compilation warnings 2014-02-15 22:44:35 +00:00
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
Alexey Tourbin
42b139d1eb removed --fileid query selector and Filemd5s rpmdb index (rpm.org) 2011-01-22 17:35:13 +03:00
Mikhail Efremov
f92be4b40e Added SELinux support
Mostly backported from rpm-4.8
2010-08-24 16:59:07 +00:00
Alexey Tourbin
de60ab01a3 header.c: backported headerSetInstance() and headerGetInstance() from rpm.org
Header instance is its number in /var/lib/rpm/Packages database.
When a header comes from the database, it is sometimes useful to know
its instance (I need this to adjust verify.c:verifyDependencies() for
self-conflicting packages).  On the contrary, setting instance numbers
should happen only within librpmdb, which is why headerSetInstance()
comes with hidden visibility.
2010-08-22 02:16:02 +04:00
Alexey Tourbin
994c5675a8 further removed RPMDBI_DEPENDS 2010-07-12 10:02:00 +04:00
Alexey Tourbin
63da9b7043 rpmdb.c: make rpmdb index list hard-wired, remove unused require- and provideversion indexes
based rpm.org changes by Panu Matilainen:
fb2a6cb Make rpmdb index list hard-wired
e23a2bf Remove unused require- and provideversion indexes
2a52cc8 Remove unused _DBI defines
2010-04-21 11:52:25 +04:00
Panu Matilainen
afe7a56661 Remove ancient, unused code to filter duplicates on rpmdb rebuild
- enabling this as-is would be murderous to multilib systems
- getting duplicates in the db would be a bug elsewhere
2009-10-01 04:38:10 +04:00
Alexey Tourbin
23317f11b7 removed _noDirTokens (producing legacy filelist format)
Some code (e.g. apt/genpkglist) explicitly relies on the fact that
header file list is represented with baseNames+dirNames+dirIndexes
arrays.  Thus, generating legacy headers might have issues, and should
be disabled.
2009-06-17 06:32:18 +04:00
Alexey Tourbin
37bfe52994 rpmdb: include <db.h> and link with -ldb without configure check for now 2009-04-23 14:46:46 +04:00
Alexey Tourbin
2ec0a7bf9f rpmdb.c (rpmdbNextIterator): removed db1-related part 2009-04-23 13:57:36 +04:00
Alexey Tourbin
4657ef7c57 rpmdb.c (openDatabase): removed db1-related part 2009-04-23 13:57:15 +04:00
Alexey Tourbin
af4053bfa0 rpmdb: removed db1 support 2009-04-23 13:49:52 +04:00
Alexey Tourbin
6a2cc38410 fprint.c: fpCacheFree returns NULL 2009-03-26 11:20:07 +03:00
Alexey Tourbin
dba96abac5 deal with fpCacheCreate() size parameter 2009-03-26 11:19:53 +03:00
Alexey Tourbin
02104ae61f Use only one, global fingerPrintCache to save a lot of stat calls
[Based on rpm.org af80c3de by Florian Festi.]
2009-03-26 11:19:43 +03:00
6a14cbc258 fixed rpmExpand usage 2005-09-29 17:10:24 +00:00
4086557633 fixed rpmExpand usage 2005-09-29 16:01:17 +00:00
ce8ad9b9f0 fix rpmExpandNumeric handling 2005-09-29 15:46:13 +00:00
95d3140850 rpmdbRebuild: enhanced rebuilding database messages 2004-02-29 20:19:38 +00:00
6886f95249 updated code to snapshot 2002-04-05 2002-04-10 11:49:26 +00:00
db9590945c updated code to snapshot 2002-04-04 2002-04-05 08:04:32 +00:00
3fdf6f7ff1 sprintf -> asprintf 2002-03-30 16:07:14 +00:00
14b947cb6c updated code to snapshot 2002-03-27 2002-03-30 16:02:41 +00:00
c0497676a6 sync with rpm4 branch 2002-03-25 23:19:22 +00:00
dee952c2f8 sync with rpm4 branch: include local headers 2002-03-25 22:02:39 +00:00
82a4763c66 Initial revision 2002-03-25 20:16:26 +00:00