On Thu, Aug 31, 2006 at 05:50:21PM +0200, Enrico Zini wrote:

>  4. When the library is initialised, check if there are newer files in
>     the sources directory, and if yes, rebuild the index.  If it's
>     running as root, rebuild the central index, otherwise rebuild the
>     user index.

Now let's see how to choose what index to read, and what index to
update.

 * For vocabulary and tag indexes
 
 1. If there are user sources, then completely ignore the system indexes
     - If the user index is newer than the newest of the user and system
       sources, read it
     - Else, read all the sources to regenerate the user index

 2. Else, try the system index first
     - If the system index is newer than the newest of the system
       sources, then use it.  If the user index exists, delete it.
     - Else, check if we are root
        - If we are root, read all the sources to regenerate the system
          index
        - Else, read all the sources to regenerate the user index

 * For the support index pkgidx

There cannot be user sources for pkgidx, as it solely depends on
libapt-pkg's internal indexes.  Therefore:

 - If the system index is newer than the newest of the system
   sources, then use it.  If the user index exists, delete it.
 - Else, check if we are root
    - If we are root, scan the APT index to generate the system pkgidx.
    - Else, scan the APT index to regenerate the user index.

...and now, let's implement this as well.


Ciao,

Enrico

-- 
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Debtags-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debtags-devel

Reply via email to