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:
parent
49d7530b56
commit
3a885f4283
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=370273
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= pkg
|
||||
DISTVERSION= 1.3.8
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
_PKG_VERSION= ${DISTVERSION}
|
||||
CATEGORIES= ports-mgmt
|
||||
MASTER_SITES= \
|
||||
|
31
ports-mgmt/pkg/files/patch-plist-non-fatal
Normal file
31
ports-mgmt/pkg/files/patch-plist-non-fatal
Normal 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
|
Loading…
Reference in New Issue
Block a user