]> git.saurik.com Git - apt.git/commitdiff
* ftparchive/writer.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 9 Sep 2010 17:04:26 +0000 (19:04 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 9 Sep 2010 17:04:26 +0000 (19:04 +0200)
  - null the valid string instead of the date if Valid-Until is not set
* apt-pkg/acquire-item.cc:
  - use also unsigned Release files again (Closes: #596189)

debian/changelog
ftparchive/writer.cc

index 1780714b8a9b8e7c2ac2d7d3c36ea6b3a2e14acb..7b126b6619301340c93fccaf585c8eb78c7174e1 100644 (file)
@@ -1,12 +1,17 @@
 apt (0.8.4) UNRELEASED; urgency=low
 
+  [ Michael vogt ]
+  * ftparchive/writer.cc:
+    - write out {Files,Checksum-Sha1,Checksum-Sha256} only if
+      available LP: #633967. Thanks to Colin Watson
+
   [ David Kalnischkies ]
   * ftparchive/writer.cc:
     - null the valid string instead of the date if Valid-Until is not set
   * apt-pkg/acquire-item.cc:
     - use also unsigned Release files again (Closes: #596189)
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Thu, 09 Sep 2010 18:21:51 +0200
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 09 Sep 2010 15:30:19 +0200
 
 apt (0.8.3) unstable; urgency=low
 
index 858e0d9df0c2470cc2c280cddd861764d77443c3..d7d699ddc8a0e63bc7948b8da278e7fa66862e50 100644 (file)
@@ -708,18 +708,21 @@ bool SourcesWriter::DoPackage(string FileName)
    // Add the dsc to the files hash list
    string const strippedName = flNotDir(FileName);
    std::ostringstream ostreamFiles;
-   ostreamFiles << "\n " << string(MD5.Result()) << " " << St.st_size << " "
-               << strippedName << "\n " << Tags.FindS("Files");
+   if (Tags.Exists("Files"))
+      ostreamFiles << "\n " << string(MD5.Result()) << " " << St.st_size << " "
+                  << strippedName << "\n " << Tags.FindS("Files");
    string const Files = ostreamFiles.str();
 
    std::ostringstream ostreamSha1;
-   ostreamSha1 << "\n " << string(SHA1.Result()) << " " << St.st_size << " "
-               << strippedName << "\n " << Tags.FindS("Checksums-Sha1");
+   if (Tags.Exists("Checksums-Sha1"))
+      ostreamSha1 << "\n " << string(SHA1.Result()) << " " << St.st_size << " "
+                  << strippedName << "\n " << Tags.FindS("Checksums-Sha1");
    string const ChecksumsSha1 = ostreamSha1.str();
 
    std::ostringstream ostreamSha256;
-   ostreamSha256 << "\n " << string(SHA256.Result()) << " " << St.st_size << " "
-               << strippedName << "\n " << Tags.FindS("Checksums-Sha256");
+   if (Tags.Exists("Checksums-Sha256"))
+      ostreamSha256 << "\n " << string(SHA256.Result()) << " " << St.st_size << " "
+                  << strippedName << "\n " << Tags.FindS("Checksums-Sha256");
    string const ChecksumsSha256 = ostreamSha256.str();
 
    // Strip the DirStrip prefix from the FileName and add the PathPrefix