Hi, I get an "method not permitted before handle's open method" when I do a 'rpm --verifydb'. In verify mode, the db is not really opened, thus it's an error to call dbiFlags() which calls db->get_open_flags().
Patch attached. Cheers, Michael. -- Michael Schroeder m...@suse.de SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
--- lib/rpmdb.c.orig 2011-05-12 14:08:07.000000000 +0000 +++ lib/rpmdb.c 2011-05-12 14:09:06.000000000 +0000 @@ -165,7 +165,7 @@ static dbiIndex rpmdbOpenIndex(rpmdb db, uintId, uintCmp, NULL); } /* If primary got created, we can safely run without fsync */ - if ((dbiFlags(dbi) & DBI_CREATED) || db->cfg.db_no_fsync) { + if ((!verifyonly && (dbiFlags(dbi) & DBI_CREATED)) || db->cfg.db_no_fsync) { rpmlog(RPMLOG_DEBUG, "disabling fsync on database\n"); db->cfg.db_no_fsync = 1; dbSetFSync(db->db_dbenv, 0);
_______________________________________________ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint