1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-14 07:43:06 +00:00

Fix a regression that made some plist errors non fatal

Reported by:	antoine
This commit is contained in:
Baptiste Daroussin 2014-10-07 06:53:49 +00:00
parent 49d7530b56
commit 3a885f4283
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=370273
2 changed files with 32 additions and 1 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= pkg
DISTVERSION= 1.3.8
PORTREVISION= 2
PORTREVISION= 3
_PKG_VERSION= ${DISTVERSION}
CATEGORIES= ports-mgmt
MASTER_SITES= \

View File

@ -0,0 +1,31 @@
diff --git libpkg/pkg_ports.c libpkg/pkg_ports.c
index 33a29d0..21182b4 100644
--- libpkg/pkg_ports.c
+++ libpkg/pkg_ports.c
@@ -1141,7 +1141,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;
@@ -1162,6 +1162,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);
@@ -1185,7 +1187,7 @@ ports_parse_plist(struct pkg *pkg, const char *plist, const char *stage)
plist_free(pplist);
- return (ret);
+ return (rc);
}
int