Make rebuilddb work with the --root option. [#65993] --- ./rpmdb/rpmdb.c.orig 2005-02-16 03:18:19.000000000 +0000 +++ ./rpmdb/rpmdb.c 2006-02-21 20:37:44.000000000 +0000 @@ -3771,7 +3887,7 @@ int rpmdbRebuild(const char * prefix, rp } dbpath = rootdbpath = rpmGetPath(prefix, tfn, NULL); if (!(prefix[0] == '/' && prefix[1] == '\0')) - dbpath += strlen(prefix); + dbpath += strlen(prefix) - 1; tfn = _free(tfn); /*@-nullpass@*/ @@ -3794,7 +3910,7 @@ int rpmdbRebuild(const char * prefix, rp } newdbpath = newrootdbpath = rpmGetPath(prefix, tfn, NULL); if (!(prefix[0] == '/' && prefix[1] == '\0')) - newdbpath += strlen(prefix); + newdbpath += strlen(prefix) - 1; tfn = _free(tfn); rpmMessage(RPMMESS_DEBUG, _("rebuilding database %s into %s\n"),