X-Original-To: alpine-devel@lists.alpinelinux.org Received: from newmail.tetrasec.net (unknown [172.21.74.12]) by lists.alpinelinux.org (Postfix) with ESMTP id 147B05C441F for ; Mon, 6 Mar 2017 16:55:34 +0000 (GMT) Received: from ncopa-desktop.copa.dup.pw (15.63.200.37.customer.cdi.no [37.200.63.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by newmail.tetrasec.net (Postfix) with ESMTPSA id 68AA95A07E8; Mon, 6 Mar 2017 16:55:33 +0000 (GMT) Date: Mon, 6 Mar 2017 17:55:28 +0100 From: Natanael Copa To: Kaarle Ritvanen Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH 1/2] abuild: fix dependency checking Message-ID: <20170306175528.0e2c2e6f@ncopa-desktop.copa.dup.pw> In-Reply-To: <20170306161239.2317-1-kaarle.ritvanen@datakunkku.fi> References: <20170306161239.2317-1-kaarle.ritvanen@datakunkku.fi> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.28; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 6 Mar 2017 18:12:38 +0200 Kaarle Ritvanen wrote: > - versioned dependencies > - dependencies on 'provides' tags or library names > --- > abuild.in | 47 ++++++++++++++++++++++------------------------- > 1 file changed, 22 insertions(+), 25 deletions(-) more deletetions than insertions. I like that :) > diff --git a/abuild.in b/abuild.in > index 22bd454..90da90d 100644 > --- a/abuild.in > +++ b/abuild.in > @@ -1855,10 +1855,26 @@ calcdeps() { > fi > } > > +get_missing_deps() { > + local cmd="$APK info --quiet --installed $1" > + shift > + > + while [ "$1" ]; do > + if [ ${1:0:1} = "!" ]; then > + if $cmd ${1:1}; then > + error "Conflicting package installed: ${1:1}" > + return 1 > + fi busybox ash does support the bashism ${foo:0:1} but i think we should try avoid it, since we can use ${foo#\!} here. LGTM otherwise. I haven't tested it though. -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---