[PATCH v2][kteam-tools] git-build-kernel: fix series selection for UNRELEASED custom kernels

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH v2][kteam-tools] git-build-kernel: fix series selection for UNRELEASED custom kernels

Kamal Mostafa-2
G-b-k determines the target series and build chroot by examining the
topmost changelog entry -- but if that is in the "UNRELEASED" state,
it falls back to examining the git repo itself (e.g. xenial.git).

This scheme is insufficient for the custom kernels that we've recently
moved to arbitrary repo.git names e.g. linux-something.git -- they can't
figure out their target series when they are the "UNRELEASED" state.

Now, g-b-k will also examine the second changelog entry, if the first is
in the "UNRELEASED" state.

Signed-off-by: Kamal Mostafa <[hidden email]>
---
 git-build-kernel/git-build-kernel | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/git-build-kernel/git-build-kernel b/git-build-kernel/git-build-kernel
index c0481d4..df95e12 100755
--- a/git-build-kernel/git-build-kernel
+++ b/git-build-kernel/git-build-kernel
@@ -75,8 +75,11 @@ eval `git show $GITBRANCH:debian/debian.env | grep DEBIAN=`
 ### Extract the distro target (e.g. "raring-proposed") from
 ### debian.master/changelog, and use it as the basis of the chroot.
 ### If it isn't useful, try to use the git repo directory name.
-chg="`git show $GITBRANCH:$DEBIAN/changelog | head -1`"
-DISTRO=`echo "$chg" | sed -n -e '1s/^.* \(.*\);.*$/\1/p'`
+DISTRO=$(
+    git show $GITBRANCH:$DEBIAN/changelog | grep '^[a-z]' | head -2 | sed -n -e 's/^.* \(.*\);.*$/\1/p'  | while read DISTRO
+    do [ "$DISTRO" != "UNRELEASED" ] && { echo $DISTRO; break; }
+    done
+    )
 CHROOT="$DISTRO"
 CHROOT="${CHROOT%-proposed}"
 if [ "$CHROOT" = "UNRELEASED" -o -z "$CHROOT" ]
@@ -97,6 +100,7 @@ else
 fi
 
 ### Get the version number - we need it to locate the orig tarball
+chg="`git show $GITBRANCH:$DEBIAN/changelog | head -1`"
 VERSION=`echo "$chg" | sed -n -e '1s/^.*(\([^)]*\)).*$/\1/p'`
 
 
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH v2][kteam-tools] git-build-kernel: fix series selection for UNRELEASED custom kernels

brad.figg
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH v2][kteam-tools] git-build-kernel: fix series selection for UNRELEASED custom kernels

Marcelo Henrique Cerri
In reply to this post by Kamal Mostafa-2
--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED: [PATCH v2][kteam-tools] git-build-kernel: fix series selection for UNRELEASED custom kernels

Kamal Mostafa-2
In reply to this post by Kamal Mostafa-2