From 7651bc80cb3a8f3cc4b6ecdcbad73886ac49dd9c Mon Sep 17 00:00:00 2001 From: Roxana Nicolescu Date: Wed, 17 May 2023 11:14:23 +0200 Subject: [PATCH] UBUNTU: [Packaging] update helper scripts BugLink: https://bugs.launchpad.net/bugs/1786013 Signed-off-by: Roxana Nicolescu --- debian/scripts/helpers/rebase | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/debian/scripts/helpers/rebase b/debian/scripts/helpers/rebase index fb2fd52740cd..201179f1698f 100755 --- a/debian/scripts/helpers/rebase +++ b/debian/scripts/helpers/rebase @@ -6,6 +6,7 @@ LOCAL_BRANCH= RELEASE_REPO= SOURCE_RELEASE_BRANCH= +OWN= function out() { @@ -37,6 +38,7 @@ usage="$0 [-r RELEASE_REPO] [ -b REMOTE_BRANCH ] [-l LOCAL_BRANCH] [-d]"$'\n\n' usage+="-r RELEASE_REPO Git repository to fetch the reference branch from."$'\n' usage+="-b REMOTE_BRANCH Remote branch to fetch from."$'\n' usage+="-l LOCAL_BRANCH Use LOCAL_BRANCH as the reference branch."$'\n' +usage+="-o Rebase against own kernel."$'\n' usage+="-d Dry run (do not rebase)." # @@ -45,12 +47,13 @@ usage+="-d Dry run (do not rebase)." # [-b REMOTE_BRANCH] - override default remote branch. # [-l LOCAL_BRANCH] - do not fetch from remote repo, use a local branch. -while getopts "r:b:l:d" opt; do +while getopts "r:b:l:od" opt; do case $opt in r ) RELEASE_REPO="$OPTARG" ;; b ) SOURCE_RELEASE_BRANCH="$OPTARG" ;; l ) LOCAL_BRANCH="$OPTARG" ;; d ) DRY_RUN=1 ;; + o ) OWN=1 ;; \? ) echo "usage: ${usage}"; exit ;; esac done @@ -66,11 +69,15 @@ if [ ! -f "$DEBIAN/etc/update.conf" ]; then elif [ "$DEBIAN_MASTER" != "" -a ! -d "$DEBIAN_MASTER" ]; then IS_REBASE_KERNEL=false fi -if ! $IS_REBASE_KERNEL; then +if ! $IS_REBASE_KERNEL && [ -z "$OWN" ]; then echo "This is not a rebase kernel, no rebase should be needed, please report if otherwise" exit 0 fi +if [ "${OWN}" ] ; then + DEBIAN_MASTER="${DEBIAN}" +fi + if [ "$DEBIAN_MASTER" = "" ]; then echo "DEBIAN_MASTER should be defined either in ${DEBIAN}/etc/update.conf or the environment" exit 1 -- 2.39.5