lvu failed (patch)
Kok, Auke
sofar at foo-projects.org
Sat Feb 2 01:54:59 CET 2008
samuel wrote:
> i disagree :)
> several reasons:
> 1. it's terribly slow to go through all modules you once installed
> (and as a developper i frequently rebuild my system which just
> increases the activity log)
>
>
>
>
>
>
> On Jan 8, 2008 7:53 PM, Kok, Auke <sofar at foo-projects.org> wrote:
>> samuel wrote:
>>> allrighty... "rewrote" the patch... you might like it better this time ;)
>> it's a good start but it fails to account for a few things:
>>
>> 1) new modules that failed to install and were not installed before
> 2. it's unnecessary to get information that failed building and are
> not installed.
> why?
> 1. lvu failed is mainly to check for failed modules during lunar
> rebuild or lunar renew, hence no new modules are installed, so all
> modules failing will be included in the list `lsh list_installed`.
> When an installed module would pull in a new dependency (one that
> isn't installed yet) it will fail anyway so it will be included in the
> lvu failed if i only scan for installed stuff
> 2. if you install a new module that fails you will 1. or fix it or 2.
> find an alternative. In both cases it doesn't need to be included in
> the lvu failed command
>
>> 2) old modules that failed, installed ok later and were removed
> why would anyone want to know about these modules? i do not consider
> it a tool for developpers only.. I consider it as a tool that can show
> you which modules failed building during the last rebuild, renew or
> update you ran... (in fact... it's almost an $(ls /usr/src)
>
>> 3) the list will potentially be as large as all the modules you have installed
> This is not true... Right now the command works exactly as i intended
> it to be... it will only show the failed status if the "end" status of
> the module was failed. it doesn't show any modules that are installed
> perfectly now...
>
>
>>
>> I would reprogram this and make it a bit smarter:
>>
>> - read the file front to end
> done that... it's horribly slow
>
>> - upon encountering a "failed" add $module to the list of failed modules
> this is even slower :p (this is where i stopped my coding cause it was
> way way way too slow)
>
>> - for each line then, if it concerns a module that is in the failed list:
>> o if a succesfull 'lrm' was found, remove the module from the list
>> o if a succesfull 'lin' was found, remove the module from the list
>>
>> after this procedure, grep each module in the file for the last 'failed' entry,
>> and print out the entire line.
>>
>>
>> this should be enough for someone to code up, go give it a try ;)
>>
>> Auke
>
> I can see where you are going with this code and it could certainly do
> something usefull, but it's not really how i intended the patch... And
> it looses a lot of usefulness due to being so terribly slow
> The thing you are trying to implement is a developper tool, while i
> was merely looking at a quick way to display what modules failed
> during the last rebuild or renew...
thats already coded and run after a lunar update...
I just implemented `lvu failed` and it runs in about 2-3 minutes on my system
which has 13000 lines or so...
I bet I can speed that up easily.
Auke
More information about the Lunar-dev
mailing list