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

[script] Changing bug originator on reports with obsolete emails



On Thu, Oct 05, 2000 at 12:36:28PM +0200, Josip Rodin wrote:
> On Thu, Oct 05, 2000 at 10:54:02AM +0200, Adrian Bunk wrote:
> > > How difficult would it be to have all those addresses, (most of which
> > > do not even still refer to a valid mailbox, so I don't get a
> > > notification for those) all changed to the most current one ?
> > 
> > You don't need valid mailboxes to change the submitter address. You can
> > use the "reopen command of the BTS. From
> > http://www.debian.org/Bugs/server-control (Debian bug tracking system):
>
> IOW, write a mail to control@bugs.d.o with a lot of these:
> 
> close xyz
> reopen xyz Yann Dirson <the.one@true.address>
> close xyzw
> reopen xyzw Yann Dirson <the.one@true.address>
> ...
> thanks

I wrote a small script which generates such a list of close/reopen (or
reopen/close when the bug is already closed) from the by-submitter list.
You should insert the URLs for your old addresses in place of the dummy
ones, and the script produces those commands on stdout.

Then insert those in a mail with "From:" field set to your current email
address, send it to control@d.o and that's great.  180 bug reports with
dangling addresses updated in one shot.

Now if smbd wants to add regexp-based autofetching of those URLs to save a
bunch of manual searches and cut-and-pastes...

=====
#!/bin/sh

set -e

cd /tmp

echo "
http://master.debian.org/~cpbs/subs/f/foobar.html
http://master.debian.org/~cpbs/subs/b/bar.html
" | while read file
do
    [ "$file" ] || continue
    [ -r $(basename $file) ] || wget -q $file
    awk  '
BEGIN {closed=0}
/>Closed:</ {closed=1}
/>#([0-9]+) \[/ {
  match ($0, "#[0-9]+ \[");
  A=substr ($0,RSTART+1,RLENGTH-3);
  if (closed) { 
    print "reopen " A " !"; print "close " A
  } else {
    print "close " A; print "reopen " A " !"
  } }' < $(basename $file)
done 
=====

Hope this helps,
-- 
Yann Dirson    <ydirson@altern.org> |    Why make M$-Bill richer & richer ?
debian-email:   <dirson@debian.org> |   Support Debian GNU/Linux:
                                    | Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/             | Check <http://www.debian.org/>



Reply to: