1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-12-18 21:36:16 +02:00
Commit Graph

207 Commits

Author SHA1 Message Date
Werner Almesberger
2787a45c43 qpkg: added James S. Plank's red-black trees 2010-11-19 19:17:47 -03:00
Werner Almesberger
908f6c9c0f qpkg/TODO: list of to do items 2010-11-19 19:16:00 -03:00
Werner Almesberger
9b5480ab3e qpkg: merge identical versions in package databases
This avoids turning a prerequisite search into a massacre of, guessed,
O(sqrt(2^requisites)).

- gobble.c (gobble_buf, compact_pkg): if a package being added has the same
  version as an existing package with the same name, merge them and keep
  only one
2010-11-19 16:27:55 -03:00
Werner Almesberger
0ca4751b77 qpkg: some cleanup, prerequisite search speedup
With the reduction of search depth, "prereq abiword" takes about 3 minutes
on my PC. (Obviously, this can still be improved.)

- gobble.c (gobble_buf): if pkg->id->value is NULL, just it as such
- prereq.c (push): abort if trying to consider a package already considered
  or installed
- prereq.c (conflicts): before being satisfied with using an installed
  package, make sure it really satisfies the requirement
- prereq.c (conflicts): abort if an installed package conflicts
- prereq.c (conflicts): added some debugging output (temporary)
- prereq.c (conflicts): cut the search if we can't do better than a
  previous match
2010-11-19 15:26:24 -03:00
Werner Almesberger
fe14aa01d5 qpkg/prereq.c (resolve): simplify requisites chaining logic
Tried to keep next_dep at the beginning, but that's actually unnecessary.
The historical background is that the dependency list pointer was
originally thought to point to the list currently being processes. But
since it's a list following it, we don't need to maintain the original
order.
2010-11-19 14:25:33 -03:00
Werner Almesberger
c90fcba126 qpkg/qpkg.c (main): show usage if there are no arguments or any options 2010-11-19 14:21:55 -03:00
Werner Almesberger
43b9dc1972 qpkg/: initial commit (sneak preview only, doesn't work properly yet) 2010-11-19 14:00:15 -03:00