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

Bug#985727: reportbug: Include temp filename in resume message



Package: reportbug
Version: 7.10.3
Severity: wishlist
Tags: patch

Hi!

Right now we have this in reportbug:

=====
(...)
Report will be sent to Debian Bug Tracking System <submit@bugs.debian.org>
Submit this report on reportbug (e to edit) [y|n|a|c|E|i|l|m|p|q|d|t|?]? q
Saving a backup of the report at /tmp/reportbug-reportbug-backup-20210322152508-0y4gcuye
Bug report written to /tmp/reportbug-reportbug-20210322152405-lg_io06p
Hint: You can resume an unsent report using reportbug -r TEMPFILE
Thank you for using reportbug
=====

But we could have TEMPFILE replaced by it's proper value:

=====
(...)
Report will be sent to Debian Bug Tracking System <submit@bugs.debian.org>
Submit this report on reportbug (e to edit) [y|n|a|c|E|i|l|m|p|q|d|t|?]? q
Saving a backup of the report at /tmp/reportbug-reportbug-backup-20210322154048-ya0gfvgt
Bug report written to /tmp/reportbug-reportbug-20210322153953-pf6cdu5s
Hint: You can resume an unsent report using:
  reportbug -r /tmp/reportbug-reportbug-20210322153953-pf6cdu5s
Thank you for using reportbug
=====

A possible patch is attached.

Thank you!

Best regards,
Nelson

-- Package-specific info:
** Environment settings:
DEBEMAIL="naoliv@gmail.com"
INTERFACE="text"

** /home/naoliv/.reportbugrc:
reportbug_version "3.25"
mode advanced
ui text
no-cc
header "X-Debbugs-CC: naoliv@gmail.com"

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-4-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), LANGUAGE=pt_BR:pt:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages reportbug depends on:
ii  apt                2.3.0
ii  python3            3.9.2-2
ii  python3-reportbug  7.10.3
ii  sensible-utils     0.0.14

reportbug recommends no packages.

Versions of packages reportbug suggests:
pn  claws-mail                  <none>
pn  debconf-utils               <none>
pn  debsums                     <none>
pn  dlocate                     <none>
ii  dma [mail-transport-agent]  0.13-1
pn  emacs-bin-common            <none>
ii  file                        1:5.39-3
ii  gnupg                       2.2.27-1
pn  python3-urwid               <none>
pn  reportbug-gtk               <none>
ii  xdg-utils                   1.1.3-4

Versions of packages python3-reportbug depends on:
ii  apt                2.3.0
ii  file               1:5.39-3
ii  python3            3.9.2-2
ii  python3-apt        2.1.7
ii  python3-debian     0.1.39
ii  python3-debianbts  3.1.0
ii  python3-requests   2.25.1+dfsg-2
ii  sensible-utils     0.0.14

python3-reportbug suggests no packages.

-- no debconf information
diff -ur reportbug-7.10.3/reportbug/submit.py reportbug-7.10.3-new/reportbug/submit.py
--- reportbug-7.10.3/reportbug/submit.py	2021-01-24 08:55:25.000000000 -0300
+++ reportbug-7.10.3-new/reportbug/submit.py	2021-03-22 15:40:38.373659270 -0300
@@ -405,7 +405,8 @@
                     fh.close()
 
                     ui.long_message(f'Wrote bug report to {msgname}\n'
-                            'Hint: You can resume an unsent report using reportbug -r TEMPFILE')
+                            'Hint: You can resume an unsent report using:\n'
+                            f'  reportbug -r {msgname}')
         # Handle when some recipients are refused.
         if refused:
             for (addr, err) in refused.items():
@@ -416,14 +417,16 @@
             fh.close()
 
             ui.long_message(f'Wrote bug report to {msgname}\n'
-                    'Hint: You can resume an unsent report using reportbug -r TEMPFILE')
+                    'Hint: You can resume an unsent report using:\n'
+                    f'  reportbug -r {msgname}')
     else:
         try:
             pipe.write(message)
             pipe.flush()
             if msgname:
                 ui.long_message(f'Bug report written to {msgname}\n'
-                        'Hint: You can resume an unsent report using reportbug -r TEMPFILE')
+                        'Hint: You can resume an unsent report using:\n'
+                        f'  reportbug -r {msgname}')
         except IOError:
             failed = True
             pipe.close()
@@ -435,7 +438,8 @@
             fh.close()
             ui.long_message('Error: send/write operation failed, bug report '
                             f'saved to {msgname}\n'
-                            'Hint: You can resume an unsent report using reportbug -r TEMPFILE')
+                            'Hint: You can resume an unsent report using:\n'
+                            f'  reportbug -r {msgname}')
 
     if mua:
         ewrite("Spawning %s...\n", mua.executable)

Reply to: