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