found 459344 0.7.14 tags 459344 patch thanks On Wed, 28 May 2008 14:27:11 +0000 Debian Bug Tracking System wrote: > [ Michael Vogt ] > * debian/apt.cron.daily: > - apply patch based on the ideas of Francesco Poli for better > behavior when the cache can not be locked (closes: #459344) Hi! Thanks for accepting my proposals. I've just checked the resulting apt-0.7.14/debian/apt.cron.daily Unfortunately it seems that the rearrangement that was apparently applied to my patch introduced a little bug. apt-0.7.14/debian/apt.cron.daily now checks if there's anything to do (that requires locking the cache). In case there's nothing to do (that requires locking the cache), it exits immediately and successfully. Everything would be fine, but for a little detail. The final check_size_constraints invocation is then skipped entirely. As far as I understand it, this function decides what to do on the basis of different configuration parameters than the ones checked in the if-statement we are talking about. As a consequence, the final check_size_constraints invocation should be performed even when nothing (that requires locking the cache) has to be done. The attached patch should fix this little issue. Usual legal details: I don't know if my patch constitutes a contribution creative enough to be copyrighted, but anyway, should it turn out to be actually copyrighted, I hereby release it under the same terms of /etc/cron.daily/apt, that is to say, under the terms of the GNU General Public License (GPL), version 2 or later, as published by the Free Software Foundation. -- http://frx.netsons.org/doc/index.html#nanodocs The nano-document series is here! ..................................................... Francesco Poli . GnuPG key fpr == C979 F34B 27CE 5CD8 DC12 31B5 78F4 279B DD6D FCF4
diff -ruN apt-0.7.14/debian/apt.cron.daily apt-0.7.14-patched/debian/apt.cron.daily --- apt-0.7.14/debian/apt.cron.daily 2008-05-28 15:22:14.000000000 +0200 +++ apt-0.7.14-patched/debian/apt.cron.daily 2008-05-29 00:32:35.000000000 +0200 @@ -178,11 +178,15 @@ UnattendedUpgradeInterval=0 eval $(apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgrade) -# check if we actually have to do anything +# check if we actually have to do anything that requires locking the cache if [ $UpdateInterval -eq 0 ] && [ $DownloadUpgradeableInterval -eq 0 ] && [ $UnattendedUpgradeInterval -eq 0 ] && [ $AutocleanInterval -eq 0 ]; then + + # check cache size + check_size_constraints + exit 0 fi
Attachment:
pgpZfDKIhJM_Z.pgp
Description: PGP signature