[BACK]Return to patch-gnats_edit-pr.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / databases / gnats / patches

File: [cvs.NetBSD.org] / pkgsrc / databases / gnats / patches / patch-gnats_edit-pr.sh (download)

Revision 1.1, Sun Apr 19 19:35:00 2015 UTC (5 years, 3 months ago) by spz
Branch: MAIN
CVS Tags: pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, HEAD
Branch point for: pkgsrc-2015Q1

update to gnats 4.2.0

upstream Changes highlights:
 - GNU v3 license update
 - Buid now uses automake, and code has been adjusted to compile
   properly in various environments (tested with gcc 2.95, 3.4, 4.8,
   4.9, clang 3.1, 3.4, and several different versions of Linux,
   FreeBSD, Solaris, OS X)
 - New --global-databases-file command-line option for gnatsd and other programs
 - New host/port/user/passwd command-line options for send-pr
 - Many bugfixes, including:
 - FreeBSD-SA-05:20.cvsbug security advisory (affected send-pr)
 - Fixed PR#484: "send-pr --request-id" sends just a template
 - Fixed PR#501: Safer open/fopen for gen-index (no longer installing as suid)
 - Fixed PR#504: gnatsd crashes when trying to lock a nonexistent PR
 - Fixed PR#508: Emacs interface gnats-change-database fails when
   gnats-port isn't set
 - Fixed PR#691: Portability problem with sed and tr
 - Fixed PR#746: install-sid is a bash script (and not /bin/sh)
 - Fixed PR#767: edit-pr returns incorect exit status
 - Fixed PR#768: make install DESTDIR=/anywhere fails
 - Fixed PR#771: "EXPR" queries with spaces sometimes fail
 - Fixed PR#773: using responsible alias as email address for edit-pr
 - "invalid query format" bug for queries that included whitespace
 - edit-pr will now correctly exit with an error if it cannot lock the PR
 - edit-pr will now use the email alias in the responsibles field
 - Solaris 7/8/10 compilation fixed

$NetBSD: patch-gnats_edit-pr.sh,v 1.1 2015/04/19 19:35:00 spz Exp $

clean up temp files

--- gnats/edit-pr.sh.orig	2015-02-26 04:26:41.000000000 +0000
+++ gnats/edit-pr.sh
@@ -213,6 +213,7 @@ $VISUAL $new
 if cmp -s $new.old $new ; then
   echo "edit-pr: PR not changed"
   $PR_EDIT --unlock $pr_id
+  rm $new $new.old
   exit 0
 fi
 
@@ -239,6 +240,7 @@ while [ "$checking" != "" ]; do
         echo "PR $pr_id not updated: changed file is in $new.changed"
         mv $new $new.changed
 	$PR_EDIT --unlock $pr_id
+        rm $new $new.old
         exit 0
         ;;
     esac
@@ -269,6 +271,7 @@ done
 if [ -f $change_msg ]
 then
     cat $change_msg >> $new
+    rm $change_msg
 fi
 
 if email=`$QUERY_PR \
@@ -290,6 +293,7 @@ while true; do
 	echo "Edit successful"
 	# we need to unlock the PR
 	$PR_EDIT --unlock $pr_id
+        rm $new $new.old
 	exit 0
     else
 	echo "Problems with edit submission."
@@ -302,6 +306,7 @@ while true; do
 		echo "Cancelling edit.  Changed PR is in $new."
 		# we need to ulock the PR no matter what
 		$PR_EDIT --unlock $pr_id
+                rm $new.old
 		exit 1 ;;
 	    r*)
 		break ;;
@@ -312,6 +317,6 @@ while true; do
     done
 done
 
-rm -f $new
+rm -f $new $new.old
 
 exit 0