Mail archive
alpine-devel

Re: [alpine-devel] [PATCH 1/2] abuild: fix dependency checking

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Mon, 6 Mar 2017 17:55:28 +0100

On Mon, 6 Mar 2017 18:12:38 +0200
Kaarle Ritvanen <kaarle.ritvanen_at_datakunkku.fi> 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
> _at_@ -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_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Mon Mar 06 2017 - 17:55:28 GMT