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-1) unstable; urgency=medium
 .
   * New upstream version
     + GCC7 compilation fixes (closes: #853315)
     + fixes hidden space allocation issue (closes: #856635)
     + smarter manual index deletion wizard which covers related files too
       (probably closes: #789706)
   * Spanish translation update (by Matías A. Bellone, closes: #853105)
   * Instructions on how to work around cron job execution and "special needs"
     of some users to disable the admin page (closes: #855996)
   * Added RequiresMountsFor to systemd service description (closes: #855618,
     only in Debian patch for now)
Author: Eduard Bloch <blade@debian.org>
Bug-Debian: https://bugs.debian.org/789706
Bug-Debian: https://bugs.debian.org/853105
Bug-Debian: https://bugs.debian.org/853315
Bug-Debian: https://bugs.debian.org/855618
Bug-Debian: https://bugs.debian.org/855996
Bug-Debian: https://bugs.debian.org/856635

---
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: 2017-03-22

--- apt-cacher-ng-3.orig/source/aclogger.cc
+++ apt-cacher-ng-3/source/aclogger.cc
@@ -242,7 +242,6 @@ void flush()
 
 void close(bool bReopen)
 {
-	// let's try to store a snapshot of the current stats
 	auto snapIn = offttos(totalIn.exchange(0));
 	auto snapOut = offttos(totalOut.exchange(0));
 	timeval tp;
@@ -251,9 +250,8 @@ void close(bool bReopen)
 			+ acng::offttos(tp.tv_sec) + "." + acng::ltos(tp.tv_usec);
 	auto outLinkPath = CACHE_BASE + cfg::privStoreRelQstatsSfx + "/o/"
 			+ acng::offttos(tp.tv_sec) + "." + acng::ltos(tp.tv_usec);
-	ignore_value(symlink(snapIn.c_str(), inLinkPath.c_str()));
-	ignore_value(symlink(snapOut.c_str(), outLinkPath.c_str()));
-
+	symlink(snapIn.c_str(), inLinkPath.c_str());
+	symlink(snapOut.c_str(), outLinkPath.c_str());
 
 	if(!logIsEnabled)
 		return;
--- apt-cacher-ng-3.orig/systemd/apt-cacher-ng.service.in
+++ apt-cacher-ng-3/systemd/apt-cacher-ng.service.in
@@ -10,6 +10,7 @@ Group=apt-cacher-ng
 # this can be changed to notify if the support was enabled at build time
 Type=@SDTYPE@
 Restart=on-failure
+RequiresMountsFor=/var/cache/apt-cacher-ng
 
 [Install]
 WantedBy=multi-user.target
