Skip @pkgdep if there's no argument.

Submitted by:	pav
MFC after:	1 week
This commit is contained in:
Florent Thoumie 2009-05-19 14:26:41 +00:00
parent 05e605b764
commit aa33fa5a86
2 changed files with 5 additions and 1 deletions

View File

@ -105,7 +105,7 @@
* Version of the package tools - increase only when some
* functionality used by bsd.port.mk is changed, added or removed
*/
#define PKG_INSTALL_VERSION 20090106
#define PKG_INSTALL_VERSION 20090519
#define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf"
#define main(argc, argv) real_main(argc, argv)

View File

@ -285,6 +285,10 @@ read_plist(Package *pkg, FILE *fp)
}
if (*cp == '\0') {
cp = NULL;
if (cmd == PLIST_PKGDEP) {
warnx("corrupted record (pkgdep line without argument), ignoring");
cmd = FAIL;
}
goto bottom;
}
if (cmd == PLIST_COMMENT && sscanf(cp, "PKG_FORMAT_REVISION:%d.%d\n",