<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On Apr 27, 2017 4:31 PM, "Julian Andres Klode" <<a href="mailto:jak@debian.org">jak@debian.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi systemd folks,<br>
<br>
(service and timer files being discussed at the bottom)<br>
<br>
we are currently reworking the way automatic updates and upgrades work<br>
on Ubuntu and Debian systems. We basically have two persistent timers<br>
with associated services:<br>
<br>
1. apt-daily - Downloads new lists and packages<br>
2. apt-daily-upgrade - Performs upgrades<br>
<br>
The first job should run spread out through the day (we run it twice<br>
due to some other reasons), the latter in the morning between 6 and 7,<br>
and at boot, daily-upgrade should be resumed after daily (so we added<br>
After ordering relations to apt-daily-upgrade timer and service).<br>
<br>
Now, we seem to be missing one bit: If daily-upgrade is already<br>
running, and daily is about to start, daily should wait for<br>
daily-upgrade to finish. I had hoped that maybe that works<br>
automatically given that there is some ordering relation between the<br>
two, but that did not work out. I tried adding Conflicts, but systemd<br>
then said "loop to fast" and became unresponsive (not sure if caused<br>
by this, but maybe).<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">It seems to me that this could be easily around by adding Wants=apt-daily.service to the upgrade unit. That will guarantee that systemd puts the update job in the queue before the upgrade job. I think this is what you want, anyways. You want to make sure that you have the latest lists before starting the upgrade. If you get the timers lined up, then maybe you won't even get any additional update jobs run.</div><div dir="auto"><br></div><div dir="auto">Dan</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div></div>