[oe] any reason to not cache `opkg list`?

Graham Gower graham.gower at gmail.com
Sun Nov 21 22:59:38 UTC 2010


On 20 November 2010 09:48, AJ ONeal <coolaj86 at gmail.com> wrote:
> My assumption is that the only time the results of `opkg list`
> will change is after `opkg update`.
>
> Is that correct?
>
>
> If so, why not have `opkg update` generate the output
> which `opkg list` produces such that `opkg list` is instantaneous?
>
> AJ ONeal
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>

On my 300Mhz mipsel:

root at quokka:~# ls -l /var/lib/opkg/
-rw-r--r--    1 root     root      3558222 Nov 21 22:53 base
-rw-r--r--    1 root     root       145482 Nov 21 22:53 no-arch
-rw-r--r--    1 root     root        66288 Nov 21 22:53 quokka
root at quokka:~# time opkg list > /dev/null
real    0m 2.78s
user    0m 2.50s
sys     0m 0.26s

Ok, so its not the quickest. Opkg has to read in the package info and
parse it each time.

What is your use case for needing to call 'opkg list' so frequently
that this becomes painful?

-Graham




More information about the Openembedded-devel mailing list