rpm/initdbret.diff

26 lines
714 B
Diff

Check rpmtsInitDB return value. Also patches rpm.c, which
actually is not used anymore.
--- ./rpm.c.orig 2005-12-15 11:59:33.000000000 +0000
+++ ./rpm.c 2005-12-15 11:59:53.000000000 +0000
@@ -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:
--- ./rpmqv.c.orig 2005-12-15 13:46:45.000000000 +0000
+++ ./rpmqv.c 2005-12-15 13:47:37.000000000 +0000
@@ -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: