[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: orphaned packages in DWN?



Hello,

On Wed, Dec 26, 2001 at 07:15:53PM +0100, Martin Schulze wrote:
> Sean Neakums wrote:
> > How about listing packages that are orphaned on DWN once, when it
> > happens, with a pointer to the full list of orphaned packages?
> > Something like:
> > 
> >   Three packages were orphaned this week: blah, blorp and foop,
> >   bringing the total to xxx.  Please see
> >   http://debian.org/wherever/the/list/lives for the full list.
> > 
> > seems suitable for a user-oriented newsletter.
> 
> You are invited to provide such information on a regular basis
> phrased similar to the recently added packages item.
> 
> That's not said to stop you.

Getting the information is really easy:

there are these "Work-needing packages report for ..." posts
to debian-devel-announce, which contain all necessary information.
Seemingly it can even be extracted automatically: if I feed
the message "Work-needing packages report for Dec 21, 2001"
into the following AWK script

    #! /usr/bin/awk -f
    /^Total number of orphaned packages: / { total=$NF }
    /^The following packages are orphaned:$/ { active=1; count=0; }
    /^The following packages are up for adoption:$/ { active=0 }
    /^\[NEW\] [^ ]* \(/ {
      if (! active) next;
      count = count + 1;
      packages[count] = $2;
    }
    END {
      if (count == 0) {
	print "No packages were orphaned this week,";
	printf "leaving %d orphaned packages.  Please see\n", total
      } else {
	if (count == 1) {
	  printf "One package was orphaned this week: %s,\n", packages[1];
	} else if (count == 2) {
	  printf "Two packages were orphaned this week: %s and %s,\n",
	    packages[1], packages[2];
	} else {
	  printf "%d packages were orphaned this week: %s",
	    count, packages[1];
	  for (i=2; i<count; ++i) printf ", %s", packages[i];
	  printf ", and %s,\n", packages[count];
	}
	printf "bringing the total to %d.  Please see\n", total
      }
      printf "http://www.debian.org/devel/wnpp/ for the full list.\n"
    }

I get

    Two packages were orphaned this week: kdoc and ssh-nonfree,
    bringing the total to 106.  Please see
    http://www.debian.org/devel/wnpp/ for the full list.

Maybe this could even be used in conjunction with procmail.

Jochen
-- 
                                         Omm
                                      (0)-(0)
http://www.mathematik.uni-kl.de/~wwwstoch/voss/privat.html

Attachment: pgpOyJkbfIwIW.pgp
Description: PGP signature


Reply to: