Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 apt-cacher-ng (3.2-2) unstable; urgency=medium
 .
   *  Fix for incorrect assumption of some existing SHA256SUMS files in Debian
      repositories which makes the expiration task fail without a proper way
      for the end user to recover from it. Now ignore a download error in this
      case (similar handling as for other guesses), assuming that permanent
      404ing for other reasons than removal of remote content can be considered
      unlikely (closes: #928957)
Author: Eduard Bloch <blade@debian.org>
Bug-Debian: https://bugs.debian.org/928957

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2019-05-21

--- apt-cacher-ng-3.2.orig/source/expiration.cc
+++ apt-cacher-ng-3.2/source/expiration.cc
@@ -806,6 +806,13 @@ bool expiration::ProcessRegular(const st
 			flags.eIdxType = EIDX_SHA256DILIST;
 			flags.vfile_ondisk = true;
 			flags.uptodate = false;
+
+			// the original source context will probably provide a viable source for
+			// this URL - it might go 404 if the whole folder is missing but then the
+			// referenced content would also be outdated/gone and not worth keeping
+			// in the cache anyway
+
+			flags.forgiveDlErrors = true;
 		}
 		// and last but not least - care only about the modern version of that index
 		m_metaFilesRel.erase(idir + "MD5SUMS");
--- apt-cacher-ng-3.2.orig/systemd/apt-cacher-ng.service.in
+++ apt-cacher-ng-3.2/systemd/apt-cacher-ng.service.in
@@ -1,6 +1,7 @@
 [Unit]
 Description=Apt-Cacher NG software download proxy
 After=network.target
+RequiresMountsFor=/var/cache/apt-cacher-ng
 
 [Service]
 # the SocketPath option can be removed if the inetd bridge functionality is not needed
