[kteam-tools][PATCH v2 1/7] git-build-kernel: extract the correct source package name

Kamal Mostafa kamal at canonical.com
Thu Aug 2 22:40:29 UTC 2018


And use it to find the correct .orig tarball when building source packages.

Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 git-build-kernel/git-build-kernel | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/git-build-kernel/git-build-kernel b/git-build-kernel/git-build-kernel
index df95e12..44e38c8 100755
--- a/git-build-kernel/git-build-kernel
+++ b/git-build-kernel/git-build-kernel
@@ -80,6 +80,7 @@ DISTRO=$(
     do [ "$DISTRO" != "UNRELEASED" ] && { echo $DISTRO; break; }
     done
     )
+SRCPKG=$(git show $GITBRANCH:$DEBIAN/changelog | sed 's/^\(.*\) (.*/\1/;q')
 CHROOT="$DISTRO"
 CHROOT="${CHROOT%-proposed}"
 if [ "$CHROOT" = "UNRELEASED" -o -z "$CHROOT" ]
@@ -116,7 +117,7 @@ touch "$WORKDIR/building"
 trap "rm -rf $WORKDIR/building $BUILDDIR" 0
 
 [ $do_source_pkg = 1 ] && {
-    orig_tarball="linux_${VERSION%%-*}.orig.tar.gz"
+    orig_tarball="${SRCPKG}_${VERSION%%-*}.orig.tar.gz"
     # Careful: $ORIG_TARBALLS_DIR must be accessible from within the chroot.
     # (Alternately, use "cp -p" instead of "ln -s" if that's not an option)
     ln -s $ORIG_TARBALLS_DIR/$orig_tarball $WORKDIR/
-- 
2.7.4





More information about the kernel-team mailing list