X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id D3E9CDC01AF for ; Tue, 5 Jan 2016 17:25:55 +0000 (UTC) Received: from zimbra13.linbit.com (zimbra13.linbit.com [212.69.166.240]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 91A64DC00B8 for ; Tue, 5 Jan 2016 17:25:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra13.linbit.com (Postfix) with ESMTP id 177C6464B7B; Tue, 5 Jan 2016 18:25:53 +0100 (CET) Received: from zimbra13.linbit.com ([127.0.0.1]) by localhost (zimbra13.linbit.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id PeHWbvYthe4U; Tue, 5 Jan 2016 18:25:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra13.linbit.com (Postfix) with ESMTP id EF743464BD2; Tue, 5 Jan 2016 18:25:52 +0100 (CET) X-Virus-Scanned: amavisd-new at linbit.com Received: from zimbra13.linbit.com ([127.0.0.1]) by localhost (zimbra13.linbit.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id vYOSs2ruIC3R; Tue, 5 Jan 2016 18:25:52 +0100 (CET) Received: from aperol.at.linbit. (tuerlsteher.linbit.com [86.59.100.100]) by zimbra13.linbit.com (Postfix) with ESMTPSA id C422A464B7B; Tue, 5 Jan 2016 18:25:51 +0100 (CET) From: Roland Kammerer To: alpine-aports@lists.alpinelinux.org Cc: Roland Kammerer Subject: [alpine-aports] [PATCH] testing/drbd9-grsec: fix prepare logic Date: Tue, 5 Jan 2016 18:25:36 +0100 Message-Id: <1452014736-21355-1-git-send-email-roland.kammerer@linbit.com> X-Mailer: git-send-email 2.6.4 X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: - We have to add additional ".." to the path we want to check. $PWD is already $srcdir. This bug was the only reason that it did not trigger futher bugs in the "true" case. - If we don't find an APKBUILD for the kernel flavor, error out - We are in a sub-shell, we do not have to protect $pkgname - We have to add "return 0", otherwise in the positive case where the last check succeeds, it sets the sub-shell return value to 1, which then triggers the failure path. --- testing/drbd9-grsec/APKBUILD | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/testing/drbd9-grsec/APKBUILD b/testing/drbd9-grsec/APKBUILD index b9922c0..258163c 100644 --- a/testing/drbd9-grsec/APKBUILD +++ b/testing/drbd9-grsec/APKBUILD @@ -33,14 +33,15 @@ _builddir=$srcdir/$_usname-$_usver prepare() { local i # verify the kernel version - (if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then - _name=$pkgname - . ../../main/linux-${_flavor}/APKBUILD - pkgname=$_name + (if [ -f ../../../main/linux-${_flavor}/APKBUILD ]; then + . ../../../main/linux-${_flavor}/APKBUILD [ "$_kver" != "$pkgver" ] \ && die "please update _kver to $pkgver" [ "$_kpkgrel" != "$pkgrel" ] \ && die "please update _kpkgrel to $pkgrel" + return 0 + else + die "could not determine kernel flavor: linux-${_flavor}" fi) || return 1 -- 2.6.4 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---