From 761199540f80827b5735148008ffcb3b35e5c49f Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Wed, 22 Sep 2010 21:02:01 -0400 Subject: [PATCH] Reimplement nd_backport in terms of backport-dsc --- debian/neurodebian-dev.install | 2 ++ tools/nd_backport | 58 ++++++++-------------------------- 2 files changed, 16 insertions(+), 44 deletions(-) diff --git a/debian/neurodebian-dev.install b/debian/neurodebian-dev.install index 37fd893..bf8987c 100644 --- a/debian/neurodebian-dev.install +++ b/debian/neurodebian-dev.install @@ -1,4 +1,6 @@ tools/backport-dsc usr/bin/ +tools/nd_querycfg usr/bin/ +tools/nd_backport usr/bin/ neurodebian.cfg /etc/neurodebian/ pkgs usr/share/neurodebian/ sphinx usr/share/neurodebian/ diff --git a/tools/nd_backport b/tools/nd_backport index 3392d65..4304707 100755 --- a/tools/nd_backport +++ b/tools/nd_backport @@ -1,19 +1,19 @@ #!/bin/bash +# +# Simple frontend for backport-dsc to do it the NeuroDebian way +# + +set -e +set -u release=$1 dscfile=$2 -set -e - if [ -z "$release" ]; then echo "You need to provide a distribution codename (e.g. 'lenny', 'squeeze')." exit 1 fi - -set -e -set -u - if [ -z "$2" ]; then cat << EOT Script to backport a source package to some target release. @@ -27,41 +27,11 @@ EOT exit 1 fi -. /home/neurodebian/neurodebian.git/tools/nd_cmdsettings.sh - -DEBEMAIL="team@neuro.debian.net" -DEBFULLNAME="NeuroDebian Maintainers" -export DEBEMAIL DEBFULLNAME - -srcname=${dscfile%%_*} -srcversion=${dscfile#*_} -srcversion=${srcversion%%.dsc} -wdir=$(mktemp -d -t nd_backport.XXXXXX) -sdir=$wdir/${srcname}-${srcversion} - -echo "Source package name: $srcname" -echo "Source package version: $srcversion" -echo "Extracting source package to: $sdir" - -dpkg-source -x $dscfile $sdir - -echo "Backporting to: $release" - -changelog_entry="Backport of Debian package version $srcversion for \ -NeuroDebian. Problems with the backport should be reported to the -NeuroDebian maintainers and not to the original Debian maintainer." - -echo | debchange \ - --noconf --force-bad-version \ - -c $sdir/debian/changelog \ - -D ${release} \ - -b -l "~${release}.nd" \ - $changelog_entry - -bpversion=$(dpkg-parsechangelog -l$sdir/debian/changelog | egrep '^Version: ' | cut -d ' ' -f 2,2) -dpkg-source -b $sdir - -# cleanup -rm -rf $wdir - -echo ${srcname}_$bpversion.dsc +# 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 's/^Depends:.*$/&, neurodebian-trailer/' \ + "$dscfile" -- 2.39.2