I noticed this too, when looking into why my daily cron jobs were taking so long to run.
It's not just that the code is duplicated: the script will sleep for no reason. After the first "check if we can lock the cache", why should the script wait? If the cache is unlocked, it should start the update right away. I think the intended logic is: if cache_is_locked: wait a while if cache_is_still_locked: exit fi fi I've attached a patch which implements this change. ** Attachment added: "patch to /etc/cron.daily/apt" http://launchpadlibrarian.net/17865628/etc-cron.daily-apt.patch -- apt cron.daily script sleeps a random amount of time twice https://bugs.launchpad.net/bugs/262015 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs