Support the new, extended INDEX format.

This commit is contained in:
Akinori MUSHA 2004-06-21 17:38:48 +00:00
parent 8c86deb0d4
commit 67b44cc4ca
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=111939
8 changed files with 80 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= portupgrade
PORTVERSION= 20040529
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \
${MASTER_SITE_LOCAL}

View file

@ -0,0 +1,19 @@
Index: lib/portinfo.rb
===================================================================
RCS file: /home/cvs/pkgtools/lib/portinfo.rb,v
retrieving revision 1.16
diff -u -r1.16 portinfo.rb
--- lib/portinfo.rb 8 Nov 2002 17:18:27 -0000 1.16
+++ lib/portinfo.rb 21 Jun 2004 17:36:11 -0000
@@ -17,9 +17,9 @@
line.is_a?(String) or raise ArgumentError,
"You must specify a one line text of port info."
- values = line.chomp.split(FIELD_SEPARATOR, NFIELDS)
+ values = line.chomp.split(FIELD_SEPARATOR)
- if values.size != NFIELDS || values[NFIELDS - 1].index(FIELD_SEPARATOR)
+ if values.size < NFIELDS || values[NFIELDS - 1].index(FIELD_SEPARATOR)
raise ArgumentError, "Port info line must consist of #{NFIELDS} fields."
end

View file

@ -7,6 +7,7 @@
PORTNAME= portupgrade
PORTVERSION= 20040529
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \
${MASTER_SITE_LOCAL}

View file

@ -0,0 +1,19 @@
Index: lib/portinfo.rb
===================================================================
RCS file: /home/cvs/pkgtools/lib/portinfo.rb,v
retrieving revision 1.16
diff -u -r1.16 portinfo.rb
--- lib/portinfo.rb 8 Nov 2002 17:18:27 -0000 1.16
+++ lib/portinfo.rb 21 Jun 2004 17:36:11 -0000
@@ -17,9 +17,9 @@
line.is_a?(String) or raise ArgumentError,
"You must specify a one line text of port info."
- values = line.chomp.split(FIELD_SEPARATOR, NFIELDS)
+ values = line.chomp.split(FIELD_SEPARATOR)
- if values.size != NFIELDS || values[NFIELDS - 1].index(FIELD_SEPARATOR)
+ if values.size < NFIELDS || values[NFIELDS - 1].index(FIELD_SEPARATOR)
raise ArgumentError, "Port info line must consist of #{NFIELDS} fields."
end

View file

@ -7,6 +7,7 @@
PORTNAME= portupgrade
PORTVERSION= 20040529
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \
${MASTER_SITE_LOCAL}

View file

@ -0,0 +1,19 @@
Index: lib/portinfo.rb
===================================================================
RCS file: /home/cvs/pkgtools/lib/portinfo.rb,v
retrieving revision 1.16
diff -u -r1.16 portinfo.rb
--- lib/portinfo.rb 8 Nov 2002 17:18:27 -0000 1.16
+++ lib/portinfo.rb 21 Jun 2004 17:36:11 -0000
@@ -17,9 +17,9 @@
line.is_a?(String) or raise ArgumentError,
"You must specify a one line text of port info."
- values = line.chomp.split(FIELD_SEPARATOR, NFIELDS)
+ values = line.chomp.split(FIELD_SEPARATOR)
- if values.size != NFIELDS || values[NFIELDS - 1].index(FIELD_SEPARATOR)
+ if values.size < NFIELDS || values[NFIELDS - 1].index(FIELD_SEPARATOR)
raise ArgumentError, "Port info line must consist of #{NFIELDS} fields."
end

View file

@ -7,6 +7,7 @@
PORTNAME= portupgrade
PORTVERSION= 20040529
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \
${MASTER_SITE_LOCAL}

View file

@ -0,0 +1,19 @@
Index: lib/portinfo.rb
===================================================================
RCS file: /home/cvs/pkgtools/lib/portinfo.rb,v
retrieving revision 1.16
diff -u -r1.16 portinfo.rb
--- lib/portinfo.rb 8 Nov 2002 17:18:27 -0000 1.16
+++ lib/portinfo.rb 21 Jun 2004 17:36:11 -0000
@@ -17,9 +17,9 @@
line.is_a?(String) or raise ArgumentError,
"You must specify a one line text of port info."
- values = line.chomp.split(FIELD_SEPARATOR, NFIELDS)
+ values = line.chomp.split(FIELD_SEPARATOR)
- if values.size != NFIELDS || values[NFIELDS - 1].index(FIELD_SEPARATOR)
+ if values.size < NFIELDS || values[NFIELDS - 1].index(FIELD_SEPARATOR)
raise ArgumentError, "Port info line must consist of #{NFIELDS} fields."
end