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

Bug#692995: reportbug: unblock requests: set affects src:$PACKAGE and Cc: $PACKAGE@packages.d.o



Hi Debian release team,

In Debian bug #692995 it was proposed to set affects src:$PACKAGE
and XCC $PACKAGE@packages.d.o for release.d.o unblock bugs.

The reportbug team requested that the release team be contacted to find
out if they are OK with this change in reportbug behaviour.

In addition, I had prepared a patch doing this for all release.d.o
bugs, before I saw this existing unblock requests bug report and patch.

This would help maintainers and people reading the bugs web pages find
out about the unblock and other requests.

Would this be acceptable to you?

-- 
bye,
pabs

https://wiki.debian.org/PaulWise
From 1f8366ea32dc4792b06e6cc6f980916c05f4861e Mon Sep 17 00:00:00 2001
From: Paul Wise <pabs@debian.org>
Date: Sun, 28 Aug 2022 08:30:29 +0800
Subject: [PATCH] Notify packages of bugs against pseudo-packages that affect
 them

X-Debbugs-CC the @packages.debian.org address for the source package so that
the primary maintainer address and anyone subscribed to that address or to the
package itself will get a mail containing the bug report.

Also mark the bugs as affecting the source package, so that people who aren't
subscribed to the maintainer/package will notice the bug reports too.

Implements: https://bugs.debian.org/692995
Implements: https://bugs.debian.org/648185
---
 reportbug/debbugs.py | 13 +++++++++++--
 test/test_debbugs.py |  8 +++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/reportbug/debbugs.py b/reportbug/debbugs.py
index dd74aac..bba4efc 100644
--- a/reportbug/debbugs.py
+++ b/reportbug/debbugs.py
@@ -254,6 +254,11 @@ def check_package_info(package):
 
     return None
 
+def add_affects_package(info):
+    src_pkg = info[12] or package
+    pseudos.append('Control: affects -1 + src:%s' % src_pkg)
+    pseudos.append('X-Debbugs-Cc: %s@packages.debian.org' % src_pkg)
+    ui.log_message('Your report will be carbon-copied to the package maintainer.\n')
 
 def handle_debian_ftp(package, bts, ui, fromaddr, timeout, online=True, http_proxy=None):
     """
@@ -347,6 +352,8 @@ def handle_debian_ftp(package, bts, ui, fromaddr, timeout, online=True, http_pro
         else:
             section, priority = info[16], info[10]
 
+            add_affects_package(info)
+
     if tag == 'override':
         pseudos.append('User: ftp.debian.org@packages.debian.org')
         pseudos.append('Usertags: override')
@@ -593,6 +600,8 @@ def handle_debian_release(package, bts, ui, fromaddr, timeout, online=True, http
                        'n': 'Exit without filing a report.'})
             if cont == 'n':
                 sys.exit(1)
+        else:
+            add_affects_package(info)
 
     if tag in ('binnmu', 'unblock', stable_pu, oldstable_pu, 'rm'):
         if tag.endswith('-pu'):
@@ -951,6 +960,8 @@ def handle_wnpp(package, bts, ui, fromaddr, timeout, online=True, http_proxy=Non
             package = info[12] or package
             long_desc = info[13]
 
+            add_affects_package(info)
+
         if tag == 'O' and info and info[9] in \
                 ('required', 'important', 'standard'):
             severity = 'important'
@@ -971,8 +982,6 @@ def handle_wnpp(package, bts, ui, fromaddr, timeout, online=True, http_proxy=Non
                     'The package description is:\n') % (orphstr, package)
             body = body + long_desc + '\n'
 
-        pseudos.append(f'Control: affects -1 src:{package}')
-
     if short_desc:
         subject = '%s: %s -- %s' % (tag, package, short_desc)
     else:
diff --git a/test/test_debbugs.py b/test/test_debbugs.py
index 3e507f9..b5495e9 100644
--- a/test/test_debbugs.py
+++ b/test/test_debbugs.py
@@ -45,6 +45,8 @@ class TestSpecials(unittest.TestCase):
                 [
                     'User: ftp.debian.org@packages.debian.org',
                     'Usertags: remove',
+                    'Control: affects -1 + src:reportbug',
+                    'X-Debbugs-Cc: reportbug@packages.debian.org',
                 ],
                 '', False
             )
@@ -53,7 +55,11 @@ class TestSpecials(unittest.TestCase):
             debbugs.handle_debian_ftp('reportbug', '', MockUI('override', 'reportbug', 'utils', 'important', None), None, 60),
             (
                 'override: reportbug:utils/important', 'normal', [],
-                ['User: ftp.debian.org@packages.debian.org', 'Usertags: override', 'X-Debbugs-Cc: debian-boot@lists.debian.org'],
+                [
+                    'Control: affects -1 + src:reportbug',
+                    'X-Debbugs-Cc: reportbug@packages.debian.org',
+                    'X-Debbugs-Cc: debian-boot@lists.debian.org',
+                ],
                 '(Describe here the reason for this change)', False
             )
         )
-- 
2.37.2

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: