summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libzypp/libzypp/rpm5-no-rpmdbinit.patch
blob: 7006203315381cf05533b70717f93283f2f43285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Upstream-Status: Pending

diff --git a/zypp/target/rpm/librpmDb.cc b/zypp/target/rpm/librpmDb.cc
index 1689fbb..4999cd9 100644
--- a/zypp/target/rpm/librpmDb.cc
+++ b/zypp/target/rpm/librpmDb.cc
@@ -60,20 +60,6 @@ public:
     const char * root = ( _root == "/" ? NULL : _root.asString().c_str() );
     int          perms = 0644;
 
-    // check whether to create a new db
-    PathInfo master( _root + _dbPath + "Packages" );
-    if ( ! master.isFile() )
-    {
-      // init database
-      int res = ::rpmdbInit( root, perms );
-      if ( res )
-      {
-        ERR << "rpmdbInit error(" << res << "): " << *this << endl;
-        _error = shared_ptr<RpmInitException>(new RpmInitException(_root, _dbPath));
-        ZYPP_THROW(*_error);
-      }
-    }
-
     // open database
     int res = ::rpmdbOpen( root, &_db, (readonly_r ? O_RDONLY : O_RDWR ), perms );
     if ( res || !_db )