![](https://seccdn.libravatar.org/avatar/bcd65ca98f9d97839f15c54575c7edec.jpg?s=120&d=mm&r=g)
Now that we have arch and flavor information via the --config option, we can do things like automatically expand the kABI references. This patch uses that information to expand the references into the build directory. Missing kABI references are not considered a fatal error. Signed-off-by: Jeff Mahoney <jeffm@suse.com> --- scripts/sequence-patch.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) --- a/scripts/sequence-patch.sh +++ b/scripts/sequence-patch.sh @@ -40,7 +40,7 @@ usage() { cat <<END SYNOPSIS: $0 [-qv] [--symbol=...] [--dir=...] [--combine] [--fast] [last-patch-name] [--vanilla] [--fuzz=NUM] - [--build-dir=PATH] [--config=ARCH-FLAVOR] + [--build-dir=PATH] [--config=ARCH-FLAVOR [--kabi]] The --build-dir option supports internal shell aliases, like ~, and variable expansion when the variables are properly escaped. Environment variables @@ -64,7 +64,7 @@ if $have_arch_patches; then else arch_opt="" fi -options=`getopt -o qvd:F: --long quilt,no-quilt,$arch_opt,symbol:,dir:,combine,fast,vanilla,fuzz,build-dir:,config: -- "$@"` +options=`getopt -o qvd:F: --long quilt,no-quilt,$arch_opt,symbol:,dir:,combine,fast,vanilla,fuzz,build-dir:,config:,kabi -- "$@"` if [ $? -ne 0 ] then @@ -83,6 +83,7 @@ SP_BUILD_DIR= CONFIG= CONFIG_ARCH= CONFIG_FLAVOR= +KABI=false while true; do case "$1" in @@ -132,6 +133,9 @@ while true; do CONFIG="$2" shift ;; + --kabi) + KABI=true + ;; --) shift break ;; @@ -500,6 +504,18 @@ if test -n "$CONFIG"; then else echo "[ Config $CONFIG does not exist. ]" fi + + if $KABI; then + if [ ! -x rpm/modversions ]; then + echo "[ This branch does not support the modversions kABI mechanism. Skipping. ]" + elif [ -e "kabi/$CONFIG_ARCH/symtypes-$CONFIG_FLAVOR" ]; then + echo "[ Expanding kABI references for $CONFIG ]" + rpm/modversions --unpack "$SP_BUILD_DIR" < \ + "kabi/$CONFIG_ARCH/symtypes-$CONFIG_FLAVOR" + else + echo "[ No kABI references for $CONFIG ]" + fi + fi fi [ $# -gt 0 ] && exit $status -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org