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

Bug#377282: mail to pkg@PTS not delivered to maintainer by default



On Tue, 17 Jul 2007, martin f krafft wrote:
>   1. iterates all packages and extracts sourcepkg:maintainer pairs

The "Sources" files are already downloaded regularly as part of the web
interface. You might be able to simply read the data in
www/incoming/Sources_unstable_{main,contrib,non-free}.

>   2. checks whether maintainer is subscribed to sourcepkg@pts
>      a. if no, subscribe the maintainer, thereby getting contact on
>         by default.

Yes.

>      b. if yes, checks whether the contact keyword is present for
>         the sourcepkg:maintainer pair
>         i) if no, adds the contact keyword to the pair.
> 
> From what I understand, the PTS works in two stages for this: if
> mail is received at sourcepkg_contact@pts, it obtains the list of
> subscribers (bin/dump.pl) and for each subscriber then checks
> whether 'contact' is in the tag set returned by bin/dump-tags.pl
> for maintainer@add.re.ss#sourcepkg or maintainer@add.re.ss.

Yes except that if "maintainer@add.re.ss#sourcepkg" is present, then only
this set of tags is used and the set associated to the email only is not
used. If none of the two tag entries exist, then it uses the hardcoded
default set of tags.

Just use the get_tags($email, $package) function provided by
perl/common.pl and you'll have the current list of keywords. 

> If the tag is present in either set, then I need not do anything.

If the tag is returned by get_tags, then do nothing.

> If the tag is not present in either set, and
> maintainer@add.re.ss#sourcepkg does not yet exist, copy
> maintainer@add.re.ss to maintainer@add.re.ss#sourcepkg and add the
> tag.

If the tag is not returned by get_tags, then you add the tag in the first
entry that exists:
- maintainer@add.re.ss#sourcepkg
- maintainer@add.re.ss

If none of the entry exist, then you're in serious trouble as the tag is
in the hardcoded default tag list ... and thus you shouldn't be in the "if
tag is not returned". :-)

> Does this sound like a reasonable strategy?

Yes.

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/



Reply to: