From: Prarit Bhargava <prarit(a)redhat.com>
redhat/configs/generate_all_configs.sh: Fix config naming
The existing config naming hardcoded the number of hyphens in the config
string name, causing SPECPACKAGE_NAME strings with hyphens to fail.
Fix the config naming to allow for hyphens in the package name.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/configs/generate_all_configs.sh
b/redhat/configs/generate_all_configs.sh
index blahblah..blahblah 100755
--- a/redhat/configs/generate_all_configs.sh
+++ b/redhat/configs/generate_all_configs.sh
@@ -19,18 +19,19 @@ else
SECONDARY=fedora
fi
-for i in kernel-*-"$FLAVOR".config; do
- NEW=kernel-"$SPECVERSION"-$(echo "$i" | cut -d - -f2- | sed
s/-"$FLAVOR"//)
- #echo $NEW
+# The +1 is to remove the - at the end of the SPECPACKAGE_NAME string
+specpackage_name_len=$((${#SPECPACKAGE_NAME} + 1))
+for i in ${SPECPACKAGE_NAME}*-"$FLAVOR".config; do
+ NEW=${SPECPACKAGE_NAME}-"$SPECVERSION"-$(echo ${i:$specpackage_name_len} | sed
s/-"$FLAVOR"//)
mv "$i" "$NEW"
done
rm -f kernel-*-"$SECONDARY".config
if [ "$DEBUGBUILDSENABLED" -eq 0 ]; then
- for i in kernel-*debug*.config; do
+ for i in ${SPECPACKAGE_NAME}-*debug*.config; do
base=$(echo "$i" | sed -r s/-?debug//g)
- NEW=kernel-$(echo "$base" | cut -d - -f2-)
+ NEW=${SPECPACKAGE_NAME}-$(echo "$base" | cut -d - -f2-)
mv "$i" "$NEW"
done
fi
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2253