Просмотр исходного кода

for filesystems not supporting mmap'ing a file we need to use a
SyncToFd dummy just as we did for compressed files in 0.9.5

David Kalnischkies лет назад: 14
Родитель
Сommit
fbda0ee9d9
2 измененных файлов с 3 добавлено и 0 удалено
  1. 1 0
      apt-pkg/contrib/mmap.cc
  2. 2 0
      debian/changelog

+ 1 - 0
apt-pkg/contrib/mmap.cc

@@ -102,6 +102,7 @@ bool MMap::Map(FileFd &Fd)
 	 {
 	 {
 	    // for readonly, we don't need sync, so make it simple
 	    // for readonly, we don't need sync, so make it simple
 	    Base = malloc(iSize);
 	    Base = malloc(iSize);
+	    SyncToFd = new FileFd();
 	    return Fd.Read(Base, iSize);
 	    return Fd.Read(Base, iSize);
 	 }
 	 }
 	 // FIXME: Writing to compressed fd's ?
 	 // FIXME: Writing to compressed fd's ?

+ 2 - 0
debian/changelog

@@ -18,6 +18,8 @@ apt (0.9.7.3) UNRELEASED; urgency=low
       second (filebased) constructor of DynamicMMap (Closes: #677704)
       second (filebased) constructor of DynamicMMap (Closes: #677704)
     - refer to APT::Cache-Start in case the growing failed as if -Limit is
     - refer to APT::Cache-Start in case the growing failed as if -Limit is
       really the offender it will be noted in a previous error message.
       really the offender it will be noted in a previous error message.
+    - for filesystems not supporting mmap'ing a file we need to use a
+      SyncToFd dummy just as we did for compressed files in 0.9.5
 
 
  -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 18 Jul 2012 11:45:57 +0200
  -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 18 Jul 2012 11:45:57 +0200