X-Original-To: alpine-aports@lists.alpinelinux.org Received: from sender153-mail.zoho.com (sender153-mail.zoho.com [74.201.84.153]) by lists.alpinelinux.org (Postfix) with ESMTP id 4FB3A5C44E8 for ; Thu, 8 Dec 2016 22:20:04 +0000 (GMT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=date:from:to:cc:message-id:in-reply-to:references:subject:mime-version:content-type:user-agent; b=a55/dznNykieIbHgSX8BHp7LyHZFeKfqxQkwmwlPxgnPqX+CQO8tva3cDO4ia8JC/gHc7L+ryQbw o8he4IppXsK0hCLoUWNOHPB+o7KO7BBsMEGGMswIwejowBK1XZi6 Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1481235591202903.7060490843029; Thu, 8 Dec 2016 14:19:51 -0800 (PST) Received: from [89.73.17.238] by mail.zoho.com with HTTP;Thu, 8 Dec 2016 14:19:51 -0800 (PST) Date: Thu, 08 Dec 2016 23:19:51 +0100 From: =?UTF-8?Q?Przemys=C5=82aw_Pawe=C5=82czyk?= To: "Timo Teras" Cc: "" , "" Message-ID: <158e085701a.11a2e5de86042.8328661124265152859@zoho.com> In-Reply-To: <20161207100413.42b9a59f@vostro> References: <20161203174846.5345-1-przemoc@zoho.com> <20161203190616.5974-1-przemoc@zoho.com> <20161207100413.42b9a59f@vostro> Subject: [alpine-aports] Re: [PATCH v2] main/abuild: Make default_prepare() always end up in "$builddir". X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail ---- On Wed, 07 Dec 2016 09:04:13 +0100 Timo Teras wrote ---- > On Sat, 3 Dec 2016 20:06:16 +0100 > Przemyslaw Pawelczyk wrote: > > > ...-default_prepare-always-end-up-in-builddi.patch | 30 > > ++++++++++++++++++++++ > > main/abuild/APKBUILD | 12 ++++++--- 2 > > files changed, 38 insertions(+), 4 deletions(-) create mode 100644 > > main/abuild/0004-abuild-Make-default_prepare-always-end-up-in-builddi.patch > > We generally want abuild patches to first go to abuild.git. I sent patch for abuild to alpine-devel ML before sending this one. Jirutka applied it there, but with some changes. Therefore this patch is obviously no longer the same as the one in upstream. > > > +diff --git a/abuild.in b/abuild.in > > +index e49956b76d04..f56ac033f6a9 100644 > > +--- a/abuild.in > > ++++ b/abuild.in > > +@@ -565,10 +565,10 @@ have_patches() { > > + > > + default_prepare() { > > + local i > > ++ cd "$builddir" || { error "Is \$builddir set correctly?"; > > return 1; } > > + if ! have_patches; then > > + return 0 > > + fi > > +- cd "$builddir" || { error "Is \$builddir set correctly?"; > > return 1; } > > + for i in $source; do > > + case $i in > > + *.patch) > > The problem with this is that not abuild's are updated yet to define > $builddir. This would make those fail. If it tries to cd there by > default, it should at least check that $builddir is defined. builddir is defined thanks to commit 4f37c8efd306: abuild: set default builddir when not defined in APKBUILD that became part of abuild v2.29.0, which is in aports already. Fail would be if [ "$_builddir" != "$srcdir/$pkgname-$pkgver" ]. I haven't grepped if there are such cases, though. > > This was the logic for cd:ing $builddir: > - since not all (yet) set $builddir, don't do it by default > - the abuilds that use $_builddir and have patches, should ship their > own prepare() so it's assumed that having patches and getting to > default_prepare the variable name has been fixed too > > I'd be ok, if in "if ! have_patches" we check if $builddir is set and > cd to it. Do you still think that further changes are needed in abuild.git? > Thanks, > Timo Regards, Przemek --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---