summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rw-r--r--lib/dpkg/dump.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 240d07d32..9f7105a7d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
dpkg (1.20.0) UNRELEASED; urgency=medium
+ [ Guillem Jover ]
+ * libdpkg: Do not generate a backup file for the available database.
+ Closes: #343578
+
[ Updated man pages translations ]
* German (Helge Kreutzmann). Closes: #931135
diff --git a/lib/dpkg/dump.c b/lib/dpkg/dump.c
index c58a4d59a..48f0beb03 100644
--- a/lib/dpkg/dump.c
+++ b/lib/dpkg/dump.c
@@ -538,8 +538,12 @@ void
writedb(const char *filename, enum writedb_flags flags)
{
struct atomic_file *file;
+ enum atomic_file_flags atomic_flags = ATOMIC_FILE_BACKUP;
- file = atomic_file_new(filename, ATOMIC_FILE_BACKUP);
+ if (flags & wdb_dump_available)
+ atomic_flags = 0;
+
+ file = atomic_file_new(filename, atomic_flags);
atomic_file_open(file);
writedb_records(file->fp, filename, flags);