TODO
author Kristian H?gsberg <krh@redhat.com>
Thu Dec 27 17:45:18 2007 -0500 (2007-12-27)
changeset 86 e44ccd213756
parent 75 93278d8ec39c
child 97 41bf485e6154
permissions -rw-r--r--
Extend installer implementation further.
     1 Towards replacing rpm + yum (0.1):
     2 
     3 - installer part:
     4 
     5    - pre install check; check that dirs can be created (no files where
     6      want to create dirs), move config files according to file
     7      flags. (.rpmnew etc)
     8 
     9    - run hooks; probably fork to shell and in the parent just do a
    10      write() of the hook section to a pipe to the shell.
    11 
    12    - store rpm headers for installed packages.
    13 
    14 - versions in depsolving
    15 
    16 - signed packages
    17 
    18 - merge file lists when merging package sets
    19 
    20 - download (libcurl?)
    21 
    22 - figure out how to canonically represent empty string... ~0?
    23 
    24 - space calculation before transaction, but ideally, do a number of
    25   smaller transactions.
    26 
    27 - pre-link changing binaries and libs on disk screwing up checksum?
    28 
    29 - nail down byte-order and word sizes of repo file.
    30 
    31 - version the sections in the file, put the element size in the header
    32   so we can add stuff to elements in a backwards compatible way.
    33   maybe not necessary, we can just add sections that augment the
    34   sections we want to add to (similar to how rpm has add versioned
    35   deps).
    36 
    37 - pipelined download and install; topo-sort packages in update set,
    38   pick one with all deps in the current set, add it to the current set
    39   and satisfy deps against update set => result: minimal update
    40   transaction.  Queue download and install/update transaction for the
    41   packages in the minimal set, start over.  This also makes the
    42   installation phase much more interruptible, basically just stop
    43   after a sub-transaction finishes.  As we keep the update set around
    44   as a target, we can restart if needed.  Probably don't need to, can
    45   just do a new update.  During a sub-transaction we should keep the
    46   target set (i.e. the current set to be) around as a lock file
    47   (system.repo.lock or so, see git) so that razor updates are
    48   prevented if the systems crashes during an update.
    49 
    50 Misc ideas:
    51 
    52 - keep history of installed packages/journal of package transaction,
    53   so we can roll back to yesterday, or see what got installed in the
    54   latest yum update.
    55 
    56 - transactions, proper recovery, make sure we don't poop our package
    57   database (no more rm /var/lib/rpm/__cache*).
    58 
    59 - rewrite qsort and bsearch that doesn't require global context var
    60   and can output a map describing the permutaion.
    61 
    62 - use hash table for package and property lists so we only store
    63   unique lists (like for string pool).
    64 
    65 - use existing, running system as repo; eg
    66 
    67 	razor update razor://other-box.local evince
    68 
    69   to pull eg the latest evince and dependencies from another box.  We
    70   should be able to regenerate a rzr pkg from the system so we can
    71   reuse the signature from the originating repo.
    72 
    73 - Ok, maybe the fastest package set merge method in the end is to use
    74   the razor_importer, but use a hash table for the properties.  This
    75   way we can assign them unique IDs immediately (like tokenizing
    76   strings).
    77 
    78 - test suite should be easy, just keep .repo files around and test
    79   different type of upgrades that way (obsoletes, conflicts, file
    80   conflicts, file/dir problems etc).  Or maybe just keep a simple file
    81   format ad use a custom importer to create the .repo files.
    82 
    83 - try to clean up the
    84 
    85 	do { ... } while (((e++)->name & RAZOR_ENTRY_LAST) == 0);
    86 
    87   idiom for iteration of directories.
    88 
    89 - overlay package sets?  mount a read-only /usr over nfs or from the
    90   virt-host and have a local package set overlaid over the read-only
    91   one.  shouldn't need new features in the core package set data
    92   structure, but should be just conventions on top.  we have the base
    93   package set from the r/o system, the overlay set from the local
    94   system and we can have an effective package set which is the merge
    95   of everything from the overlay into the base set.  the effective set
    96   is easy to compute and we could do it on the fly or cache it.  or
    97   maybe the effective set is the on-disk representation and the
    98   overlay can be computed when needed, we just keep a link back to the
    99   base.
   100 
   101 - incremental rawhide repo updates? instead of downloading 10MB zipped
   102   repo every time, download a diff repo?  Should be pretty small,
   103   especially if we don't have file checksums in metadata.  Filenames
   104   and properties are for the most part already present, typically just
   105   a version bump plus maybe tweaking a couple requires.  The upstream
   106   repo can store multiple incremental updates in one big file and
   107   provide an index file that maps updates for a given date (we should
   108   use repo-file checksums though) to a range in the file: Download the
   109   index file, search for a match for your latest rawhide.repo file,
   110   download range of updates that brings it up to date.
   111 
   112 - use hash tables for dirs when importing files to avoid qsorting all
   113   files in rawhide.
   114 
   115 Bugs:
   116 
   117 - eliminate duplicate entries in package property lists.
   118 
   119 - corner cases such as no files/properties in repo etc segfault.