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