From c7426963b7437c4b06daabbab942eb6cc5073adb Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Sun, 6 May 2012 23:26:37 +0000 Subject: [PATCH] debian: overrides some irrelevant lintian warnings --- debian/.gitignore | 1 + debian/bootstrap.sh | 67 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/debian/.gitignore b/debian/.gitignore index 777b48dd70..437658053c 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -10,6 +10,7 @@ /freeswitch-conf-*.install /freeswitch-music-*.install /freeswitch-sounds-*.install +/*.lintian-overrides /*.log /*.substvars /*.debhelper diff --git a/debian/bootstrap.sh b/debian/bootstrap.sh index bc82e64289..a91e1f0ead 100755 --- a/debian/bootstrap.sh +++ b/debian/bootstrap.sh @@ -487,6 +487,39 @@ print_mod_install () { EOF } +print_common_overrides () { + m="$1" + cat <> $f } +genoverrides_per_mod () { + local f=freeswitch-${module_name//_/-}.lintian-overrides + (print_edit_warning; print_mod_overrides freeswitch-${module_name//_/-}) > $f + test -f $f.tmpl && cat $f.tmpl >> $f +} + genmodules_per_cat () { echo "## $category" >> modules_.conf } @@ -574,17 +613,25 @@ genmodules_per_mod () { genconf () { print_conf_control >> control - local f=freeswitch-conf-${conf//_/-}.install + local p=freeswitch-conf-${conf//_/-} + local f=$p.install (print_edit_warning; print_conf_install) > $f test -f $f.tmpl && cat $f.tmpl >> $f + local f=$p.lintian-overrides + (print_edit_warning; print_conf_overrides "$p") > $f + test -f $f.tmpl && cat $f.tmpl >> $f } genmusic () { rate="$1" rate_k="${rate%%000}k" print_music_control >> control - local f=freeswitch-music-default-${rate_k}.install + local p=freeswitch-music-default-${rate_k} + local f=$p.install (print_edit_warning; print_music_install) > $f test -f $f.tmpl && cat $f.tmpl >> $f + local f=$p.lintian-overrides + (print_edit_warning; print_music_overrides "$p") > $f + test -f $f.tmpl && cat $f.tmpl >> $f unset rate rate_k } @@ -594,9 +641,13 @@ gensound () { country=$(echo $sound | cut -d/ -f2) speaker=$(echo $sound | cut -d/ -f3) print_sound_control >> control - local f=freeswitch-sounds-${sound//\//-}-${rate_k}.install + local p=freeswitch-sounds-${sound//\//-}-${rate_k} + local f=$p.install (print_edit_warning; print_sound_install) > $f test -f $f.tmpl && cat $f.tmpl >> $f + local f=$p.lintian-overrides + (print_edit_warning; print_sound_overrides "$p") > $f + test -f $f.tmpl && cat $f.tmpl >> $f unset rate rate_k sound sound_path language country speaker } @@ -752,6 +803,14 @@ map_confs 'genconf' (echo "### modules"; echo) >> control map_modules "mod_filter" \ "gencontrol_per_cat genmodules_per_cat" \ - "gencontrol_per_mod geninstall_per_mod genmodules_per_mod" + "gencontrol_per_mod geninstall_per_mod genoverrides_per_mod genmodules_per_mod" + +grep -e '^Package:' control | while xread l; do + m="${l#*: }" + f=$m.lintian-overrides + if [ ! -s $f ] || ! grep -e 'package-has-long-file-name' $f >/dev/null; then + (print_edit_warning; print_common_overrides "$m") >> $f + fi +done touch .stamp-bootstrap