mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2025-04-21 12:27:27 +03:00
qpkg: turn pkg->installed into pkg->flags, allowing for future expansion
- 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
This commit is contained in:
@@ -125,7 +125,7 @@ static void push(struct pkg *pkg)
|
||||
|
||||
}
|
||||
stack[n_stack++] = pkg;
|
||||
assert(!pkg->mark && !pkg->installed);
|
||||
assert(!pkg->mark && !(pkg->flags & QPKG_INSTALLED));
|
||||
pkg->mark = 1;
|
||||
}
|
||||
|
||||
@@ -197,12 +197,12 @@ fprintf(stderr, "%.*s %p", ID2S(pkg->id), pkg);
|
||||
if (pkg->version)
|
||||
fprintf(stderr, " %.*s", ID2S(pkg->version));
|
||||
if (pkg->mark) fprintf(stderr, " +");
|
||||
if (pkg->installed) fprintf(stderr, " ***");
|
||||
if (pkg->flags & QPKG_INSTALLED) fprintf(stderr, " ***");
|
||||
fprintf(stderr, "\n");
|
||||
#endif
|
||||
if (!satisfies(pkg, dep))
|
||||
continue;
|
||||
if (pkg->installed || pkg->mark) {
|
||||
if ((pkg->flags & QPKG_INSTALLED) || pkg->mark) {
|
||||
assert(!conflicts(pkg, conf));
|
||||
resolve(next_dep, dep->next, conf);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user