Bug#795573: mergechanges: option to strip all binary packages

2015-08-15 Thread Ansgar Burchardt
Package: devscripts
Version: 2.15.8
Severity: wishlist
File: /usr/bin/mergechanges

mergechanges recently got an option to strip arch-dep packages from
the .changes. It would be nice if there was also an option to remove
*all* binary packages from the .changes, keeping only the source.

Ansgar



Bug#795573: mergechanges: option to strip all binary packages

2015-08-15 Thread Ansgar Burchardt
Control: tag -1 + patch

Ansgar Burchardt ans...@debian.org writes:
 mergechanges recently got an option to strip arch-dep packages from
 the .changes. It would be nice if there was also an option to remove
 *all* binary packages from the .changes, keeping only the source.

The attached patch seems to work for me. It also fixes a bug that
prevented showing the usage message (use cat EOT instead of echo
EOT).

Ansgar
27c27
 echo Usage: $PROGNAME [-h|--help|--version] [-d] [-i|--indep] [-f] file1 file2 [file ...]
---
 echo Usage: $PROGNAME [-h|--help|--version] [-d] [-S|--source] [-i|--indep] [-f] file1 file2 [file ...]
32c32
 echo EOT
---
 cat EOT
37c37,38
   are included in the output.
---
   are included in the output.
   If -S is given, only the source package is included in the output.
54c55,56
 INDEP_ONLY=0
---
 REMOVE_ARCHDEP=0
 REMOVE_INDEP=0
75c77
 	INDEP_ONLY=1
---
 	REMOVE_ARCHDEP=1
77a80,84
 -S|--source)
 REMOVE_ARCHDEP=1
 REMOVE_INDEP=1
 shift
 ;;
107c114
 if test ${INDEP_ONLY} = 1; then
---
 if test ${REMOVE_ARCHDEP} = 1; then
109a117,119
 if test ${REMOVE_INDEP} = 1; then
 ARCHS=$(echo $ARCHS | grep -vxF all)
 fi
115c125
 if test ${INDEP_ONLY} = 1; then
---
 if test ${REMOVE_ARCHDEP} = 1 -o ${REMOVE_INDEP} = 1; then
118,119c128,129
 (*.dsc|*.diff.gz|*.tar.*|*_all.deb|*_all.udeb)
 # source or architecture-independent
---
 (*.dsc|*.diff.gz|*.tar.*)
 # source
121a132,137
 (*_all.deb|*_all.udeb)
 # architecture-indep
 if test ${REMOVE_INDEP} = 0; then
 echo $line
 fi
 ;;
123c139,142
 # architecture-specific, ignore
---
 # architecture-specific
 if test ${REMOVE_ARCHDEP} = 0; then
 echo $line
 fi


Bug#795573: mergechanges: option to strip all binary packages

2015-08-15 Thread gregor herrmann
On Sat, 15 Aug 2015 15:13:40 +0200, Ansgar Burchardt wrote:

 The attached patch seems to work for me. 

FWIW: For me too.
Just used it; thanks Ansgar.

Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT  SPI, fellow of the Free Software Foundation Europe
   `-   


signature.asc
Description: Digital Signature