diff mbox series

[xenial/hwe] UBUNTU: Packaging: update-from-master: allow rebase to be skipped

Message ID 20180919074730.3104-1-cascardo@canonical.com
State New
Headers show
Series [xenial/hwe] UBUNTU: Packaging: update-from-master: allow rebase to be skipped | expand

Commit Message

Thadeu Lima de Souza Cascardo Sept. 19, 2018, 7:47 a.m. UTC
Sometimes the rebase will already be done, but the other operations are still
needed. One of those examples is when the rebase finds a conflict and needs to
be finished manually.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
---

My plan is to apply this to many other trees, where some form of
update-from-...-master exists. This should not change the way that script is
used today, but just add an option that is helpful in some cases we already
hit. So, it should not disturb the process to update kernels that we are all
used to.

---
 debian.hwe/etc/update-from-bionic-master | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Kleber Sacilotto de Souza Sept. 20, 2018, 6:44 a.m. UTC | #1
On 09/19/18 09:47, Thadeu Lima de Souza Cascardo wrote:
> Sometimes the rebase will already be done, but the other operations are still
> needed. One of those examples is when the rebase finds a conflict and needs to
> be finished manually.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> ---
> 
> My plan is to apply this to many other trees, where some form of
> update-from-...-master exists. This should not change the way that script is
> used today, but just add an option that is helpful in some cases we already
> hit. So, it should not disturb the process to update kernels that we are all
> used to.
> 
> ---
>  debian.hwe/etc/update-from-bionic-master | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/debian.hwe/etc/update-from-bionic-master b/debian.hwe/etc/update-from-bionic-master
> index 81b23c2daf12..2a01417f6a9e 100755
> --- a/debian.hwe/etc/update-from-bionic-master
> +++ b/debian.hwe/etc/update-from-bionic-master
> @@ -86,10 +86,10 @@ BASE_COMMIT=`git log --pretty=one | \
>  if [ "${MASTER_COMMIT}" = "${BASE_COMMIT}" ]
>  then
>  	echo Already up to date.
> -	exit 1
> -fi
> -
> -if ! git rebase --onto ${MASTER_COMMIT} ${BASE_COMMIT}
> +	if [ -z "$SKIP_REBASE" ]; then
> +		exit 1
> +	fi
> +elif ! git rebase --onto ${MASTER_COMMIT} ${BASE_COMMIT}

As discussed offline, the name SKIP_REBASE is a bit misleading, since it
*will* rebase if it hasn't been done yet. So with a new option name
(like SKIP_REBASE_IF_UPTODATE):

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

>  then
>  	exit 1
>  fi
>
Marcelo Henrique Cerri Sept. 20, 2018, 9:34 a.m. UTC | #2
Considering the changes mentioned by Kleber:

Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Thadeu Lima de Souza Cascardo Sept. 20, 2018, 10:39 a.m. UTC | #3
Applied with change requested and a BugLink pointing to
http://bugs.launchpad.net/bugs/1793461.

Applied to bionic/hwe-edge, xenial/hwe, bionic/azure-edge, xenial/azure,
xenial/gcp, precise-esm/lts-backport-trusty, trusty/lts-backport-xenial,
trusty/azure.

Thanks.
Cascardo.
diff mbox series

Patch

diff --git a/debian.hwe/etc/update-from-bionic-master b/debian.hwe/etc/update-from-bionic-master
index 81b23c2daf12..2a01417f6a9e 100755
--- a/debian.hwe/etc/update-from-bionic-master
+++ b/debian.hwe/etc/update-from-bionic-master
@@ -86,10 +86,10 @@  BASE_COMMIT=`git log --pretty=one | \
 if [ "${MASTER_COMMIT}" = "${BASE_COMMIT}" ]
 then
 	echo Already up to date.
-	exit 1
-fi
-
-if ! git rebase --onto ${MASTER_COMMIT} ${BASE_COMMIT}
+	if [ -z "$SKIP_REBASE" ]; then
+		exit 1
+	fi
+elif ! git rebase --onto ${MASTER_COMMIT} ${BASE_COMMIT}
 then
 	exit 1
 fi