Apply apt-0.5.15lorg2-alt-rpmdbopen.patch

Added in commit 96870b6:
- add patch: open rpm database with O_CREAT flag (we need it to use apt in system installer)
This commit is contained in:
Gleb Fotengauer-Malinovskiy 2014-05-16 21:04:23 +04:00
parent 4224cb4f8f
commit fecd3f817b
2 changed files with 1 additions and 13 deletions

View File

@ -1,12 +0,0 @@
diff -Naur apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmpm.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmpm.cc
--- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmpm.cc 2009-01-19 17:12:32 +0300
+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmpm.cc 2009-01-19 17:13:31 +0300
@@ -795,7 +795,7 @@
const char *RootDir = NULL;
if (!Dir.empty())
RootDir = Dir.c_str();
- if (rpmdbOpen(RootDir, &DB, O_RDWR, 0644) != 0)
+ if (rpmdbOpen(RootDir, &DB, O_RDWR|O_CREAT, 0644) != 0)
{
_error->Error(_("Could not open RPM database"));
goto exit;

View File

@ -807,7 +807,7 @@ bool pkgRPMLibPM::Process(vector<const char*> &install,
const char *RootDir = NULL;
if (!Dir.empty())
RootDir = Dir.c_str();
if (rpmdbOpen(RootDir, &DB, O_RDWR, 0644) != 0)
if (rpmdbOpen(RootDir, &DB, O_RDWR|O_CREAT, 0644) != 0)
{
_error->Error(_("Could not open RPM database"));
goto exit;