[devscripts] 01/02: dd-list: Omit “Extra-Source-Only: yes” stanzas

James McCoy jamessan at debian.org
Sun Oct 4 20:37:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit cd3d879d8d4ba96030a31ea7511fb646fa1e2c57
Author: James McCoy <jamessan at debian.org>
Date:   Wed Sep 30 22:10:26 2015 -0400

    dd-list: Omit “Extra-Source-Only: yes” stanzas
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog     |  2 ++
 scripts/dd-list.pl   |  6 +++++
 test/dd-list/sources | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 test/test_dd-list    | 12 ++++++---
 4 files changed, 86 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2ad4794..0962080 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,6 +37,8 @@ devscripts (2.15.9) UNRELEASED; urgency=medium
   * wrap-and-sort:
     + Avoid modifying an empty file.  Thanks to Chris Lamb for the patch.
       (Closes: #789579)
+  * dd-list:
+    + Omit information from stanzas with “Extra-Source-Only: yes”.
 
   [ Dominique Dumont ]
   * licensecheck:
diff --git a/scripts/dd-list.pl b/scripts/dd-list.pl
index bb97302..547d71e 100755
--- a/scripts/dd-list.pl
+++ b/scripts/dd-list.pl
@@ -110,6 +110,12 @@ sub parsefh
     while (<$fh>) {
 	my ($package, $source, $binaries, $maintainer, @uploaders);
 
+	# These source packages are only kept around because of stale binaries
+	# on old archs or due to Built-Using relationships.
+	if (/^Extra-Source-Only:\s+yes/m) {
+	    next;
+	}
+
 	# Binary is shown in _source_Sources and contains all binaries produced by
 	# that source package
 	if (/^Binary:\s+(.*(?:\n .*)*)$/m) {
diff --git a/test/dd-list/sources b/test/dd-list/sources
index 1075361..15735bf 100644
--- a/test/dd-list/sources
+++ b/test/dd-list/sources
@@ -26,3 +26,72 @@ Homepage: http://www.vim.org/
 Directory: pool/main/v/vim
 Priority: source
 Section: editors
+
+Package: bzip2
+Binary: libbz2-1.0, libbz2-dev, bzip2, bzip2-doc
+Version: 1.0.6-7
+Maintainer: Anibal Monsalve Salazar <anibal at debian.org>
+Uploaders: Santiago Ruano Rincón <santiago at debian.org>, Jorge Ernesto Guevara Cuenca <jguevara at debiancolombia.org>
+Build-Depends: gcc-multilib [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc] | gcc-4.1 (<< 4.1.2) [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc], dpkg-dev (>= 1.16.0), debhelper (>= 9), dh-exec
+Build-Depends-Indep: texinfo
+Architecture: any all
+Standards-Version: 3.9.5
+Format: 3.0 (quilt)
+Files:
+ d4850752a3386592ae416b3fd6fc2c3a 2261 bzip2_1.0.6-7.dsc
+ 2a1df12bd405cc86790291797673753c 708737 bzip2_1.0.6.orig.tar.bz2
+ 3bc252d3eb0a16a4f5950fac8deb7bb1 59542 bzip2_1.0.6-7.debian.tar.bz2
+Vcs-Browser: http://git.debian.org/?p=collab-maint/bzip2.git
+Vcs-Git: git://git.debian.org/collab-maint/bzip2.git
+Checksums-Sha1:
+ f970fefd8f7cb4a02ec74d3ecc21c31068201b5c 2261 bzip2_1.0.6-7.dsc
+ 3725a0554fa6bb654ef2728fef36bc06aed4e388 708737 bzip2_1.0.6.orig.tar.bz2
+ e5169afbee8f9ee603c253e03421364819a14c12 59542 bzip2_1.0.6-7.debian.tar.bz2
+Checksums-Sha256:
+ 098b7e38d1d634fc361847602bf85753dadeca121b9531f6dba2614b16e0637c 2261 bzip2_1.0.6-7.dsc
+ d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7 708737 bzip2_1.0.6.orig.tar.bz2
+ 17e030ccb2908d15553c1510869e09d8ef41b5f8e72c7c65d1d5503396a5bd3a 59542 bzip2_1.0.6-7.debian.tar.bz2
+Homepage: http://www.bzip.org/
+Package-List: 
+ bzip2 deb utils standard arch=any
+ bzip2-doc deb doc optional arch=all
+ libbz2-1.0 deb libs important arch=any
+ libbz2-dev deb libdevel optional arch=any
+Extra-Source-Only: yes
+Directory: pool/main/b/bzip2
+Priority: source
+Section: utils
+
+Package: bzip2
+Binary: libbz2-1.0, libbz2-dev, bzip2, bzip2-doc
+Version: 1.0.6-8
+Maintainer: Anibal Monsalve Salazar <anibal at debian.org>
+Uploaders: Santiago Ruano Rincón <santiago at debian.org>
+Build-Depends: dpkg-dev (>= 1.16.0), debhelper (>= 9), dh-exec
+Build-Depends-Indep: texinfo
+Architecture: any all
+Standards-Version: 3.9.6
+Format: 3.0 (quilt)
+Files:
+ 7709d3c0a7715bf4f61cc74adc10ee5a 2042 bzip2_1.0.6-8.dsc
+ 2a1df12bd405cc86790291797673753c 708737 bzip2_1.0.6.orig.tar.bz2
+ 72b1174a04f96b62c1f50391c8f41488 59494 bzip2_1.0.6-8.debian.tar.bz2
+Vcs-Browser: http://git.debian.org/?p=collab-maint/bzip2.git
+Vcs-Git: git://git.debian.org/collab-maint/bzip2.git
+Checksums-Sha1:
+ 8bb35859d49d012e1464db621e740e1702a5ad14 2042 bzip2_1.0.6-8.dsc
+ 3725a0554fa6bb654ef2728fef36bc06aed4e388 708737 bzip2_1.0.6.orig.tar.bz2
+ 78c527bdc6eb5727b79d401ebf3ddf2b175af91f 59494 bzip2_1.0.6-8.debian.tar.bz2
+Checksums-Sha256:
+ 46df0e8112487065532829f2340ffd6ca64d46b6ab01b0000694751d3e67fb11 2042 bzip2_1.0.6-8.dsc
+ d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7 708737 bzip2_1.0.6.orig.tar.bz2
+ 60fe87fd3942c385e5921786255a27daf9a962ebc7301a60dfd8d1e1a5c8ce78 59494 bzip2_1.0.6-8.debian.tar.bz2
+Homepage: http://www.bzip.org/
+Package-List: 
+ bzip2 deb utils standard arch=any
+ bzip2-doc deb doc optional arch=all
+ libbz2-1.0 deb libs important arch=any
+ libbz2-dev deb libdevel optional arch=any
+Directory: pool/main/b/bzip2
+Priority: source
+Section: utils
diff --git a/test/test_dd-list b/test/test_dd-list
index e9619ac..efca316 100755
--- a/test/test_dd-list
+++ b/test/test_dd-list
@@ -15,19 +15,25 @@
 # You should have received a copy of the GNU General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
+WORKDIR="$(readlink -f "${0%/*}")"
+
 if test "$1" = --installed; then
     COMMAND=dd-list
     shift
 else
-    COMMAND="../scripts/dd-list.pl"
+    COMMAND="$WORKDIR/../scripts/dd-list.pl"
 fi
 
-WORKDIR="$(readlink -f "${0%/*}")"
-
 testBinariesFromSameSource() {
   $COMMAND -s ${WORKDIR}/dd-list/sources vim-gtk vim-nox 2>&1 >/dev/null
   rc=$?
   assertEquals 'packages found' 0 $rc
 }
 
+testExtraSourceOnlyIgnored() {
+  $COMMAND -s ${WORKDIR}/dd-list/sources bzip2 >$SHUNIT_TMPDIR/extra-source.out
+
+  assertFalse 'Jorge listed as uploader' "grep -q Jorge $SHUNIT_TMPDIR/extra-source.out"
+}
+
 . shunit2

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list