Werner's Miscellanea
Sign in or create your account | Project List | Help
Werner's Miscellanea Commit Details
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 | ||
---|---|---|
227 | 227 | .next = NULL |
228 | 228 | }; |
229 | 229 | |
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 | |
237 | 230 | /* @@@ make list of pre-existing conflicts */ |
238 | 231 | resolve(&deps, NULL, NULL); |
239 | 232 | free(installs); |
qpkg/test/prereq | ||
---|---|---|
3 | 3 | |
4 | 4 | ############################################################################### |
5 | 5 | |
6 | qpkg "no prereq for new package" prereq foo <<EOF | |
7 | Package: foo | |
8 | Version: 0 | |
9 | Architecture: test | |
10 | Filename: foo_0_test.ipkg | |
11 | EOF | |
12 | expect <<EOF | |
13 | EOF | |
14 | ||
15 | ############################################################################### | |
16 | ||
6 | 17 | qpkg "new prereq for new package" prereq foo <<EOF |
7 | 18 | Package: bar |
8 | 19 | Version: 1 |
Branches:
master