From 3ee4eff85174dfd67a285d980d22c24fada6d5b2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 3 Jun 2012 22:19:13 +0000 Subject: [PATCH] Update test-patches to work with a single patch series svn path=/dists/sid/linux/; revision=19073 --- debian/bin/test-patches | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/debian/bin/test-patches b/debian/bin/test-patches index 53e08c87a..ae3d7ebb7 100755 --- a/debian/bin/test-patches +++ b/debian/bin/test-patches @@ -56,10 +56,10 @@ if [ "${version%a~test}" = "$version" ]; then fi restrictfeature= -series="${version##*-}" -if [ "$featureset" != none ]; then - restrictfeature=" featureset=$featureset" - series="${series}-extra" +if [ "$featureset" = none ]; then + series="series-all" +else + series="series-${featureset}" fi # Copy all patches into a new directory @@ -67,10 +67,13 @@ rm -rf debian/patches/test/ mkdir debian/patches/test cp -t debian/patches/test/ "$@" -# Generate patch series for the new version ->debian/patches/series/"$series" +# Try to clean up any test patches on exit, but also do it now just in case +sed -i '/^+ test\//d' debian/patches/"$series" +trap "sed -i '/^+ test\//d' debian/patches/\"$series\"" EXIT + +# Append to patch series for patch in "$@"; do - echo "+ test/$(basename "$patch")${restrictfeature}" >>debian/patches/series/"$series" + echo "+ test/$(basename "$patch")" >>debian/patches/"$series" done # Regenerate control and included rules