[news.admin] Annoying problem with rn

peter@na.excelan.com (Peter Tran) (11/14/89)

Hi,
I am running a very annoying problem with "rn" (Bnews 2.11.18).
Everytime I got into "rn" it asked if I wanted to add such and
such newsgroups. Is there a way to control it? It theoretically
should ask me once, and If I don't want to subscribe to these
newsgroups, it should not ask me again.

Could any news guru give me any advise on how to fix this?

Thanks in advance,
peter 
Internet: peter@na.excelan.COM 

news@uhura.cc.rochester.edu (Network News) (11/15/89)

In article <739@excelan.COM> peter@na.excelan.com (Peter Tran) writes:
>Hi,
>I am running a very annoying problem with "rn" (Bnews 2.11.18).
>Everytime I got into "rn" it asked if I wanted to add such and
>such newsgroups. Is there a way to control it? It theoretically
>should ask me once, and If I don't want to subscribe to these
>newsgroups, it should not ask me again.
>
>Could any news guru give me any advise on how to fix this?

	B 2.11 news (as we, and apparently you, have it configured) doesn't
create the directory for the news group until the first article hits your
system.  Rn objects to this and after finding the first news group in your
.newsrc file that doesn't have a corresponding directory goes "berserk".  Talk
to your news administrator.  I found it easiest to write a shell script that
creates the directory along with creating the news group.  This will prevent
the problem you are seeing.

eps@toaster.SFSU.EDU (Eric P. Scott) (11/15/89)

In article <4044@ur-cc.UUCP> news@uhura.cc.rochester.edu (Network News) writes:
>	B 2.11 news (as we, and apparently you, have it configured) doesn't
>create the directory for the news group until the first article hits your
>system.  Rn objects to this and after finding the first news group in your
>.newsrc file that doesn't have a corresponding directory goes "berserk".  Talk
>to your news administrator.  I found it easiest to write a shell script that
>creates the directory along with creating the news group.  This will prevent
>the problem you are seeing.

Which version of rn are you running?  We use PL 40 and it
certainly does not "go berserk" on empty directories.  It outputs
a message saying the group has no spool directory, and marks it
as read (which really doesn't do anything significant).

In any case, this is NOT the source of the problem described--in
the latest (um, about 2 year old) version of rn.  The problem is
that the user has groups in active that are not in his .newsrc.
"Pilot error."

					-=EPS=-

allbery@NCoast.ORG (Brandon S. Allbery) (11/17/89)

As quoted from <124@toaster.SFSU.EDU> by eps@toaster.SFSU.EDU (Eric P. Scott):
+---------------
| In any case, this is NOT the source of the problem described--in
| the latest (um, about 2 year old) version of rn.  The problem is
| that the user has groups in active that are not in his .newsrc.
| "Pilot error."
+---------------

Pardon me, but by default rn does *not* add new groups to a user's .newsrc if
the user does not choose to subscribe to them.  Rn uses a separate file
(.rnsoft) to relate the contents of the active file to that of the .newsrc;
this can become out of step if a newsgroup is rmgroup'ed, which causes rn (on
ncoast, at least) to suddenly prompt with about 60 "new" newsgroups.  (When
ncoast expanded to a full newsfeed, I copied uunet:~ftp/news/active to get a
complete active file, which turns out to contain things like a bunch of
clari.all groups which we don't plan to receive here.  Someday I'll weed the
blasted things out.)

It'd be nice if rn could keep from losing its head after a rmgroup....

