Add download command to download packages from yum repo.
Works with bash completion against upstream packages and
supports wildcards suchs as gcc-*.
1 Towards replacing rpm + yum (0.1):
5 - pre install check; check that dirs can be created (no files where
6 want to create dirs), move config files according to file
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.
12 - store rpm headers for installed packages.
18 - figure out how to canonically represent empty string... ~0?
20 - space calculation before transaction, but ideally, do a number of
23 - pre-link changing binaries and libs on disk screwing up checksum?
25 - nail down byte-order of repo file.
27 - version the sections in the file, put the element size in the header
28 so we can add stuff to elements in a backwards compatible way.
29 maybe not necessary, we can just add sections that augment the
30 sections we want to add to (similar to how rpm has add versioned
33 - pipelined download and install; topo-sort packages in update set,
34 pick one with all deps in the current set, add it to the current set
35 and satisfy deps against update set => result: minimal update
36 transaction. Queue download and install/update transaction for the
37 packages in the minimal set, start over. This also makes the
38 installation phase much more interruptible, basically just stop
39 after a sub-transaction finishes. As we keep the update set around
40 as a target, we can restart if needed. Probably don't need to, can
41 just do a new update. During a sub-transaction we should keep the
42 target set (i.e. the current set to be) around as a lock file
43 (system.repo.lock or so, see git) so that razor updates are
44 prevented if the systems crashes during an update.
48 - keep history of installed packages/journal of package transaction,
49 so we can roll back to yesterday, or see what got installed in the
52 - transactions, proper recovery, make sure we don't poop our package
53 database (no more rm /var/lib/rpm/__cache*).
55 - use hash table for package and property lists so we only store
56 unique lists (like for string pool).
58 - use existing, running system as repo; eg
60 razor update razor://other-box.local evince
62 to pull eg the latest evince and dependencies from another box. We
63 should be able to regenerate a rzr pkg from the system so we can
64 reuse the signature from the originating repo.
66 - Ok, maybe the fastest package set merge method in the end is to use
67 the razor_importer, but use a hash table for the properties. This
68 way we can assign them unique IDs immediately (like tokenizing
71 - test suite should be easy, just keep .repo files around and test
72 different type of upgrades that way (obsoletes, conflicts, file
73 conflicts, file/dir problems etc). Or maybe just keep a simple file
74 format ad use a custom importer to create the .repo files.
78 do { ... } while (((e++)->name & RAZOR_ENTRY_LAST) == 0);
80 idiom for iteration of directories.
82 - overlay package sets? mount a read-only /usr over nfs or from the
83 virt-host and have a local package set overlaid over the read-only
84 one. shouldn't need new features in the core package set data
85 structure, but should be just conventions on top. we have the base
86 package set from the r/o system, the overlay set from the local
87 system and we can have an effective package set which is the merge
88 of everything from the overlay into the base set. the effective set
89 is easy to compute and we could do it on the fly or cache it. or
90 maybe the effective set is the on-disk representation and the
91 overlay can be computed when needed, we just keep a link back to the
94 - incremental rawhide repo updates? instead of downloading 10MB zipped
95 repo every time, download a diff repo? Should be pretty small,
96 especially if we don't have file checksums in metadata. Filenames
97 and properties are for the most part already present, typically just
98 a version bump plus maybe tweaking a couple requires. The upstream
99 repo can store multiple incremental updates in one big file and
100 provide an index file that maps updates for a given date (we should
101 use repo-file checksums though) to a range in the file: Download the
102 index file, search for a match for your latest rawhide.repo file,
103 download range of updates that brings it up to date.
105 - use hash tables for dirs when importing files to avoid qsorting all
110 - eliminate duplicate entries in package property lists.