Unbreak --rebuilddb
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 5 Apr 2010 15:09:57 +0000 (18:09 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 6 Apr 2010 08:35:33 +0000 (11:35 +0300)
- managed to bust up the rebuilddb-path generation once again in commit
  890cea56c91ff6ff887a439c036d345715e6c5c2, doh
- make the intended logic more obviours

lib/rpmdb.c

index 86c4dae..b6d6459 100644 (file)
@@ -2848,7 +2848,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
     tfn = _free(tfn);
 
     tfn = rpmGetPath("%{?_dbpath_rebuild}", NULL);
-    if (!rstreq(tfn, "") && !rstreq(tfn, dbpath)) {
+    if (rstreq(tfn, "") || rstreq(tfn, dbpath)) {
        tfn = _free(tfn);
        rasprintf(&tfn, "%srebuilddb.%d", dbpath, (int) getpid());
        nocleanup = 0;