X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tools%2Fnd_backport;h=b91b54a3d54e60780ed9b73de1b3286e71256d4f;hb=HEAD;hp=19b49541c4250dd894c62e13aac0b2497e8334d7;hpb=b42d5904d7aac6d279a6f81deb1c99fd3b42cdfb;p=neurodebian.git diff --git a/tools/nd_backport b/tools/nd_backport index 19b4954..b91b54a 100755 --- a/tools/nd_backport +++ b/tools/nd_backport @@ -4,7 +4,6 @@ # set -e -set -u release=$1 dscfile=$2 @@ -27,13 +26,23 @@ EOT exit 1 fi +set -u + +upstream_name=${dscfile%%_*} + +# To overcome bash desire to claim empty array unbound under 'set -u' +# above, lets just specify empty rule for sed when nothing to be done +mod_control="" +if [ "$upstream_name" != "neurodebian" ]; then + # Avoid injection into neurodebian package itself + mod_control='s/\(^Depends:\) */\1 neurodebian-popularity-contest, /g' +fi + # assemble an appropriate backport-dsc call backport-dsc \ --maint-name "NeuroDebian Maintainers" \ --maint-email "team@neuro.debian.net" \ --target-distribution "$release" \ --version-suffix "$(nd_querycfg "release backport ids" "$release")" \ + --mod-control "$mod_control" \ "$dscfile" - -# not adding the auto-dep for now -# --mod-control 's/^Depends:.*$/&, neurodebian-trailer/' \