Link libpkg against libutil + make manifest parsing send a warning when it finds an unknown keyword. Add a test for that
modified libpkg/Makefile
@@ -38,6 +38,7 @@ LDADD+= -L${.CURDIR}/../external/sqlite \
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified libpkg/pkg_manifest.c
@@ -269,7 +269,7 @@ pkg_parse_manifest(struct pkg *pkg, char *buf)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -283,8 +283,10 @@ pkg_parse_manifest(struct pkg *pkg, char *buf)
|
|
|
|
|
|
| + | |
|
|
|
|
| + | |
|
|
|
|
|
@@ -295,6 +297,9 @@ pkg_parse_manifest(struct pkg *pkg, char *buf)
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
modified pkg/main.c
@@ -24,7 +24,7 @@ static struct commands {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified tests/manifest.c
@@ -28,6 +28,7 @@ char manifest[] = ""
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -47,6 +48,7 @@ char wrong_manifest1[] = ""
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -66,6 +68,7 @@ char wrong_manifest2[] = ""
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -85,6 +88,7 @@ char wrong_manifest3[] = ""
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -104,6 +108,7 @@ char wrong_manifest4[] = ""
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -123,6 +128,7 @@ char wrong_manifest5[] = ""
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -142,6 +148,25 @@ char wrong_manifest6[] = ""
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -292,6 +317,14 @@ START_TEST(parse_wrong_manifest6)
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -303,6 +336,7 @@ tcase_manifest(void)
|
|
|
|
|
|
| + | |
|
|
|
|
|