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

[SCM] Debian package checker branch, master, updated. 2.5.0-rc3-27-gf7a16b7



The following commit has been merged in the master branch:
commit ab9383cfc905fcde324091b523c0ffcda755f756
Author: David Bremner <bremner@debian.org>
Date:   Sun Dec 19 11:01:57 2010 -0400

    checks/debian-source-dir: add check for exporting from d/s/git-patches
    
    If debian/source/git-patches exists, read debian/patches/series, and
    see if the first line matches a comment emitted by the relevant gitpkg
    hook.
    
    Rationale: version 0.17 of gitpkg adds the ability to export arbitrary
    ranges of git commits as quilt patches. This exporting is optional,
    and this check is intended to warn a user who accidentaly fails to
    enable it.

diff --git a/checks/debian-source-dir b/checks/debian-source-dir
index 85fea44..5a3e442 100644
--- a/checks/debian-source-dir
+++ b/checks/debian-source-dir
@@ -47,6 +47,25 @@ if (-e 'debfiles/source/format') {
     tag 'missing-debian-source-format';
 }
 
+if (-s 'debfiles/source/git-patches') {
+    open (GITPATCHES, 'debfiles/source/git-patches')
+	or fail("cannot open debian/source/git-patches: $!");
+    if (grep !/^\s*+#|^\s*+$/o, <GITPATCHES>) {
+	if (! -r "debfiles/patches/series" ) {
+	    tag "git-patches-not-exported";
+	} else {
+	    open (DEBSERIES, 'debfiles/patches/series')
+		or fail("cannot open debian/patches/series: $!");
+	    my $comment_line = <DEBSERIES>;
+	    my $count = grep !/^\s*+\#|^\s*+$/o, <DEBSERIES>;
+	    tag "git-patches-not-exported"
+		unless ($count && ($comment_line =~ m/^\s*\#.*quilt-patches-deb-export-hook/o));
+	    close(DEBSERIES);
+	}
+    }
+    close(GITPATCHES);
+}
+
 if (-d 'debfiles/source') {
     opendir(DEBSRC, 'debfiles/source') or fail("cannot opendir debian/source/: $!");
     my $file;
diff --git a/checks/debian-source-dir.desc b/checks/debian-source-dir.desc
index 199f717..0bf4b9e 100644
--- a/checks/debian-source-dir.desc
+++ b/checks/debian-source-dir.desc
@@ -50,3 +50,16 @@ Info: The source package contains a file in debian/source/ that lintian
  files. If that's not the case and if the file can be legitimately be
  expected in source packages, please file a bug against lintian asking
  for the file to be recognized.
+
+Tag: git-patches-not-exported
+Severity: important
+Certainty: possible
+Info: The source package contains non-empty debian/source/git-patches,
+ which indicates it was intended to have patches exported via the
+ quilt-patches-deb-export-hook of gitpkg. It seems the patches
+ were exported in this source package.
+ .
+ This tag is generated by building the source package without gitpkg (or
+ with a misconfigured gitpkg) and without manually exporting the patches.
+ See the above mentioned hook file (in /usr/share/gitpkg/hooks) for
+ information on how to manually export patches.

-- 
Debian package checker


Reply to: