summaryrefslogtreecommitdiffstats
path: root/debian/bin/test-patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/bin/test-patches')
-rwxr-xr-xdebian/bin/test-patches34
1 files changed, 17 insertions, 17 deletions
diff --git a/debian/bin/test-patches b/debian/bin/test-patches
index a85369042d..bd14d57485 100755
--- a/debian/bin/test-patches
+++ b/debian/bin/test-patches
@@ -6,9 +6,9 @@ shopt -s extglob
# Set defaults from the running kernel
arch="$(dpkg --print-architecture)"
kernelabi="$(uname -r)"
-ff="${kernelabi#+([^-])-@(trunk|?(rc)+([0-9])|0.@(bpo|deb+([0-9])).+([0-9]))-}"
+ff="${kernelabi##+([^-])-?(@(trunk|?(rc)+([0-9])|0.@(bpo|deb+([0-9])).+([0-9]))-)}"
if [ "x$ff" != "x$kernelabi" ]; then
- flavour="${ff#@(openvz|rt|vserver|xen)-}"
+ flavour="${ff#rt-}"
if [ "x$flavour" != "x$ff" ]; then
featureset="${ff%-$flavour}"
else
@@ -97,23 +97,23 @@ mkdir $patchdir/test
# Prepare a new directory for the config; override ABI name, featuresets, flavours
rm -rf debian/config.local
-mkdir debian/config.local debian/config.local/"$arch" debian/config.local/"$arch"/"$featureset"
-cat >debian/config.local/defines <<EOF
+mkdir debian/config.local debian/config.local/"$arch"
+for other_fs in none rt; do
+ if [ "$other_fs" != "$featureset" ]; then
+ cat >debian/config.local/defines.toml <<EOF
+[[featureset]]
+name = '$other_fs'
+enable = false
EOF
-cat >debian/config.local/"$arch"/defines <<EOF
-[base]
-featuresets: $featureset
-EOF
-cat >debian/config.local/"$arch"/"$featureset"/defines <<EOF
-[base]
-flavours: $flavour
-EOF
-if [ "$featureset" = none ]; then
- # default-flavour must refer to a flavour that's enabled
- cat >>debian/config.local/"$arch"/"$featureset"/defines <<EOF
-default-flavour: $flavour
+ fi
+done
+cat >debian/config.local/"$arch"/defines.toml <<EOF
+[[featureset]]
+name = '$featureset'
+
+[[featureset.flavour]]
+name = '$flavour'
EOF
-fi
# Regenerate control and included rules
rm -f debian/control debian/rules.gen