Date:2010-11-21 12:26:02 (13 years 4 months ago)
Author:Werner Almesberger
Commit:5a0444fd7ed8d4a6342949f009d7a6ab6144b7bd
Message:qpkg/prereq.c (prereq): removed confused false error avoidance

The original idea was to just copy "stack" (now called "installed") to
"best" when done. In this case, "best" would remain NULL if "install"
had no entries, which would then be interpreted as a failure to resolve
the prerequisites.

However, since we allocate a new list for "best" anyway, this concern
no longer exists, and we can also get rid of the contorted mechanism
that was designed to work around this problem. (It was never put into
action because I wanted to make a regression test for it first.)

- prereq.c (prereq): removed commented-out and nonsensical avoidance of
false error
- test/prereq: added test case with no prerequisite
Files: qpkg/prereq.c (1 diff)
qpkg/test/prereq (1 diff)

Change Details

qpkg/prereq.c
227227        .next = NULL
228228    };
229229
230#if 0
231    /* make sure we don't return NULL if all dependencies are met */
232    if (!installs) {
233        installs = alloc_type(struct pkg *);
234        install_max = 1;
235    }
236#endif
237230    /* @@@ make list of pre-existing conflicts */
238231    resolve(&deps, NULL, NULL);
239232    free(installs);
qpkg/test/prereq
33
44###############################################################################
55
6qpkg "no prereq for new package" prereq foo <<EOF
7Package: foo
8Version: 0
9Architecture: test
10Filename: foo_0_test.ipkg
11EOF
12expect <<EOF
13EOF
14
15###############################################################################
16
617qpkg "new prereq for new package" prereq foo <<EOF
718Package: bar
819Version: 1

Archive Download the corresponding diff file

Branches:
master



interactive