summaryrefslogtreecommitdiff
path: root/ftparchive/writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ftparchive/writer.cc')
-rw-r--r--ftparchive/writer.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index bdf9893c2..bb855d532 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -849,12 +849,20 @@ bool SourcesWriter::DoPackage(string FileName)
Changes.push_back(pkgTagSection::Tag::Rewrite("Package", Package));
if (Files.empty() == false)
Changes.push_back(pkgTagSection::Tag::Rewrite("Files", Files));
+ else
+ Changes.push_back(pkgTagSection::Tag::Remove("Files"));
if (ChecksumsSha1.empty() == false)
Changes.push_back(pkgTagSection::Tag::Rewrite("Checksums-Sha1", ChecksumsSha1));
+ else
+ Changes.push_back(pkgTagSection::Tag::Remove("Checksums-Sha1"));
if (ChecksumsSha256.empty() == false)
Changes.push_back(pkgTagSection::Tag::Rewrite("Checksums-Sha256", ChecksumsSha256));
+ else
+ Changes.push_back(pkgTagSection::Tag::Remove("Checksums-Sha256"));
if (ChecksumsSha512.empty() == false)
Changes.push_back(pkgTagSection::Tag::Rewrite("Checksums-Sha512", ChecksumsSha512));
+ else
+ Changes.push_back(pkgTagSection::Tag::Remove("Checksums-Sha512"));
if (Directory != "./")
Changes.push_back(pkgTagSection::Tag::Rewrite("Directory", Directory));
Changes.push_back(pkgTagSection::Tag::Rewrite("Priority", BestPrio));