1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-15 13:56:22 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
Werner Almesberger
6a3e471304 qpkg: added some field names and relational operators from Ubuntu
- gobble.c (gobble_buf): recognize (and ignore) the following fields:
  Bugs, Installed-Size, MD5sum, Origin, Original-Maintainer, SHA1, SHA256,
  Task.
- pkg.h (enum relop): added comments showing the respective symbol
- pkg.h (enum relop): added rel_gg (>>), rel_le (<=), and rel_ll (<<)
- gobble.c (gobble_buf): recognize >>, <=, and <<
- TODO: record progress in support beyond Jlime/OE
2010-11-22 22:48:28 -03:00
Werner Almesberger
c95d064f9e qpkg/TODO: some open policy questions (cyclic dependencies and use of Provides) 2010-11-22 20:27:49 -03:00
Werner Almesberger
9d208dd855 qpkg: added parsing and recording of Provides data
- pkg.h (enum flags): new flags QPKG_PROVIDED to indicate that the
  package is only a provision, not an installable package
- fixup.h, fixup.c (complete_provisions): search for provisions that do
  not have a real package associated with them, create a package for
  them, and mark it as QPKG_PROVIDED
- qpkg.c (do_fixups): invoke complete_provisions
- pkg.h (struct pkg): add list of (virtual or real) packages a given
  package provides
- pkg.c (new_pkg): initialize pkg->provides
- pkg.c (free_pkg): deallocate pkg->provides
- gobble.c (gobble_buf): parse the list of packages a package provides
- TODO: updated status of Provides support
2010-11-22 19:30:09 -03:00
Werner Almesberger
8d453d77c2 qpkg: test for the QPKG_ADDING leakage bug
- test/bug-adding: test if we get a false cyclic dependency because
  QPKG_ADDING isn't properly removed
- TODO: mention the problem
2010-11-22 09:28:34 -03:00
Werner Almesberger
c44510ade1 qpkg: detect conflicts with installed packages
- prereq.c (installed_conflicts, free_conflicts, prereq): collect list of
  pre-existing conflicts in installed packages
- prereq.c (prereq): check if package being requested already conflicts
- test/instconf: regression test for conflicts with installed packages
- TODO: updated for full support of conflicts. Mention that we're not
  terribly efficient with handling conflicts.
2010-11-21 23:59:27 -03:00
Werner Almesberger
be31904f5d qpkg: adding handling of conflicts (in progress)
- prereq.c (conflicts): detect conflicts
- prereq.c (prereq): pass list of conflicts of initial package
- test/conflict: regression test for basic conflict handling
- TODO: updated for partial implementation of conflicts
2010-11-21 23:24:44 -03:00
Werner Almesberger
b181db5b9e qpkg: regression test for version preference
- test/verpref: test version preference (higher wins if there's a choice)
- TODO: updated for above change
2010-11-21 23:02:10 -03:00
Werner Almesberger
0bc4b6046b qpkg: added detection of cyclic dependencies
We define a cyclic dependency as the possibility (!) of the prerequisites
of a package X including a package that depends on X, and issue an error
if encountering such a situation.

Note that, if the dependencies of X can be resolved in a manner that does
not include the cyclic dependency, qpkg will still fail if it encounters
the cycle. Also note that qpkg (at least so far) does no perform an
exhaustive search to ferret out cyclic dependencies.

Furthermore, we don't consider that a cyclic dependency may not necessarily
imply a real life problem. E.g., if a package A contains elements X and
Y, with X needing package B, and the content of package B has a run-time
dependency on Y, the cyclic dependency between A and B would not exist
when considering its constituents. Since we don't have this information, we
just err on the side of caution.

- qpkg.h (enum flags): divide flags into categories (parse-time and
  run-time) and add flag QPKG_ADDING to mark packets whose dependencies we
  are processing
- prereq.c (resolve, prereq): track which packages we're tentatively
  considering for installation and detect cyclic dependencies
- test/cyclic: regression test for detection of cyclic dependencies
- TODO: updated with recent changes
2010-11-21 20:31:20 -03:00
Werner Almesberger
07a4422641 qpkg/TODO: cleanup and added new task for consideration
- TODO: added section for tasks done
- TODO: search tree optimization is done
- TODO: added idea of supporting other database formats in the same family
2010-11-20 07:18:44 -03:00
Werner Almesberger
03c5e4ffe7 qpkg: optimize duplicate lookup when inserting a new name
- jrb.h, jrb.c (jrb_find_or_insert): new function to look for a node and
  to insert a new one if not found
- id.c (make_id): use jrb_find_or_insert to avoid looking up new nodes
  twice
- TODO: report the improvement
2010-11-19 22:20:15 -03:00
Werner Almesberger
e1814ce372 qpkg: converted dumb binary trees to red-black trees (in progress)
This is a change of the underlying mechanism but it's not polished or
optimized yet. The compare functions haven't been updated, so they work
but produce compiler warnings because of type mismatches.

- Makefile (OBJS): added jrb.o
- id.h, id.c: use jrb instead of own dumb binary trees
- TODO: brag about the efficiency improvement
2010-11-19 21:53:38 -03:00
Werner Almesberger
908f6c9c0f qpkg/TODO: list of to do items 2010-11-19 19:16:00 -03:00