Package: quilt
Version: 0.46-8.1
Severity: wishlist
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, 

intensively using quilt for Debian packages and trying to adopt the DEP-3 Patch
Tagging Guidelines for my patches, I often get to go on http://dep.debian.net/
to find the correct fields.

The proposed patch adds a --dep3 option to "quilt -e header" that adds a
template feeded to $EDITOR iff the header is empty. The template contains all
fields and documents them, with indications of required/optional.

With the "really soon now" adoption of 3.0 source packages, quilt will become
more and more used and this small patch (which only _adds_ an option, so
nothing mandatory) makes it easier to adopt DEP-3 headers in patches.

Best regards, 

OdyX

- -- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (750, 'unstable'), (700, 'testing-proposed-updates'), (700, 
'testing'), (90, 'experimental'), (50, 'testing-proposed-updates'), (50, 
'experimental'), (50, 'unstable'), (50, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_CH.UTF-8, LC_CTYPE=fr_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages quilt depends on:
ii  bzip2                         1.0.5-3    high-quality block-sorting file co
ii  diffstat                      1.47-1     produces graph of changes introduc
ii  gettext                       0.17-7     GNU Internationalization utilities
ii  patch                         2.5.9-5    Apply a diff file to an original

quilt recommends no packages.

Versions of packages quilt suggests:
ii  graphviz                     2.20.2-3+b4 rich set of graph drawing tools
ii  procmail                     3.22-16     Versatile e-mail processor

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10rc1 (GNU/Linux)

iJwEAQECAAYFAkqSjrcACgkQ884eR6Y9JhSdagP/cfehSTJbvVbGUNyGumceAisY
MqDkcvMS/MDwjHtL8PxLroUUBjN3UWJ5QYKq/Efi+1N2zk+Ov8/uUtH2h3oQ6z+/
wv1ZcL2my7F2Rwxdu5KNrRc9t5cpXbr9HRcRyWjA8ZYaZ75HikeYvbEEa7AQKCw6
zbr5Ea4lSpQ4o3DBGZY=
=lrkb
-----END PGP SIGNATURE-----
Description: Adds the --dep3 option to include a DEP-3 template in the header.
Origin:      vendor
Author:      Didier Raboud <[email protected]>
Last-Update: 2009-08-24
Index: quilt-0.46/quilt/header.in
===================================================================
--- quilt-0.46.orig/quilt/header.in     2009-08-24 14:39:14.000000000 +0200
+++ quilt-0.46/quilt/header.in  2009-08-24 14:42:25.000000000 +0200
@@ -21,7 +21,7 @@
 
 usage()
 {
-       printf $"Usage: quilt header [-a|-r|-e] [--backup] [--strip-diffstat] 
[--strip-trailing-whitespace] [patch]\n"
+       printf $"Usage: quilt header [-a|-r|-e] [--backup] [--dep3] 
[--strip-diffstat] [--strip-trailing-whitespace] [patch]\n"
 
        if [ x$1 = x-h ]
        then
@@ -41,6 +41,10 @@
 
 --backup
        Create a backup copy of the old version of a patch as patch~.
+
+--dep3
+       When editing (-e), insert a template with DEP-3 headers.
+       DEP-3 is http://dep.debian.net/deps/dep3/ Patch Tagging Guidelines.
 " "$EDITOR"
                exit 0
        else
@@ -92,6 +96,9 @@
        --backup)
                QUILT_BACKUP=1
                shift ;;
+       --dep3)
+               opt_use_dep3_headers=1
+               shift ;;
        --strip-diffstat)
                opt_strip_diffstat=1
                shift ;;
@@ -147,6 +154,19 @@
                fi
        ) > $tmp
 
+        # If triggered and file is empty, cat dep-3 headers into it
+       if [ -n "$opt_use_dep3_headers" -a ! -s $tmp ]
+       then
+               ( echo "Description: <Description of the patch (can span 
multiple lines) - required>"
+                 echo "Origin:      <{upstream,backport,vendor,other} [URL] - 
required except if Author is present>"
+                 echo "Bug-<Vendor>:<URL to the bug. Use Bug: for upstream 
bugs and Bug-Debian: for Debian bugs - optional>"
+                 echo "Forwarded:   <URL where the patch has been forwarded - 
optional>"
+                 echo "Author:      <Name and email of the patch author - 
optional>"
+                 echo "Reviewed-by: <Name and email of the patch reviewers - 
optional>"
+                 echo "Last-Update: <YYYY-MM-DD - optional>"
+                ) > $tmp
+        fi
+
        if [ -n "$opt_edit" ]
        then
                LANG=$ORIGINAL_LANG $EDITOR "$tmp" || exit 1

Reply via email to