tag 356689 patch
thanks

On Mon, Mar 13, 2006 at 12:35:39PM -0500, pryzbyj wrote:
> On Mon, Mar 13, 2006 at 05:23:13PM +0000, Julian Gilbey wrote:
> > On Mon, Mar 13, 2006 at 10:15:30AM -0500, Justin Pryzby wrote:
> > > Package: devscripts
> > > Version: 2.9.15
> > > Severity: wishlist
> > > 
> > > I'd like to see a /u/s/d/devscripts/examples/dev-best-practices script
> > > which runs things like `rcalert`, `wnppalert` and `bts bugs from:
> > > tag=moreinfo`.  Stuff that a sane developer could want to know about,
> > > related to stuff they're actively involved in, only.  Are there any
> > > other tools whose output could reasonably be included in a once-a-week
> > > message generated by cron?
> > 
> > Sounds reasonable.
> > 
> > > Can I make `bts bugs` dump the html or formatted text?  I'll work on a
> > > 0th order approximation to the patch .. what do you think?
> > 
> > Would be useful, indeed.
> Attached now
Second attempt; this is probably nearly usable now (unless you insist
on rewriting it in perl :).  I don't know if there's any better way of
getting the maintainer info than $DEBEMAIL, and shipping this as an
example which must be modified to be useful.

Justin
#! /bin/sh
# dev-best-practice
# Best-practice information for Debian developers;
# intended to be run periodically as a cronjob;
# weekly: 0 2 * * 0 /usr/share/devscripts/examples/dev-best-practice
#
# Copyright (C) 2006 Justin Pryzby <[EMAIL PROTECTED]>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
set -e;

# Some randomization to avoid developers hammering the BTS sunday at
# 0200 local time.
if [ -z "$DEBUG" ]; then
        delay=`dd if=/dev/urandom bs=1 count=1 |hexdump -e '"%d"'`;
        sleep "${delay}m";
fi;

if [ ! -z "$DEBEMAIL" ]; then
        bts='http://bugs.debian.org';
        ddpo='http://qa.debian.org/developer.php';
        dehs='http://dehs.alioth.debian.org/maintainer.php';

        # FIXME: this is showing some extra, "archived" bugs..
        echo "Checking for your bugs tagged moreinfo:";
        lynx -dump "$bts/from:$DEBEMAIL&include=moreinfo" |\
         grep -E '^[[:space:]]*\* \[[[:digit:]]+\]#[[:digit:]]+' |\
         sed -e 's/^[^#]*//';

        echo;
        echo "Checking for opened WNPP bugs:";
        # See also: http://qa.debian.org/data/bts/wnpp_by_maint
        wget -qO- "$ddpo?wnpp=$DEBEMAIL" |\
         grep -Eo '#[[:digit:]]+:[^<]*'

        echo;
        echo "Checking for new upstream releases:";
        wget -qO- "$dehs?maint=$DEBEMAIL" |\
         grep Machine-readable: | cut -d: -f2 |\
         sed -e 's/-->.*//; s,N/A,,;';

        # echo;
        # echo "Checking for lintian warnings:";
        # http://qa.debian.org/data/lintian.log

        # echo;
        # echo "Checking for PTS todo items:"
fi;

echo;
echo "Checking for installed packages up for adoption or orphaned:"
wnpp-alert |sort |\
 sed -re 's/^([^[:space:]]*)[[:space:]]*([[:digit:]]*)/#\2: \1/';

echo;
echo "Checking for installed packages with release-critical bugs:"
rc-alert |sed -nre '/^Package:/,/^$/{ n; s/^Bug:[[:space:]]*/#/; N; 
s/\nTitle:[[:space:]]*/: /p; };'

Reply via email to