Update test-patches to work with a single patch series

svn path=/dists/sid/linux/; revision=19073
This commit is contained in:
Ben Hutchings 2012-06-03 22:19:13 +00:00
parent 578818c7a6
commit 3ee4eff851
1 changed files with 10 additions and 7 deletions

View File

@ -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