From patchwork Thu Aug 2 22:40:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 952992 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41hQBC291Wz9sBy; Fri, 3 Aug 2018 08:40:51 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1flMGu-0000up-GG; Thu, 02 Aug 2018 22:40:40 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1flMGt-0000uH-5n for kernel-team@lists.ubuntu.com; Thu, 02 Aug 2018 22:40:39 +0000 Received: from 1.general.kamal.us.vpn ([10.172.68.52] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1flMGs-000541-QM for kernel-team@lists.ubuntu.com; Thu, 02 Aug 2018 22:40:38 +0000 Received: from kamal by fourier with local (Exim 4.86_2) (envelope-from ) id 1flMGq-0002Tn-Kw for kernel-team@lists.ubuntu.com; Thu, 02 Aug 2018 15:40:36 -0700 From: Kamal Mostafa To: kernel-team@lists.ubuntu.com Subject: [kteam-tools][PATCH v2 1/7] git-build-kernel: extract the correct source package name Date: Thu, 2 Aug 2018 15:40:29 -0700 Message-Id: <1533249635-9483-2-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533249635-9483-1-git-send-email-kamal@canonical.com> References: <1533249635-9483-1-git-send-email-kamal@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" And use it to find the correct .orig tarball when building source packages. Signed-off-by: Kamal Mostafa --- 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/