- dont do explicit rpmdb open on non-prehistoric rpm versions, rpmlib will
authorpmatilai <pmatilai>
Thu, 25 May 2006 12:52:56 +0000 (12:52 +0000)
committerpmatilai <pmatilai>
Thu, 25 May 2006 12:52:56 +0000 (12:52 +0000)
  automatically do lazy open as needed

apt-pkg/rpm/rpmhandler.cc
apt-pkg/rpm/rpmpm.cc

index bbb5abb..6aa3033 100644 (file)
@@ -729,11 +729,6 @@ RPMDBHandler::RPMDBHandler(bool WriteLock)
    Handler = rpmtsCreate();
    rpmtsSetVSFlags(Handler, (rpmVSFlags_e)-1);
    rpmtsSetRootDir(Handler, Dir.c_str());
-   if (rpmtsOpenDB(Handler, O_RDONLY) != 0)
-   {
-      _error->Error(_("could not open RPM database"));
-      return;
-   }
 #else
    const char *RootDir = NULL;
    if (!Dir.empty())
index e6ca680..13b0131 100644 (file)
@@ -764,11 +764,6 @@ bool pkgRPMLibPM::Process(vector<const char*> &install,
    // 4.1 needs this always set even if NULL,
    // otherwise all scriptlets fail
    rpmtsSetRootDir(TS, Dir.c_str());
-   if (rpmtsOpenDB(TS, O_RDWR) != 0)
-   {
-      _error->Error(_("Could not open RPM database"));
-      goto exit;
-   }
 #else
    rpmProblemSet probs;
    const char *RootDir = NULL;