README
author Kristian H?gsberg <krh@redhat.com>
Sun Jun 15 22:33:15 2008 -0400 (2008-06-15)
changeset 239 7a1b0282ae3c
child 374 f71695220726
permissions -rw-r--r--
Use depsolver to verify rpm -e, flush out more options.
     1 Just random notes at this point:
     2 
     3  - Razor is a package management system replacing rpm and yum.  Razor
     4    implements management of packages installed on the system,
     5    dependency solving, and upgrading in a small compact code base with
     6    minimal dependencies.
     7 
     8  - Key points: one file format for package sets, specified and
     9    implemented by razor; no point in splitting dep-solver and package
    10    manager, there is too much implementation overlap.  By hand coding
    11    the on-disk format we have a solid foundation on which to
    12    implementing fast dependency solving, error recovery etc.  No
    13    complex dependencies in package management stack.  In other words,
    14    package management is *simple*, no need to overdesign it.
    15 
    16  - Use one simple file format as the core of the system.  The razor
    17    package set data structure represents a set of packages and is used
    18    for the current installed set, the sets available from upstream
    19    sources, and the set currently being install during a transaction.
    20    Tiered systems such as rpm+yum, deb+apt etc end up duplicating and
    21    reimplementing common operations on packages.  Other systems
    22    typically pull in external database libraries to manage the package
    23    meta data and in some cases each layer in the stack uses a
    24    different database dependency to represent essentially the same
    25    data.
    26 
    27  - Using external database libraries may seem a good idea up front,
    28    but monotone vs git is a good example of how you need to control
    29    the data structure and the on-disk format to really get excellent
    30    performance.  The razor package set data structure is fairly
    31    simple; it's an read-only, mmap()'able on-disk data structure.  The
    32    package set has a sorted index of the packages in the set, a sorted
    33    index of all dependencies and a sorted, compact directory of all
    34    files in all the packages.  Operations such as merging package
    35    sets, satisfying requires from one set against another can all be
    36    implemented in linear time.  Razor implements the package set
    37    representation down to the bytes on the disk and can optimize the
    38    representation and access methods to make the necessary operations
    39    fast and reliable.
    40 
    41  - The set of installed packages on a system is represented by just
    42    one package set file.  As we install a set of new packages, we
    43    prepare the new package set a temporary file and once the install
    44    has succeeded, we copy the package set file to the real filename.
    45    If there is a system crash, razor will notice the temporary file on
    46    boot and resume the update.  
    47 
    48  - We want to keep the numer of dependencies down in a system critical
    49    component such as the package manager.  Between rpm and yum we're
    50    pulling in berkeley db, sqlite, expat, python.
    51 
    52  - During update of several packages rpm+yum leaves the system in an
    53    inconsistent state for long periods of time.  Power failure in this
    54    window causes critical system corruption.  We want to minimize the
    55    window.