Layout proposal

Nat Budin natb@brandeis.edu
Sat, 03 Jul 2004 01:42:46 -0400


Otavio has asked me to propose a class layout for the rewrite of 
debpartial-mirror.  Here's a possible way to do it (best viewed in a 
fixed-width font:

PackageList - just what it sounds like, a listing of packages from a
               single source

(Functionality: provide a list of packages and where to get them from; 
tell what packages depend on other packages; perform filtering on the 
list and provide a subset of packages)

PackageSource - a way to get packages
      |
      +-----> RemotePackageSource - a remote APT repository
      |
      +-----> LocalPackageSource - a locally-stored set of packages

(Functionality: when constructed, generate a PackageList; grab packages 
into a MirrorBackend by whatever means are appropriate)

Backend - a locally-stored APT repository that debpartial-mirror
    |      generates
    |
    +-----> MirrorBackend - gets packages from a PackageSource, with
    |                       optional filtering
    |
    +-----> MergeBackend - gets packages from MirrorBackends, with
                           optional additional filtering

(Functionality: figure out which packages need updating; pull updates 
from source)

Nat