Bug 175985 - [PATCH] Improve send-pr(1)
Summary: [PATCH] Improve send-pr(1)
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: gnu (show other bugs)
Version: 9.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-09 14:00 UTC by Christoph Mallon
Modified: 2016-06-01 20:46 UTC (History)
2 users (show)

See Also:


Attachments
0001-send-pr-Do-not-delete-lines-starting-with-Subject.patch (969 bytes, patch)
2013-02-09 14:00 UTC, Christoph Mallon
no flags Details | Diff
0003-send-pr-Allow-attaching-files-via-followed-by-file-n.patch (2.13 KB, patch)
2013-02-09 14:00 UTC, Christoph Mallon
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Mallon 2013-02-09 14:00:00 UTC
- Do not delete lines starting with Subject:.
  They are most probably part of a attached git patch.
- Recognize an empty file as a not filled out PR, too.
- Allow attaching files via -- followed by file names.

Fix: Please apply the patches.

	

From 1aef69d088167180c2c9e7c7abc55d256afc59db Mon Sep 17 00:00:00 2001
From: Christoph Mallon <christoph.mallon@gmx.de>
Date: Thu, 7 Feb 2013 15:31:48 +0100
Subject: [PATCH 2/3] send-pr: Recognize an empty file as a not filled out PR,
 too.

---
 gnu/usr.bin/send-pr/send-pr.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/usr.bin/send-pr/send-pr.sh b/gnu/usr.bin/send-pr/send-pr.sh
index cafab61..c009a18 100644
--- a/gnu/usr.bin/send-pr/send-pr.sh
+++ b/gnu/usr.bin/send-pr/send-pr.sh
@@ -393,7 +393,7 @@ __EOF__
   chmod u+w $TEMP
   eval $EDIT $TEMP
 
-  if cmp -s $REF $TEMP ; then
+  if [ ! -s "$TEMP" ] || cmp -s $REF $TEMP ; then
     echo "$COMMAND: problem report not filled out, therefore not sent"
     xs=1; exit
   fi
-- 
1.8.1.3
--- 0002-send-pr-Recognize-an-empty-file-as-a-not-filled-out-.patch ends here ---
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2013-02-15 18:25:30 UTC
On 9 February 2013 08:50, Christoph Mallon <christoph.mallon@gmx.de> wrote:

I have not yet looked at the code.

>>Description:
> - Do not delete lines starting with Subject:.
>   They are most probably part of a attached git patch.

This is probably fine, but I am curious why they were removed in the
past.  How does GNATS actually treat the subject line?

> - Recognize an empty file as a not filled out PR, too.

This is fine with me.
> - Allow attaching files via -- followed by file names.

This is fine with me.

-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams
Comment 2 Christoph Mallon 2013-02-16 07:04:16 UTC
On 15.02.2013 19:25, Eitan Adler wrote:
> On 9 February 2013 08:50, Christoph Mallon <christoph.mallon@gmx.de> wrote:
> 
> I have not yet looked at the code.
> 
>>> Description:
>> - Do not delete lines starting with Subject:.
>>   They are most probably part of a attached git patch.
> 
> This is probably fine, but I am curious why they were removed in the
> past.  How does GNATS actually treat the subject line?

There is no Subject line in the PR template presented to the user.
After the user finishes filling out the PR template, send-pr adds a Subject line with a copy of the Synopsis.
I guess, GNATS shows the Subject just like any other field.
send-pr ensures, that Subject and Synopsis are the same (Have a look at some random PRs).

>> - Recognize an empty file as a not filled out PR, too.
> 
> This is fine with me.
>> - Allow attaching files via -- followed by file names.
> 
> This is fine with me.

I also have another patch, which adds a dummy file after each file.
GNATS does not recognize every other file.
This works around the problem.
The proper solution would be to correct the problem in GNATS.

	Christoph
Comment 3 Pedro F. Giffuni freebsd_committer freebsd_triage 2016-06-01 20:46:40 UTC
send-pr doesn't exist on any supported system:

$ send-pr

FreeBSD has migrated away from GNATS for tracking bugs, and so send-pr
is no longer used for submitting bug reports.
Please see https://www.freebsd.org/support.html for more information.