- 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
- 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
- gobble.c (gobble_buf): list_with_version reversed the order of the list
items. It makes the behaviour of later algorithms more intuitive if we
maintain the file order.
- gobble.c (compact_pkg, gobble_buf): renamed compact_pkg to finish_pkg
- gobble.c (finish_pkg): check that the package has a version
- gobble.c (finish_pkg): check that the package has an architecture
- gobble.c (finish_pkg): check that the package either has a file name or
is installed
- 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
- id.h, id.c (make_id): return a "struct jrb *", so that we have access to
key and value
- gobble.c (ID, gobble_buf): adapt to above change
- gobble.c (compact_pkg, gobble_buf): keep the RB node reference instead
of awkwardly regenerating it via pkg->id->jrb
- qpkg.h (enum flags, struct pkg): replaced "installed" with "flags", one
of them being QPKG_INSTALLED
- gobble.c (compact_pkg, gobble_buf), prereq.c (push, resolve): adapted
for above change
- Makefile: added automatic dependenceies (needs SHELL = /bin/bash)
- Makefile: added non-verbose builds
- Makefile (jlime): set CC_normal instead of CC, so that also cross-builds
can be non-verbose
- Makefile (openwrt): new target to cross-compile for OpenWRT with uClibc
- Makefile (spotless): added "spotless" target
- gobble.c: uClibc may not have posix_madvise, so replace it with a dummy
if building for uClibc
If the package database is sane, then we don't need to check that all
the field names match what we expect. This saves a few more CPU cycles.
However, if anything goes wrong, the consequences may be unpleasant.
Thus, we default to the slow but safe approach.
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
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