don't install a single package twice
authorewt <devnull@localhost>
Wed, 31 Mar 1999 22:19:00 +0000 (22:19 +0000)
committerewt <devnull@localhost>
Wed, 31 Mar 1999 22:19:00 +0000 (22:19 +0000)
CVS patchset: 2934
CVS date: 1999/03/31 22:19:00

lib/install.c

index f74d1e2..c8f1556 100644 (file)
@@ -272,7 +272,6 @@ int installBinaryPackage(const char * rootdir, rpmdb db, FD_t fd, Header h,
     headerGetEntry(h, RPMTAG_VERSION, &type, (void **) &version, &fileCount);
     headerGetEntry(h, RPMTAG_RELEASE, &type, (void **) &release, &fileCount);
 
-
     rpmMessage(RPMMESS_DEBUG, _("package: %s-%s-%s files test = %d\n"), 
                name, version, release, flags & RPMTRANS_FLAG_TEST);
 
@@ -285,6 +284,11 @@ int installBinaryPackage(const char * rootdir, rpmdb db, FD_t fd, Header h,
        dbiFreeIndexRecord(matches);
     }
 
+    if (!rpmdbFindByHeader(db, h, &matches)) {
+       otherOffset = matches.recs[0].recOffset;
+       dbiFreeIndexRecord(matches);
+    }
+
     if (rootdir) {
        /* this loads all of the name services libraries, in case we
           don't have access to them in the chroot() */