++Brandon
(P.S.  Steve J. and other ncoasters:  yes, *that's* why.)
-- 
Brandon S. Allbery    allbery@NCoast.ORG, BALLBERY (MCI Mail), ALLBERY (Delphi)
uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu bsa@telotech.uucp
*(comp.sources.misc mail to comp-sources-misc[-request]@backbone.site, please)*
*Third party vote-collection service: send mail to allbery@uunet.uu.net (ONLY)*
expnet.all: Experiments in *net management and organization.  Mail me for info.

fletcher@cs.utexas.edu (Fletcher Mattox) (11/19/89)

In article <1989Nov17.005615.4816@NCoast.ORG> allbery@ncoast.ORG (Brandon S. Allbery) writes:

>Pardon me, but by default rn does *not* add new groups to a user's .newsrc if
>the user does not choose to subscribe to them.  Rn uses a separate file
>(.rnsoft) to relate the contents of the active file to that of the .newsrc;
>this can become out of step if a newsgroup is rmgroup'ed, which causes rn (on
>ncoast, at least) to suddenly prompt with about 60 "new" newsgroups.  (When

I found this annoying too.  Rn notices that the size of the active
file (as recorded in .rnlast) has changed and then prompts you to
add every newsgroup which is in active but is not in .newsrc.

I arranged for rn to add (but unsubscribe) the newsgroup to .newsrc 
when you respond negatively to "Newsgroup %s not in .newsrc--add? [yn]".
That way you get asked once and only once.

*** /tmp/rcstuff.c	Sat Nov 18 11:23:45 1989
--- rcstuff.c	Tue May 30 23:21:41 1989
***************
*** 290,295
  	    goto reask_add;
  	}
  	else if (*buf == 'n' || *buf == 'q') {
  	    return FALSE;
  	}
  	else if (*buf == 'y') {

--- 290,296 -----
  	    goto reask_add;
  	}
  	else if (*buf == 'n' || *buf == 'q') {
+ 	    ng = add_newsgroup(ngname, '!');
  	    return FALSE;
  	}
  	else if (*buf == 'y') {
***************
*** 293,299
  	    return FALSE;
  	}
  	else if (*buf == 'y') {
! 	    ng = add_newsgroup(ngname);
  	    do_reloc = FALSE;
  	}
  	else {

--- 294,300 -----
  	    return FALSE;
  	}
  	else if (*buf == 'y') {
! 	    ng = add_newsgroup(ngname, ':');
  	    do_reloc = FALSE;
  	}
  	else {
***************
*** 359,366
  /* add a newsgroup to the .newsrc file (eventually) */
  
  NG_NUM
! add_newsgroup(ngn)
! char *ngn;
  {
      register NG_NUM newng = nextrcline++;
  					/* increment max rcline index */

--- 360,367 -----
  /* add a newsgroup to the .newsrc file (eventually) */
  
  NG_NUM
! add_newsgroup(ngn, c)
! char *ngn, c;
  {
      register NG_NUM newng = nextrcline++;
  					/* increment max rcline index */
***************
*** 369,375
      rcline[newng] = safemalloc((MEM_SIZE)(rcnums[newng] + 1));
      strcpy(rcline[newng],ngn);		/* and copy over the name */
      *(rcline[newng] + rcnums[newng]) = '\0';
!     rcchar[newng] = ':';		/* call it subscribed */
      toread[newng] = TR_NONE;	/* just for prettiness */
  #ifdef HASHNG
      sethash(newng);			/* so we can find it again */

--- 370,376 -----
      rcline[newng] = safemalloc((MEM_SIZE)(rcnums[newng] + 1));
      strcpy(rcline[newng],ngn);		/* and copy over the name */
      *(rcline[newng] + rcnums[newng]) = '\0';
!     rcchar[newng] = c;			/* subscribe or unsubscribe */
      toread[newng] = TR_NONE;	/* just for prettiness */
  #ifdef HASHNG
      sethash(newng);			/* so we can find it again */
***************
*** 375,381
      sethash(newng);			/* so we can find it again */
  #endif
  #ifdef RELOCATE
!     return relocate_newsgroup(newng,-1);
  #else
      return newng;
  #endif

--- 376,382 -----
      sethash(newng);			/* so we can find it again */
  #endif
  #ifdef RELOCATE
!     return c=='!' ? newng : relocate_newsgroup(newng,-1);
  #else
      return newng;
  #endif