Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix a regression where plist error can be non fatal
Baptiste Daroussin committed 11 years ago
commit 320d012ec252b9a0e0b2aec9173c050cef61d5c4
parent 6a9e0f1
1 file changed +4 -2
modified libpkg/pkg_ports.c
@@ -1100,7 +1100,7 @@ int
ports_parse_plist(struct pkg *pkg, const char *plist, const char *stage)
{
	char *line = NULL;
-
	int ret = EPKG_OK;
+
	int ret, rc = EPKG_OK;
	struct plist *pplist;
	FILE *plist_f;
	size_t linecap = 0;
@@ -1121,6 +1121,8 @@ ports_parse_plist(struct pkg *pkg, const char *plist, const char *stage)
		if (line[linelen - 1] == '\n')
			line[linelen - 1] = '\0';
		ret = plist_parse_line(pkg, pplist, line);
+
		if (rc == EPKG_OK)
+
			rc = ret;
	}

	free(line);
@@ -1144,7 +1146,7 @@ ports_parse_plist(struct pkg *pkg, const char *plist, const char *stage)

	plist_free(pplist);

-
	return (ret);
+
	return (rc);
}

int