Update parsing of the ports INDEX file to accomodate some new

fields that got added to it recently-ish.  While here document
what each of the fields is based on discussion with portmgr@.

Patch from:     murray (slightly adapted)
MFC after:	1 day
This commit is contained in:
kensmith 2005-03-24 23:03:39 +00:00
parent 542b2a8123
commit f1944299a8

View File

@ -302,15 +302,15 @@ index_parse(FILE *fp, char *name, char *pathto, char *prefix, char *comment, cha
if (i <= 0)
return EOF;
cp = line;
cp += copy_to_sep(name, cp, '|');
cp += copy_to_sep(pathto, cp, '|');
cp += copy_to_sep(prefix, cp, '|');
cp += copy_to_sep(comment, cp, '|');
cp += copy_to_sep(descr, cp, '|');
cp += copy_to_sep(maint, cp, '|');
cp += copy_to_sep(cats, cp, '|');
cp += copy_to_sep(junk, cp, '|'); /* build deps - not used */
cp += copy_to_sep(rdeps, cp, '|');
cp += copy_to_sep(name, cp, '|'); /* package name */
cp += copy_to_sep(pathto, cp, '|'); /* ports directory */
cp += copy_to_sep(prefix, cp, '|'); /* prefix */
cp += copy_to_sep(comment, cp, '|'); /* comment */
cp += copy_to_sep(descr, cp, '|'); /* path to pkg-descr */
cp += copy_to_sep(maint, cp, '|'); /* maintainer */
cp += copy_to_sep(cats, cp, '|'); /* categories */
cp += copy_to_sep(junk, cp, '|'); /* build deps - not used */
cp += copy_to_sep(rdeps, cp, '|'); /* run deps */
if (index(cp, '|'))
cp += copy_to_sep(junk, cp, '|'); /* url - not used */
else {
@ -318,6 +318,12 @@ index_parse(FILE *fp, char *name, char *pathto, char *prefix, char *comment, cha
*volume = 0;
return 0;
}
if (index(cp, '|'))
cp += copy_to_sep(junk, cp, '|'); /* extract deps - not used */
if (index(cp, '|'))
cp += copy_to_sep(junk, cp, '|'); /* patch deps - not used */
if (index(cp, '|'))
cp += copy_to_sep(junk, cp, '|'); /* fetch deps - not used */
if (index(cp, '|'))
cp += copy_to_sep(volstr, cp, '|'); /* media volume */
else {