summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-09-22 09:26:39 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-09-22 09:26:39 +0300
commitdff73774ca68b1ab79534547fc744c510da8f0e5 (patch)
tree7bce472b3a09252999b84d8e678ae565016d8aab /lib
parent6bc5d87007bfe2ecfe6738f0575b3646a71361fd (diff)
downloadlibrpm-tizen-dff73774ca68b1ab79534547fc744c510da8f0e5.tar.gz
librpm-tizen-dff73774ca68b1ab79534547fc744c510da8f0e5.tar.bz2
librpm-tizen-dff73774ca68b1ab79534547fc744c510da8f0e5.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/rpmdb.c27
-rw-r--r--lib/rpmdb_internal.h1
2 files changed, 0 insertions, 28 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index 9b398e2de..f15c446e1 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -35,7 +35,6 @@
int _rpmdb_debug = 0;
static int _rebuildinprogress = 0;
-static int _db_filter_dups = 0;
#define _DBI_FLAGS 0
#define _DBI_PERMS 0644
@@ -911,7 +910,6 @@ rpmdb newRpmdb(const char * root,
static int _initialized = 0;
if (!_initialized) {
- _db_filter_dups = rpmExpandNumeric("%{_filterdbdups}");
_initialized = 1;
}
@@ -937,7 +935,6 @@ rpmdb newRpmdb(const char * root,
db->db_errpfx = rpmExpand( (epfx && *epfx ? epfx : _DB_ERRPFX), NULL);
/* XXX remove environment after chrooted operations, for now... */
db->db_remove_env = (!rstreq(db->db_root, "/") ? 1 : 0);
- db->db_filter_dups = _db_filter_dups;
db->db_ndbi = dbiTags.max;
db->db_malloc = rmalloc;
db->db_realloc = rrealloc;
@@ -3233,30 +3230,6 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
continue;
}
- /* Filter duplicate entries ? (bug in pre rpm-3.0.4) */
- if (_db_filter_dups || newdb->db_filter_dups) {
- const char *name = headerGetString(h, RPMTAG_NAME);
- const char *version = headerGetString(h, RPMTAG_VERSION);
- const char *release = headerGetString(h, RPMTAG_RELEASE);
- int skip = 0;
-
- { rpmdbMatchIterator mi;
- mi = rpmdbInitIterator(newdb, RPMTAG_NAME, name, 0);
- (void) rpmdbSetIteratorRE(mi, RPMTAG_VERSION,
- RPMMIRE_DEFAULT, version);
- (void) rpmdbSetIteratorRE(mi, RPMTAG_RELEASE,
- RPMMIRE_DEFAULT, release);
- while (rpmdbNextIterator(mi)) {
- skip = 1;
- break;
- }
- mi = rpmdbFreeIterator(mi);
- }
-
- if (skip)
- continue;
- }
-
/* Deleted entries are eliminated in legacy headers by copy. */
{ Header nh = (headerIsEntry(h, RPMTAG_HEADERIMAGE)
? headerCopy(h) : NULL);
diff --git a/lib/rpmdb_internal.h b/lib/rpmdb_internal.h
index 3e90e4711..7f5a1587c 100644
--- a/lib/rpmdb_internal.h
+++ b/lib/rpmdb_internal.h
@@ -263,7 +263,6 @@ struct rpmdb_s {
int db_api; /*!< Berkeley API type */
char * db_errpfx;
int db_remove_env;
- int db_filter_dups;
int db_chrootDone; /*!< If chroot(2) done, ignore db_root. */
int db_mkdirDone; /*!< Has db_home been created? */
void (*db_errcall) (const char *db_errpfx, char *buffer);