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