readnews bug yielding "line too long" message
H.B.Braude
hbb at hou5a.UUCP
Thu Jan 3 03:56:44 AEST 1985
A problem that can occur under readnews B 2.10 of 5/3/83 is
related to the way records are kept in the user's .newsrc file.
Due to some unknown technical difficulties, hou5a had gaps
between the article names stored in it's spool directory under
the newsgroup net.sources. What this means is that there may have
been articles whose filenames were 131, 132, 138, 146, 147, etc
in the spool directory (please notice that the numbers are not
all consecutive.)
Evidently, readnews noticed the missing values and recorded the
inconsitency in my .newsrc file. The way it recorded it was to
start a new sequence of read-article values by appending the new
set to the end of the net.sources line. In other words, a normal
entry may have appeared as "net.subject: 1-1700", but this entry
became "net.sources: 1-132, 138, 146-147." Each time a gap in the
filenames was found, a new appendage was generated.
This was ok when only a few gaps occurred, but evidently hou5a
has been getting a large number of these in net.sources, so the
length of that line in the .newsrc file grew very long. When the
line reached some limit, I received the error message "line too
long" when I tried to use readnews.
I exited immediately, not knowing the side-affects of such a
problem and attempted to solve the problem by editing the
.newsrc file. This was difficult because vi(1) also has a line
length limit and it refused to read in any more of the file after
it reached the offending line.
The way to fix this on the user level is to grep(1) the offending
line from the original .newsrc file and find out the last article
value. Then create a temporary file containing "newsgroup.name:
1-value." Next, split(1) the .newsrc file so that each file
is a single line. Then the file with the oversized entry can be
replaced with the one previously prepared. Finally, reassemble
the .newsrc file using cat(1) (eg: split(1) names files xaa, xab,
etc. To reassemble the file, just "cat x?? > .newsrc." Perhaps a
safer method would be to work on a copy of the .newsrc file, just
in case.
This is will get the .newsrc file back into shape, but the
problem of missing articles will still exist. That means the
whole process may have to be repeated in a few months if the
*real* problem isn't found and corrected.
--
Harlan B. Braude
{most "backbone" sites}!hou5a!hbb
More information about the Net.bugs
mailing list