Bug#459344: closed by Otavio Salvador <otavio@debian.org> (Bug#459344: fixed in apt 0.7.13)
Francesco Poli <frx@firenze.linux.it> writes:
> On Fri, 23 May 2008 10:03:44 -0300 Otavio Salvador wrote:
>
>> Francesco Poli <frx@firenze.linux.it> writes:
>>
>> > On Thu, 22 May 2008 17:49:15 -0300 Otavio Salvador wrote:
>> >
>> >> Do you mind to refresh your patch against current apt so I can apply
>> >> it for next upload?
>> >
>> > Where "current apt" means apt/0.7.13, right?
>>
>> Yes. Please.
>
> Mmmmh, I've just read the script in apt/0.7.13: it doesn't seem to
> perform the intended actions, when it finds the cache locked...
> What it currently does is:
> * if the cache is locked, it exits successfully
> * if the cache is _not_ locked, waits some time (why? the cache is
> accessible, it should go on as quickly as possible!), then it checks
> again the cache and exits unsuccessfully if it's locked (wow! the cache
> was accessible _before_, but now, after some time, it's locked, so that
> we can exit unsuccessfully!)
>
> In other words, unless I am really mistaken, it seems the behavior is
> just the opposite of the intended one.
We wait to avoid hitting the mirrors at same time.
> Anyway, the attached patch should apply cleanly to apt/0.7.13, should
> fix the above-described misbehavior and should implement my proposal.
>
> Rationale:
> If /etc/cron.daily/apt has something to do on the system, then, when
> the cache cannot be locked, the script waits for some time and
> rechecks. If the cache is found locked again, then the script cannot
> do its job and it exits with errors.
> If /etc/cron.daily/apt has absolutely nothing to do on the system, it
> does not need to check whether the cache can be locked.
We should first wait a random set of time (to avoid massive mirror
usage) and then do all you did above.
> Please consider applying my patch.
Could you consider my comments above and change it? Then I'll go
forward and commit your next patch.
--
O T A V I O S A L V A D O R
---------------------------------------------
E-mail: otavio@debian.org UIN: 5906116
GNU/Linux User: 239058 GPG ID: 49A5F855
Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
you the whole house."
Reply to: