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 [EMAIL PROTECTED] > 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 [EMAIL PROTECTED], 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 [EMAIL PROTECTED] or [EMAIL PROTECTED] Yes except that if "[EMAIL PROTECTED]" 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 > [EMAIL PROTECTED] does not yet exist, copy > [EMAIL PROTECTED] to [EMAIL PROTECTED] and add the > tag. If the tag is not returned by get_tags, then you add the tag in the first entry that exists: - [EMAIL PROTECTED] - [EMAIL PROTECTED] 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/