1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-15 14:45:19 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
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
bbf9c42bc8 qpkg: move "struct pkg" and its allocation from gobble.c and qpkg.h to pkg.[hc]
- Makefile (OBJS_qpkg): added pkg.o
- gobble.c (gobble_buf): moved "struct pkg" allocation to function new_pkg
  in pkg.c
- qpkg.h: moved "struct pkg" and subordinate structures to pkg.h
- pkg.h, pkg.c (new_pkg, free_pkg): provide package structure definition,
  allocation, and deallocation
- fixup.c, gobble.c, prereq.c, qpkg.c: include "pkg.h"
- gobble.c (finish_pkg): use free_pkg instead of just "free" to avoid
  leaking memory
2010-11-22 16:19:32 -03:00
Werner Almesberger
c05e6d5dbb qpkg: sort package version list such that highest comes first
- Makefile (OBJS_qpkg): added fixup.o
- fixup.h, fixup.c (sort_versions): sort package versions
- qpkg.c (do_fixups, main): do fixups when done gobbling
- qpkg.h: need to include id.h to be self-contained
- test/sortver: test version sorting
2010-11-21 22:57:35 -03:00
Werner Almesberger
b0c29c4d7a qpkg: improve "qpkg ... list"
- qpkg.c (list_all_packages): jrb indicates end-of-tree with pointer to
  jrb_nil(), not NULL
- qpkg.c (list_all_packages, list_one_package): use ID2PF
- qpkg.c (list_all_packages): iterate over versions
2010-11-21 22:50:42 -03:00
Werner Almesberger
a0c0e854cc qpkg: option -d to enable debugging at run time, and some cleanup
- prereq.c: added section titles
- prereq.c (debug), qpkg.h, qpkg.c: made variable "debug" global and moved
  it to qpkg.c
- qpkg.c (usage, main): new option -d to enable debugging
2010-11-21 20:55:25 -03:00
Werner Almesberger
89223833f1 qpkg/qpkg.c: tighten detection of inconsistent use of Filename:
- qpkg/qpkg.c (find_prereq): instead of skipping nameless prerequisites,
  assert that these packages have a name
2010-11-21 08:19:28 -03:00
Werner Almesberger
f14c041e51 qpkg: record Architecture: tag
- qpkg.h (struct pkg): added "arch" field for the architecture
- gobble.c (gobble_buf): record the architecture
- gobble.c (gobble_buf): fail if trying to set the file name twice
- qpkg.c (main): initialize trees before doing anything else, so that the
  argument processing stays together
2010-11-21 03:53:19 -03:00
Werner Almesberger
7058115a64 qpkg: towards "struct id" without jrb reference - change iteration and lookup
- id.h, id.c (first_id, next_id): removed
- qpkg.c (list_all_packages): use jrb_first/jrb_next instead of
  first_id/next_id
- id.h, id.c (find_id): return the RB tree node instead of the ID
- qpkg.c (list_one_package, find_prereq): adapted for above change
- id.h: explain the role of key and value
2010-11-21 03:11:54 -03:00
Werner Almesberger
3d1ef02aba qpkg: added copyright headers and changed name to emphasize speediness
- Makefile, gobble.h, gobble.c, id.h, id.c, prereq.h, prereq.c, qpkg.h,
  qpkg.c, rbtest.c: added copyright header
- id.c: include jrb.h (for completeness)
- README: change name from "Query package databases" to "Quick package
  database query"
2010-11-20 07:29:18 -03:00
Werner Almesberger
64c70e77f4 qpkg: use "val" field of jrb nodes instead of keeping one in "struct id"
- id.h (struct id), id.c (make_id): remove field "value"
- gobble.c (compact_pkg, gobble_buf), prereq.c (list_all_packages,
  list_one_package, find_prereq): use id->jrb->val instead of id->value
2010-11-19 22:02:42 -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