Honor --nomanifest on install too
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 26 Feb 2009 14:38:10 +0000 (16:38 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 26 Feb 2009 14:38:10 +0000 (16:38 +0200)
- bit of a kludge but works.. and fixes test case 39

lib/rpminstall.c

index 1ebba67..9fb4767 100644 (file)
@@ -12,6 +12,7 @@
 #include <rpm/rpmts.h>
 #include <rpm/rpmlog.h>
 #include <rpm/rpmfileutil.h>
+#include <rpm/rpmgi.h>
 
 #include "lib/manifest.h"
 #include "debug.h"
@@ -467,6 +468,10 @@ restart:
        xx = Fclose(eiu->fd);
        eiu->fd = NULL;
 
+       /* Honor --nomanifest */
+       if (eiu->rpmrc == RPMRC_NOTFOUND && (giFlags & RPMGI_NOMANIFEST))
+           eiu->rpmrc = RPMRC_FAIL;
+
        switch (eiu->rpmrc) {
        case RPMRC_FAIL:
            rpmlog(RPMLOG_ERR, _("%s cannot be installed\n"), *eiu->fnp);