TODO
author Dan Winship <danw@gnome.org>
Fri Feb 29 12:45:08 2008 -0500 (2008-02-29)
changeset 138 49deac048d07
parent 82 61fef906a84a
child 180 9b84b59d9d50
permissions -rw-r--r--
implement file dependencies for installs

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