Check rpmtsInitDB return value. Also patches rpm.c, which
authorPaul Nasrat <pnasrat@redhat.com>
Mon, 16 Apr 2007 12:21:22 +0000 (13:21 +0100)
committerPaul Nasrat <pnasrat@redhat.com>
Mon, 16 Apr 2007 12:21:22 +0000 (13:21 +0100)
actually is not used anymore.
Patch from OpenSuSE

rpm.c
rpmqv.c

diff --git a/rpm.c b/rpm.c
index d702f6e..1dd5209 100755 (executable)
--- a/rpm.c
+++ b/rpm.c
@@ -1119,7 +1119,7 @@ int main(int argc, const char ** argv)
        break;
 
       case MODE_INITDB:
-       rpmdbInit(rootdir, 0644);
+       ec = rpmdbInit(rootdir, 0644);
        break;
 
       case MODE_CHECKSIG:
diff --git a/rpmqv.c b/rpmqv.c
index f2068d9..070cbc9 100755 (executable)
--- a/rpmqv.c
+++ b/rpmqv.c
@@ -624,7 +624,7 @@ int main(int argc, const char ** argv)
     switch (bigMode) {
 #ifdef IAM_RPMDB
     case MODE_INITDB:
-       (void) rpmtsInitDB(ts, 0644);
+       ec = rpmtsInitDB(ts, 0644);
        break;
 
     case MODE_REBUILDDB: