diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 02:48:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 02:48:10 +0000 |
commit | 7f9ceaec776a597e9ff8451038d57dd75e1e6d18 (patch) | |
tree | 284aa831d7c1c097a28b9048e594e071efa8e65c /apt-pkg/pkgcachegen.cc | |
parent | Releasing progress-linux version 2.9.3-0.0~progress7.99u1. (diff) | |
download | apt-7f9ceaec776a597e9ff8451038d57dd75e1e6d18.tar.xz apt-7f9ceaec776a597e9ff8451038d57dd75e1e6d18.zip |
Merging upstream version 2.9.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | apt-pkg/pkgcachegen.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 5047561..981d360 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -1637,6 +1637,10 @@ static DynamicMMap* CreateDynamicMMap(FileFd * const CacheF, unsigned long Flags static bool writeBackMMapToFile(pkgCacheGenerator * const Gen, DynamicMMap * const Map, std::string const &FileName) { + // Do not write the file back to /dev/null or try to change its mode... + if (FileName == "/dev/null") + return true; + FileFd SCacheF(FileName, FileFd::WriteAtomic); if (SCacheF.IsOpen() == false || SCacheF.Failed()) return false; |